I want to start several instances of Julia and run some pretty time consuming (different) simulations. The underlying hardware has several CPU cores and I would like to make sure that each instance uses a different core, to make things a bit parallel.
However, I am uncertain if this is something I can decide after I have started each instance, or if there is some system variable I should change in the bash terminal from where I start a particular instance? I am working from a Linux system if that matters.
What Oscar said was true. But it seems to me you’re better offnot spaming terminal with a bunch of julia script.jl and just do everything from 1 place:
run.jl:
@everywhere include("utils.jl")
@spawnat 2 experiment(param1)
@spawnat 3 experiment(param2)
@spawnat 4 experiment(param3)
# write a loop to wait
and then you can start julia with multiple processes by: