Hi, for some reason the code snippet below hangs. Does any one have an explanation as to why this hangs
using distributed
addprocs(2)
tasks = Vector{Task}(undef,4)
@sync for i in 1:4
tasks[i] = Threads.@spawn begin
pmap(x->x, WorkerPool(workers()), 1:10)
end
end
fetch.(tasks)
Surprisingly if i first run pmap(x->x, WorkerPool(workers()), 1:10) before running the code above everything works as expected.
julia> versioninfo()
Julia Version 1.4.1
Commit 381693d3df* (2020-04-14 17:20 UTC)
Platform Info:
OS: Linux (x86_64-pc-linux-gnu)
CPU: Intel(R) Core(TM) i3-5005U CPU @ 2.00GHz
WORD_SIZE: 64
LIBM: libopenlibm
LLVM: libLLVM-8.0.1 (ORCJIT, broadwell)
Environment:
JULIA_NUM_THREADS = 4
Hi, for some reason the code snippet below hangs. Does any one have an explanation as to why this hangs
Surprisingly if i first run
pmap(x->x, WorkerPool(workers()), 1:10)
before running the code above everything works as expected.julia> versioninfo() Julia Version 1.4.1 Commit 381693d3df* (2020-04-14 17:20 UTC) Platform Info: OS: Linux (x86_64-pc-linux-gnu) CPU: Intel(R) Core(TM) i3-5005U CPU @ 2.00GHz WORD_SIZE: 64 LIBM: libopenlibm LLVM: libLLVM-8.0.1 (ORCJIT, broadwell) Environment: JULIA_NUM_THREADS = 4