how to properly dismiss workers from Distributed.jl after simulation with Agent.jl

84 views Asked by At

After running some parallel simulations with Agent.jl and Distributed.jl, my system is floaded with workers.

I am running parallel simulations with this code:

addprocs(20)
# distribute the model to the worker
@everywhere include("mymodel.jl")
# create a data frame to store the results on each worker
@everywhere adata = [:var1, :var2, :var3, :var4];
# collect everything
results, _ = ensemblerun!(mymodels, agent_step!, dummystep, 252; adata, parallel = true), showprogress=true);
# dismiss the workers
rmprocs(workers())

but after some time I end up with the situation depicted below... what am I missing?

enter image description here

0

There are 0 answers