Open maedoc opened 8 years ago
Consider combining a few primitive cyclic generators as described here. This is results in a fast RNG that has independent sub generators and should be easy enough to implement in OpenCL.
@catchchaos We can use AMD's clRNG library. It has nice optimized implementations of MRG31k3p, MRG32k3a and LFSR113. Nevertheless, algorithm given in the website is also nice.
I would prefer to choose one or two with the highest periods, which is an important factor in quality:
Imagine a parameter sweep of 5 parameters, each having 100 values, and each simulation requires 10000000 time steps. If there are 400 state variables, we will need around 10^20 random numbers.
Because OpenCL targets hardware with single precision, there's no reason not to choose RANLUX, though again having a second one to compare with could be good.
Yup, RANLUX looks like our best bet currently and is certainly one of the popular options. If you're still looking for alternatives, I did come across the MIXMAX RNG described in this paper. I'll look at it more thoroughly if you find it promising.
yup that's definitely the one linked to in the description of this issue.
Oops sorry I didn't see that :p I just happened to come across it while looking for a PRNG and thought I'd mention it for further reference. I'll delete the comment.
We'll need to generate random numbers preferably not hand-coded; PyOpenCL uses
RANLUX
.