Skip to content

Commit

Permalink
Fixing a bug in OMPT support where openmp regions happen after finali…
Browse files Browse the repository at this point in the history
…ze - the kokkos runtime uses openmp regions in destructors.
  • Loading branch information
khuck committed Dec 8, 2023
1 parent 664e6c2 commit 4c15ec2
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/apex/apex_ompt.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,12 @@ class linked_timer {
} else {
tw = apex::new_task(name, task_id, parent);
}
if (is_par_reg) { tw->explicit_trace_start = true; }
if (auto_start) { this->start(); }
if (tw != nullptr) {
if (is_par_reg) { tw->explicit_trace_start = true; }
if (auto_start) { this->start(); }
} else {
timing = false;
}
}
/* destructor */
~linked_timer() {
Expand Down

0 comments on commit 4c15ec2

Please sign in to comment.