Relevant parameters to restore curand state

Hello, I have an HPC application which requires me to save Curand states to a file and then retrieve them to continue the runs later. I am using the Philox curand RNG and I understand, looking at the struct in its header file, that it contains the following members:

struct curandStatePhilox4_32_10 {
uint4 ctr;
uint4 output;
uint2 key;
unsigned int STATE;
int boxmuller_flag;
int boxmuller_flag_double;
float boxmuller_extra;
double boxmuller_extra_double;

Now I’m just wondering, which of these values are actually relevant to save in a file in order to restore the correct RNG state later and continue the run, and which of these are just variables for internal calculation but are not important to save?

Many thanks!

The state isn’t used for scratchpad calculations. You should assume that all of the state is relevant.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.