Skip to content
Prev 14491 / 21307 Next

[Bioc-devel] how to achieve reproducibility with BiocParallel regardless of number of threads and OS (set.seed is disallowed)

I?ll also back-track a bit from my advice in the original support site posting, as it turns out C++11?s <random> is not guaranteed to be reproducible across platforms. 

That is to say, the RNG engines are portably defined across implementations, but the distribution classes (that convert the random stream into values of the desired distribution) turn out to be implementation-defined. As such, you can get different distribution values from the same seed with different compilers. Fun, huh? So much for ?standard?! So, by using <random>, I ended up trading irreproducibility across workers for irreproducibility across platforms. 

Switching to boost::random (as provided by the BH package) seems to fix the problem, though one wonders how this was ever allowed to happen in the first place.

-A