Computational Science Asked on December 24, 2020
So, my question is if one should ideally keep a record of all seeds that are used when publishing numerical work that involves one or more random number generators (e.g. a stochastic simulation), and if so, whether there’s a standard approach to doing this when the number of random number generators depends on the hardware on which the program is run. On the one hand, having an exact record of seeds could be helpful for reproducibility and correctness certification, but on the other, statistical results should be robust enough that the exact seeds shouldn’t really matter.
Achieving bit-for-bit reproducibility of results for a code that runs on a variable number of processors in a distributed computing cluster is extremely difficult if not impossible- there are just too many random factors that can change the result. Even on a shared memory multiprocessor, obtaining bit-for-bit reproducibility can be extremely difficult and require significant performance tradeoffs.
For example, Intel's MKL library has a "Conditional Numerical Reproducibility" mode in which the library routines will always return exactly the same results, but this comes at a cost in performance.
You can try rerunning your simulation using the same seeds and the same number of processors to see if you get exactly the same results. Unless your code has been carefully written to ensure reproducibility, it's most likely that you'll see some variations in the results.
If your results aren't bit-for-bit reproducible, then you'll have to decide whether you are willing to dive into the code to resolve these issues or whether you're willing to settle for answers that are not exactly reproducible but are consistently within some tolerance that's acceptable.
In any case, if you're performing a Monte Carlo simulation, you'll need to statistically analyze your output- a single realization of a Monte Carlo simulation with a specified RNG seed might be reproducible, but it's only one realization of many that would result from other seeds.
Answered by Brian Borchers on December 24, 2020
Get help from others!
Recent Answers
Recent Questions
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP