Skip to content

Fix FillWhiteNoise

Douglas Serson requested to merge fix/whitenoise into master

This MR fixes a bug in Vmath::FillWhiteNoise which causes it to alternate between only 2 values.

Instead of trying to pass a unique seed on each call of FillWhiteNoise, I decided to partly recover an old implementation where seed was an static variable ( therefore making consecutive calls part of a single larger random sequence). From what I understood, this had been changed to allow specifying different seeds for each MPI process. With this in mind, we can still pass an optional seed to replace the stored value.

An example of how to use this new logic is to use (the negative of) the rank as seed in the first call to FillWhiteNoise to decouple the parallel processes, and not passing any seed in the subsequent calls . Alternatively, we can still pass unique seeds on each call.

Merge request reports