I’m struggling to debug a code that does random sampling, and for that I use CUDA random numbers. In order to be able to reproduce the same numbers in a second run of the code, I set the random number generator using
and that seems to work well. But in some cases my sampling goes mad and I need to be able to know what the numbers used were. The simplest way to do that is to stop before the tragedy happens and to get the current seed value, so that if I start a second run from that seed, the sequence of generated numbers would be the same as if I had not stopped the simulation?
Maybe an example:
Currand.seed!(0) Cuarrays(rand) 0.5467546 Cuarrays(rand) 0.434536 Cuarrays(rand) 0.564756 Cuarrays(rand) 0.956235 Cuarrays(rand) 0.354453
Now if I stopped at the fourth step (getting 0.956235), is there a way to get a seed value
s such that
yields 0.354453 ?
thanks a lot,