-
-
Notifications
You must be signed in to change notification settings - Fork 38
Description
I have been going through the code & documentation of JumpProcesses in order to find out how to set up reproducible (RNG seeded) ensemble runs. The following snippet yields the same output each time, as intended:
jprob::JumpProblem
eprob = EnsembleProblem(jprob)
solve(eprob, SSAStepper(), EnsembleSerial(); trajectories=10, seed=42)If I replace EnsembleSerial by EnsembleThreads, the outputs stop being reproducible.
I am aware that JumpProblem seems to have an rng field, so one naive solution would be to use the prob_func argument to EnsembleProblem and remake the jump problem with a different seed for each trajectory. That is not directly possible since remake does not accept a seed or rng argument, so I currently recreate the JumpProblem from scratch (which is less than ideal).
There might be a solution to this online, but I haven't found anything, which seems surprising. Is there any better (intended) way of doing this?