Open benmcdonough20 opened 1 year ago
Update: I think that PythonCall
is the issue. The bug can be fixed by avoiding the Bloqade init through replacing using Bloqade
with using BloqadeExpr, BloqadeODE, BloqadeLattices
.
A quick fix is to only let the master process import Python Call, and only allow master proc to plot
So if we modify the following part in src/Bloqade.jl :
using PythonCall
const plt = PythonCall.pynew()
function __init__()
# copied from PyPlotCall.jl
PythonCall.pycopy!(plt, pyimport("matplotlib.pyplot"))
return
end
to
using Distributed
const plt = nothing
@spawnat 1 :(using PythonCall)
@spawnat 1 :(const plt = PythonCall.pynew())
function __init__()
if getpid()==1
# copied from PyPlotCall.jl
PythonCall.pycopy!(plt, pyimport("matplotlib.pyplot"))
end
return
end
@weinbe58 @Roger-luo
Also might related to #554
Describe the bug When constructing an
EnsembleProblem
with aSchrodingerProblem
and using theEnsembleDistributed
algorithm to parallelize the simulations, several workers cannot run simultaneously due to a lock on.CondaPkg
. The error message produced is the following:To Reproduce Here is a minimum working example:
Running this code with
julia -p 2 minimum_working_example.jl
produces the issue.Version Info