diff --git a/core/PhysiCell_utilities.cpp b/core/PhysiCell_utilities.cpp index 91f0cd582..316404856 100644 --- a/core/PhysiCell_utilities.cpp +++ b/core/PhysiCell_utilities.cpp @@ -78,18 +78,18 @@ thread_local bool local_pnrg_setup_done = false; unsigned int physicell_random_seed = 0; std::vector physicell_random_seeds; +bool warned_rng = false; void setup_rng( void ) { static bool setup_done = false; - static bool warned = false; - if (!warned && setup_done) + if (!warned_rng && setup_done) { std::cout << "WARNING: Setting the random seed again." << std::endl << "\tYou probably have set a user parameter called random_seed." << std::endl << "\tHere, we will use the random seed set in user parameters." << std::endl << "\tHOWEVER, as of PhysiCell 1.14.0, you should set the random seed in the element in the config file." << std::endl << "\tFuture versions of PhysiCell may throw an error here. Kindly remove the user parameter and just use the element." << std::endl; - warned = true; + warned_rng = true; } std::cout << "Setting up RNG with seed " << physicell_random_seed << std::endl; diff --git a/core/PhysiCell_utilities.h b/core/PhysiCell_utilities.h index 7e4ec1548..199134ef1 100644 --- a/core/PhysiCell_utilities.h +++ b/core/PhysiCell_utilities.h @@ -80,9 +80,8 @@ namespace PhysiCell{ - - extern std::vector physicell_random_seeds; - +extern std::vector physicell_random_seeds; +extern bool warned_rng; void setup_rng( void ); void SeedRandom( unsigned int input ); void SeedRandom( void ); diff --git a/modules/PhysiCell_settings.cpp b/modules/PhysiCell_settings.cpp index 538f6a8ea..09fd77158 100644 --- a/modules/PhysiCell_settings.cpp +++ b/modules/PhysiCell_settings.cpp @@ -357,7 +357,7 @@ bool create_directories(const std::string &path) bool create_directory(const std::string &path) { -#if defined(__MINGW32__) || defined(__MINGW64__) +#if defined(_WIN32) bool success = mkdir(path.c_str()) == 0; #else bool success = mkdir(path.c_str(), 0755) == 0; diff --git a/sample_projects/episode/main.cpp b/sample_projects/episode/main.cpp index 2f32cb696..f6cf70e11 100644 --- a/sample_projects/episode/main.cpp +++ b/sample_projects/episode/main.cpp @@ -160,6 +160,7 @@ int main( int argc, char* argv[] ) { // load xml file std::cout << "load setting xml " << settingxml << " ..." << std::endl; + warned_rng = true; bool XML_status = false; XML_status = read_PhysiCell_config_file( settingxml ); if ( XML_status ) { PhysiCell_settings.read_from_pugixml(); }