I should add this problem is only when using *remote* workers. (In my case 
ssh on Windows).

The following code produces intermingled output with multiple workers on 
multiple machines (Julia v0.4)
Output is orderly when using Julia v0.3, or with v0.4 when workers are on 
local machine only.


function Launch()
    @everywhere function sim(trial, numIterations)
        println("Starting trial $trial")
        s = 0.0
        for i = 1:numIterations
            s += sum(sqrt(rand(10^6)))
        end
        println("Finished trial $trial")
        s
    end
    
    numTrials = 100
    numIterations = 100
    println("Running random simulation: $numTrials trials of $numIterations 
iterations ... ")
    results = pmap(sim, 1:numTrials, fill(numIterations, numTrials))
end 


Reply via email to