Skip to content

Commit

Permalink
Call final_task() on the current context that has been re-started
Browse files Browse the repository at this point in the history
in the previous fence(), when inside ttg_finalize(), so that
if we're using user-trigger termination detection the parsec_context_wait()
on that context will complete during the call to destroy_worlds().
  • Loading branch information
therault committed Mar 16, 2022
1 parent 7a57338 commit 20dbd01
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions ttg/ttg/parsec/ttg.h
Original file line number Diff line number Diff line change
Expand Up @@ -663,6 +663,10 @@ namespace ttg_parsec {
ttg::detail::set_default_world(std::move(world));
}
inline void ttg_finalize() {
// We need to notify the current taskpool of termination if we are in user termination detection mode
// or the parsec_context_wait() in destroy_worlds() will never complete
if(0 == ttg::default_execution_context().rank())
ttg::default_execution_context().impl().final_task();
ttg::detail::set_default_world(ttg::World{}); // reset the default world
ttg::detail::destroy_worlds<ttg_parsec::WorldImpl>();
MPI_Finalize();
Expand Down

0 comments on commit 20dbd01

Please sign in to comment.