-
-
Notifications
You must be signed in to change notification settings - Fork 198
Closed
Description
I'm creating a very simple app that spawns two processes and prints a who_am_i function. When I use this module with Julia I don't have any problem with it, but when I create the app I have a IOError: could not spawn setenv error. It seems it can't find any julia executable and crashes.
The code is the following:
module parallel_test
using Distributed
module parallel_test2
using Distributed
function main()
addprocs(2;exeflags="--project")
@eval @everywhere using parallel_test
println(nprocs())
pmap(t->who_am_i(t),[t for t = 1:50])
end
function who_am_i(t)
n = myid()
println("$t - I'm process number $n")
end
end
using .parallel_test2
function julia_main()
try
parallel_test2.main()
catch
Base.invokelatest(Base.display_error, Base.catch_stack())
return 1
end
return 0
end
end # module
Stacktrace:
IOError: could not spawn setenv(`/home/hotarola/ParallelTestCompiled/bin/julia -Cnative -J/home/hotarola/ParallelTestCompiled/bin/parallel_test.so -g1 --project --bind-to 127.0.0.1 --worker`; dir="/home/hotarola/ParallelTestCompiled/bin"): no such file or directory (ENOENT)
Stacktrace:
[1] _spawn_primitive(::String, ::Cmd, ::Array{Any,1}) at ./process.jl:99
[2] #554 at ./process.jl:112 [inlined]
[3] setup_stdios(::Base.var"#554#555"{Cmd}, ::Array{Any,1}) at ./process.jl:196
[4] #open#563(::Bool, ::Bool, ::typeof(open), ::Cmd, ::Base.DevNull) at ./process.jl:111
[5] #open at ./none:0 [inlined]
[6] open(::Cmd, ::String, ::Base.DevNull) at ./process.jl:339
[7] open at ./process.jl:338 [inlined]
[8] launch(::Distributed.LocalManager, ::Dict{Symbol,Any}, ::Array{Distributed.WorkerConfig,1}, ::Base.GenericCondition{Base.AlwaysLockedST}) at /opt/julia-1.3.1/share/julia/stdlib/v1.3/Distributed/src/managers.jl:329
[9] (::Distributed.var"#41#44"{Distributed.LocalManager,Dict{Symbol,Any},Array{Distributed.WorkerConfig,1},Base.GenericCondition{Base.AlwaysLockedST}})() at ./task.jl:333
Stacktrace:
[1] wait at ./task.jl:251 [inlined]
[2] #addprocs_locked#40(::Base.Iterators.Pairs{Symbol,String,Tuple{Symbol},NamedTuple{(:exeflags,),Tuple{String}}}, ::typeof(Distributed.addprocs_locked), ::Distributed.LocalManager) at /opt/julia-1.3.1/share/julia/stdlib/v1.3/Distributed/src/cluster.jl:494
[3] #addprocs_locked at ./none:0 [inlined]
[4] #addprocs#39(::Base.Iterators.Pairs{Symbol,String,Tuple{Symbol},NamedTuple{(:exeflags,),Tuple{String}}}, ::typeof(Distributed.addprocs), ::Distributed.LocalManager) at /opt/julia-1.3.1/share/julia/stdlib/v1.3/Distributed/src/cluster.jl:441
[5] #addprocs at ./none:0 [inlined]
[6] #addprocs#247 at /opt/julia-1.3.1/share/julia/stdlib/v1.3/Distributed/src/managers.jl:316 [inlined]
[7] #addprocs at ./none:0 [inlined]
[8] main() at /home/hotarola/git/parallel_test/src/parallel_test.jl:8
[9] julia_main() at /home/hotarola/git/parallel_test/src/parallel_test.jl:23
[10] julia_main() at ./none:29
Julia version:
julia> versioninfo()
Julia Version 1.3.1
Commit 2d5741174c (2019-12-30 21:36 UTC)
Platform Info:
OS: Linux (x86_64-pc-linux-gnu)
CPU: Intel(R) Core(TM) i5-8250U CPU @ 1.60GHz
WORD_SIZE: 64
LIBM: libopenlibm
LLVM: libLLVM-6.0.1 (ORCJIT, skylake)
Packagecompiler v1.2.1
Metadata
Metadata
Assignees
Labels
No labels