I have currently some code like this
function printsim(simulator, nsample) for i = 1:nsample println(simulation(simulator)) end end
As soon as each simulation is over, I print it to standard output, which I usually redirect to a file. In this way if the simulation is interrupted, I still have some results.
When I want to parallelize it, now I just start multiple Julia processes with a Python. But this sometimes create issues-- https://github.com/JuliaLang/julia/issues/31953
If I want to parallelize this inside Julia, how can I do it?