Skip to content

Commit

Permalink
Generate GUIDS if OpenMP doesn't
Browse files Browse the repository at this point in the history
If the OpenMP runtime doesn't generate per-event guids, generate
our own.
  • Loading branch information
khuck committed Nov 9, 2018
1 parent 1ef5336 commit 3a0ccbc
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/apex/apex_ompt.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,14 @@ class linked_timer {
std::shared_ptr<apex::task_wrapper> &parent,
bool auto_start) :
prev(p), timing(auto_start) {
tw = apex::new_task(name, task_id, parent);
if (auto_start) { this->start(); }
// No GUIDs generated by the runtime? Generate our own.
if (task_id == 0ULL) {
tw = apex::new_task(name);
} else {
tw = apex::new_task(name, task_id, parent);
}
if (auto_start) { this->start();
}
}
/* destructor */
~linked_timer() {
Expand Down

0 comments on commit 3a0ccbc

Please sign in to comment.