[Numpy-discussion] SFMT (faster mersenne twister)

Sturla Molden sturla.molden at gmail.com
Sun Sep 7 15:51:57 EDT 2014

"James A. Bednar" <jbednar at inf.ed.ac.uk> wrote:

> Please don't ever, ever break the sequence of numpy's random numbers!
> Please!  We have put a lot of effort into being able to reproduce our
> published work exactly, 

Jup, it cannot be understated how important this is for reproducibility of
published research. Thus from a scientific standpoint it is important that
random numbers are not random. Some might think that it's just important
that they are as "random as possible", but reproducibility is just as
essential to stochastic simulations. This is also why parallel random
number generators and parallel stochastic algorithms are so hard to
program, because the operating systems' scheduler can easily break the
reproducibility. I think we could add new generators to NumPy though,
perhaps with a keyword to control the algorithm (defaulting to the current
Mersenne Twister). A particular candidate I think we should consider is the
DCMT, which is exceptionally good for parallel algorithms (the DCMT code is
now BSD licensed, it used to be LGPL). Because of the way randomkit it
written, it is very easy to plug-in different generators.


More information about the NumPy-Discussion mailing list