Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions core/PhysiCell_utilities.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -78,18 +78,18 @@ thread_local bool local_pnrg_setup_done = false;
unsigned int physicell_random_seed = 0;
std::vector<unsigned int> 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 <options><random_seed> 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 <options><random_seed> element." << std::endl;
warned = true;
warned_rng = true;
}
std::cout << "Setting up RNG with seed " << physicell_random_seed << std::endl;

Expand Down
5 changes: 2 additions & 3 deletions core/PhysiCell_utilities.h
Original file line number Diff line number Diff line change
Expand Up @@ -80,9 +80,8 @@

namespace PhysiCell{


extern std::vector<unsigned int> physicell_random_seeds;

extern std::vector<unsigned int> physicell_random_seeds;
extern bool warned_rng;
void setup_rng( void );
void SeedRandom( unsigned int input );
void SeedRandom( void );
Expand Down
2 changes: 1 addition & 1 deletion modules/PhysiCell_settings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
1 change: 1 addition & 0 deletions sample_projects/episode/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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(); }
Expand Down
Loading