From 7e5faa0f3486c9eba1f8ecc68bd386686a73da5b Mon Sep 17 00:00:00 2001 From: paboyle Date: Sun, 2 Apr 2017 00:25:44 +0900 Subject: [PATCH] Multiple RNGs --- lib/parallelIO/NerscIO.h | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/lib/parallelIO/NerscIO.h b/lib/parallelIO/NerscIO.h index afd35236..72b3e32d 100644 --- a/lib/parallelIO/NerscIO.h +++ b/lib/parallelIO/NerscIO.h @@ -491,10 +491,15 @@ static inline void writeRNGState(GridSerialRNG &serial,GridParallelRNG ¶llel #ifdef RNG_RANLUX header.floating_point = std::string("UINT64"); header.data_type = std::string("RANLUX48"); -#else +#endif +#ifdef RNG_MT19937 header.floating_point = std::string("UINT32"); header.data_type = std::string("MT19937"); #endif +#ifdef RNG_SITMO + header.floating_point = std::string("UINT64"); + header.data_type = std::string("SITMO"); +#endif truncate(file); offset = writeHeader(header,file); @@ -522,10 +527,15 @@ static inline void readRNGState(GridSerialRNG &serial,GridParallelRNG & parallel #ifdef RNG_RANLUX assert(format == std::string("UINT64")); assert(data_type == std::string("RANLUX48")); -#else +#endif +#ifdef RNG_MT19937 assert(format == std::string("UINT32")); assert(data_type == std::string("MT19937")); #endif +#ifdef RNG_SITMO + assert(format == std::string("UINT64")); + assert(data_type == std::string("SITMO")); +#endif // depending on datatype, set up munger; // munger is a function of