Skip to content
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

#2197: Queue epoch actions before notifying successors #2359

Draft
wants to merge 1 commit into
base: develop
Choose a base branch
from
Draft
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: 4 additions & 2 deletions src/vt/termination/term_action.cc
Original file line number Diff line number Diff line change
Expand Up @@ -115,8 +115,11 @@ void TermAction::addActionEpoch(EpochType const& epoch, ActionType action) {
return addAction(action);
} else {
auto encapsulated_epoch = getCurrentEpoch();
theTerm()->produce(encapsulated_epoch);
epoch_actions_[epoch][encapsulated_epoch].push_back(action);

if (encapsulated_epoch != term::any_epoch_sentinel) {
theTerm()->addDependency(epoch, encapsulated_epoch);
}
}
afterAddEpochAction(epoch);
}
Expand All @@ -134,7 +137,6 @@ void TermAction::triggerAllEpochActions(
if (auto iter2 = iter->second.find(encapsulated_epoch);
iter2 != iter->second.end()) {
for (auto&& action : iter2->second) {
theTerm()->consume(encapsulated_epoch);
action();
}
iter->second.erase(iter2);
Expand Down
6 changes: 3 additions & 3 deletions src/vt/termination/termination.cc
Original file line number Diff line number Diff line change
Expand Up @@ -649,6 +649,9 @@ void TerminationDetector::epochTerminated(EpochType const& epoch, CallFromEnum f
epoch, isRooted(epoch), isDS(epoch), from == CallFromEnum::Root ? true : false
);

// Trigger actions associated with epoch
queueActions(epoch);

// Clear all the successor epochs that are nested by this epoch (waiting on it
// to complete)
if (epoch != term::any_epoch_sentinel) {
Expand All @@ -658,9 +661,6 @@ void TerminationDetector::epochTerminated(EpochType const& epoch, CallFromEnum f
}
}

// Trigger actions associated with epoch
queueActions(epoch);

// Update the window for the epoch archetype
updateResolvedEpochs(epoch);

Expand Down