This project is read-only.

Use of rand() rather than a better Random Number Generator (RNG)


Can we also chat about how the random numbers are being generated sometime.
I saw rand() in the codebase and that kinda of scared me if we are trying to get statistically uncorrelated results at 100K cores..
see rand() usage in MathFunctions.cpp functions
  int MathFunctions::randperm(const size_t n, const real *in, real *out)
  int MathFunctions::randperm(const size_t n, size_t *randperm)


wrote May 4, 2012 at 5:15 PM

Looking through the code, it seems rand() is used only when the -permute.kernel or -permute.phen command line options are used and we should not be using those options in our cluster runs. I verified that we don’t hit rand() across several runs with a breakpoint set and we did not trigger a break, so it looks like rand() has no impact on what we are trying to accomplish right now.

Bottom line: Leave rand() alone for now and find the ‘next’ issue and work through it. Follow-up on rand() will be to talk w/ Jennifer, Christoph, and David to understand the sensitivity to pseudo-randomness in the permute paths for later fixes.

wrote Feb 13, 2013 at 11:40 PM

wrote Nov 28, 2017 at 9:41 AM