You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The documentation says that @distributed for without a reducer implies @sync but when I run a loop that contains a file operation as the last step in my program, I get the following error:
Unhandled Task ERROR: ProcessExitedException(4)
...and 5 more exceptions.
Stacktrace:
[1] sync_end(c::Channel{Any})
@ Base ./task.jl:381
[2] (::Distributed.var"#177#179"{var"#3#8"{RemoteChannel{Channel{Bool}}}, UnitRange{Int64}})()
@ Distributed ./task.jl:400
As far as I can tell, the tasks actually completed correctly. It seems to be related to workers getting shut down too quickly. If I add sleep(10) at the end of the program the error goes away. It also goes away if I replace @showprogress with @sync.
Julia 1.7.3 x86 build, running on an Apple M1, with ProgressMeter 1.7.2. MWE below.
using Distributed
addprocs(exeflags="--project=$(Base.active_project())")
@everywhere using ProgressMeter
function main()
fname = ARGS[1]
@showprogress @distributed for i in 1:10
open(fname) do str
open("/tmp/$i.txt", "w") do out
write(out, read(str))
end
end
end
end
main()
The text was updated successfully, but these errors were encountered:
The documentation says that
@distributed for
without a reducer implies@sync
but when I run a loop that contains a file operation as the last step in my program, I get the following error:As far as I can tell, the tasks actually completed correctly. It seems to be related to workers getting shut down too quickly. If I add
sleep(10)
at the end of the program the error goes away. It also goes away if I replace@showprogress
with@sync
.Julia 1.7.3 x86 build, running on an Apple M1, with ProgressMeter 1.7.2. MWE below.
The text was updated successfully, but these errors were encountered: