diff --git a/core/PhysiCell_utilities.cpp b/core/PhysiCell_utilities.cpp index 97875642a..42d56ffe0 100644 --- a/core/PhysiCell_utilities.cpp +++ b/core/PhysiCell_utilities.cpp @@ -92,6 +92,12 @@ void setup_rng( void ) warned = true; } std::cout << "Setting up RNG with seed " << physicell_random_seed << std::endl; + + // save the seed to random_seed.txt + std::ofstream out(PhysiCell_settings.folder + "/random_seed.txt"); + out << physicell_random_seed << std::endl; + out.close(); + physicell_PRNG_generator.seed( physicell_random_seed ); // now get number of threads and set up a seed for each thread