Open ignasiialemany opened 3 years ago
Added support for random number streams in #4. I suggest adding a ParallelMonteCarlo
class that wraps around/extends/replaces the existing MonteCarlo
class with the methods overridden to handle parallelisation
The only caveat would be that results are not reproducible between runs with different numbers of threads, but I don't see a way around that without major refactoring anyway.
The code is optimised to run in serial, but if a large number of walkers and/or time steps is used the runtime can be a limiting factor. Splitting walkers between cores/threads allows for faster overall execution but requires refactoring of the code.
numpy
to ensure reproducibility irrespective of parallelisationrun
andone_step
methods only via optional arguments (kwargs) that default to serial execution