Skip to content

Commit

Permalink
#1942: add isActive() for other epochs
Browse files Browse the repository at this point in the history
  • Loading branch information
stmcgovern committed Sep 27, 2022
1 parent d4afc7b commit 86278ca
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/vt/termination/termination.cc
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ TerminationDetector::getDSTerm(EpochType epoch, bool is_root) {
}

void TerminationDetector::maybePropagate() {
if (any_epoch_state_.readySubmitParent()) {
if (any_epoch_state_.isActive() and any_epoch_state_.readySubmitParent()) {
propagateEpoch(any_epoch_state_);
}

Expand All @@ -181,7 +181,7 @@ void TerminationDetector::maybePropagate() {
}

for (auto&& state : epoch_state_) {
if (state.second.readySubmitParent()) {
if (state.second.isActive() and state.second.readySubmitParent()) {
propagateEpoch(state.second);
}
}
Expand All @@ -202,7 +202,7 @@ void TerminationDetector::propagateEpochExternalState(

state.notifyChildReceive();

if (state.readySubmitParent()) {
if (state.isActive() and state.readySubmitParent()) {
propagateEpoch(state);
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/vt/termination/termination.impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ inline void TerminationDetector::produceConsumeState(
print_bool(produce)
);

if (state.readySubmitParent()) {
if (state.isActive() and state.readySubmitParent()) {
propagateEpoch(state);
}
}
Expand Down

0 comments on commit 86278ca

Please sign in to comment.