Julia 0.4 supports "auto*host" which will launch as many workers on host as
cores.

On Tue, Jun 9, 2015 at 12:29 AM, Matt Wolff <[email protected]> wrote:

> I was poking around the julia parallel tutorial and source, it looks like
> if you spin up a cluster using a --machinefile, (where every process is on
> it's own machine), that the remote workers would not be able to spin up
> additional local processes.
>
> For example, if you spin up a 4 machine cluster, and each worker has 4
> cores, you can't run addprocs() on the workers to utilize the 4 locally
> available worker cores.
>
> Is there something on the julia roadmap to be able to leverage free cores
> on a worker? Or is this something that can be done with the current julia
> implementation?
>
> As an example, here is a quick script I wrote to test this:
>
> #run this function from the master node
> function dostuff()
>   @everywhere include("parallel/testworkers.jl")
>   for worker in workers()
>     remotecall(worker, testworkers, 12)
>   end
> end
>
> #each workers executes this
> function testworkers(numberofinterns::Int)
>   addprocs(numberofinterns)
>   nheads = @parallel (+) for i=1:20000000000
>     Int(rand(Bool))
>   end
>   println("finished")
> end
>
>
>

Reply via email to