Skip to content

Commit

Permalink
Merge pull request #1929 from DARMA-tasking/1915-cache-td-pointer-in-…
Browse files Browse the repository at this point in the history
…scheduler-triggers

1915 Cache TD pointer
  • Loading branch information
PhilMiller authored Aug 24, 2022
2 parents 71c1f28 + 8d9d00c commit ff3ec68
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/vt/runtime/runtime.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1027,22 +1027,23 @@ void Runtime::initializeWorkers(WorkerCountType const num_workers) {
// Without workers running on the node, the termination detector should
// enable/disable the global collective epoch based on the state of the
// scheduler; register listeners to activate/deactivate that epoch
auto td = vt::theTerm();
theSched->registerTrigger(
sched::SchedulerEvent::BeginIdleMinusTerm, []{
sched::SchedulerEvent::BeginIdleMinusTerm, [td]{
vt_debug_print(
normal, runtime,
"setLocalTerminated: BeginIdle: true\n"
);
vt::theTerm()->setLocalTerminated(true, false);
td->setLocalTerminated(true, false);
}
);
theSched->registerTrigger(
sched::SchedulerEvent::EndIdleMinusTerm, []{
sched::SchedulerEvent::EndIdleMinusTerm, [td]{
vt_debug_print(
normal, runtime,
"setLocalTerminated: EndIdle: false\n"
);
vt::theTerm()->setLocalTerminated(false, false);
td->setLocalTerminated(false, false);
}
);
}
Expand Down

0 comments on commit ff3ec68

Please sign in to comment.