At my company we typically break up the simulations into predefined fixed “chunks”, and assign a seed to each chunk this way the dynamic scheduler in the threading is repeatable no matter the number of threads.
I have been using Future.randjump to generate a new seed/state for each chunk. After experimenting a bit, it seems that the randjump is pretty slow for the default jump big(10)^20. I think this is supposed to be predefined.I thought by using this jump amount randjump would be faster.
In fact, I noticed no change in runtime for generating, 10 seeds, if I used the default of big(10)^20 or not.
Any thoughts on how to speed up randjump or or why the default isn’t faster? In my “real world” code, I am calling randjump in separate threads to speed things up, but it is actually slower than my simulation.
using Future, Random
seed = 1234
nchunks = 10
jumpamt = big(10)^20
a = fill(MersenneTwister(),nchunks)
m = MersenneTwister(seed)
a = m
for i = 2:nchunks
@inbounds a[i] = Future.randjump(m,jumpamt)