Open jullit31 opened 6 years ago
I think this has something to do with the IO object stored inside Progress
. The following likewise crashes:
julia> addprocs(1)
1-element Array{Int64,1}:
2
julia> @everywhere n = 10
julia> @everywhere io = STDERR
julia> sum = @parallel (+) for i = 1:n
println(io, "test")
rand(1:6)
end
Replacing io
with STDERR
in the loop makes the crash go away. Also, if you do p.output = STDERR
inside the loop, the example you've posted works. I have close to zero experience with distributed Julia, so no idea whether this needs a fix in ProgressMeter or some other setting up than @everywhere p = ...
.
I don't think you want to do
@everywhere p = Progress(n, 1)
That will create a new progress meter on each proc.
See #109 for a possible solution.
The following code works fine, as long as only one worker is spawned. I'm using version 0.5.5 and Julia 0.6.3 on Windows.
Spawning just a single additional worker (via
addprocs(1)
) and running above code, produces the these errors: