In my view it is natural, that the order of the "output" (print statements)
is intermingled, as the code runs in parallel. To my knowledge this was the
same in 0.3 . Is it possible that you had no workers at all? (I.e. nprocs()
evaluates to 1).
Also, I cannot see any noticable delay...
Am Montag, 23. November 2015 22:32:51 UTC+1 schrieb Greg Plowman:
>
> 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
>
>
>