Skip to content

Commit b9a3c8a

Browse files
authored
Merge pull request #323 from drbergman/fix-save-random-seed-in-output
write random_seed to output/random_seed.txt
2 parents a37ee57 + 1ab6978 commit b9a3c8a

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

core/PhysiCell_utilities.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,12 @@ void setup_rng( void )
9292
warned = true;
9393
}
9494
std::cout << "Setting up RNG with seed " << physicell_random_seed << std::endl;
95+
96+
// save the seed to random_seed.txt
97+
std::ofstream out(PhysiCell_settings.folder + "/random_seed.txt");
98+
out << physicell_random_seed << std::endl;
99+
out.close();
100+
95101
physicell_PRNG_generator.seed( physicell_random_seed );
96102

97103
// now get number of threads and set up a seed for each thread

0 commit comments

Comments
 (0)