-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CarpetX: CarpetX errors out when it cycles time levels if those levels are not valid everywhere. #328
base: main
Are you sure you want to change the base?
Conversation
…s are not valid everywhere. This breaks code using presync. This commit causes CarpetX to sync these grid functions instead of erroring out. Co-authored-by: Max Morris <[email protected]>
for (int vi = 0; vi < groupdata.numvars; ++vi) | ||
bool presync_only = CCTK_EQUALS(presync_mode, "presync-only"); | ||
if (presync_only && groupdata.do_checkpoint) { | ||
std::set<int> sync_set; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A std::vector<bool>(CCTK_Num_Groups())
would probably be faster.
} | ||
// check that what we have is correct | ||
if (groupdata.do_checkpoint) { | ||
std::set<int> sync_set; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems unused.
std::set<int> sync_set; | ||
for (int tl = (ntls == 1 ? 0 : 1); tl < ntls; ++tl) { | ||
for (int vi = 0; vi < groupdata.numvars; ++vi) { | ||
sync_set.insert(gi); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's weird. You insert the same number into the set several times.
If I understand, this patch adds code before cycling time levels in presync mode. Is that correct? It doesn't change existing code? |
CarpetX: CarpetX errors out when it cycles time levels if those levels are not valid everywhere.
This breaks code using presync-only.
This commit causes CarpetX to sync these grid functions (if presync-only is enabled) instead of erroring out.