Open
Conversation
more robust macro to check for windows
1.14.2 release
…ssage 'WARNING: Setting the random seed again.' when models in consecutive episodes are run.
There was a problem hiding this comment.
Pull Request Overview
This PR refactors the random seed warning behavior by promoting the warned_rng variable to a global scope to allow controlled suppression of the warning when running consecutive episodes. It also updates the platform macro check for directory creation on Windows.
- Promotes warned_rng to a global variable to manage warning behavior.
- Updates preprocessor directives for Windows platform checks.
- Adjusts configuration file processing in episode projects.
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| sample_projects/episode/main.cpp | Sets warned_rng to true to suppress redundant RNG warning |
| modules/PhysiCell_settings.cpp | Updates Windows macro detection for directory creation |
| core/PhysiCell_utilities.h | Declares warned_rng globally instead of using local/static variable |
| core/PhysiCell_utilities.cpp | Replaces static warned with the global warned_rng variable |
Comments suppressed due to low confidence (2)
sample_projects/episode/main.cpp:163
- Consider adding a brief comment explaining why warned_rng is set to true here to suppress the RNG warning, clarifying that this is intended for consecutive episode runs.
warned_rng = true;
modules/PhysiCell_settings.cpp:360
- Verify that replacing the previous mingw-specific conditions with _WIN32 covers all intended Windows scenarios, including MinGW builds, to prevent any potential platform-specific regressions.
#if defined(_WIN32)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Take warned_rng variable global to be able to suppress the mislead message 'WARNING: Setting the random seed again.' when models in consecutive episodes are run.
This issue was discussed with @drbergman on slack 2025-05-22: