I am using MPI.jl and call the file in the REPL as follows.
julia> mpiexec(cmd ->run(`$cmd -np 2 $(Base.julia_cmd()) $("script.jl")`))
Sometimes, I get back the following error:
ERROR: LoadError: SystemError: opening file "/Users/hideakv/.julia/compiled/v1.4/JuMP/DmXqY_uPVDl.ji": Permission denied
In other times, I get a similar error for different packages, like GLPK, Ipopt, etc.
These packages are all included in script.jl.
I am able to fix this by including these packages at the REPL, as in
julia> using JuMP, GLPK, Ipopt
However, I don’t see why this should work. What does it mean by “Permission denied”, and what is happening behind the code?
There was also a case where the permission was denied for MPI, which is odd because I cannot run mpiexec without including MPI. This inconsistency is also a mystery to me.