summaryrefslogtreecommitdiffstats
path: root/openmp/runtime/src/kmp_gsupport.cpp
diff options
context:
space:
mode:
authorJoachim Protze <protze@itc.rwth-aachen.de>2018-05-07 12:42:21 +0000
committerJoachim Protze <protze@itc.rwth-aachen.de>2018-05-07 12:42:21 +0000
commit9be9cf20bf81b48bbb08b9d324beabd6a7785889 (patch)
treeb36ef2ac906f38c6ed1dd0f731151a6e532386ff /openmp/runtime/src/kmp_gsupport.cpp
parent8fc39f6b19a98838b590462a3d37cebc060c6796 (diff)
downloadbcm5719-llvm-9be9cf20bf81b48bbb08b9d324beabd6a7785889.tar.gz
bcm5719-llvm-9be9cf20bf81b48bbb08b9d324beabd6a7785889.zip
[OMPT] Fix thread_num for implicit_task_end callbacks in nested parallel regions
implicit_task_end callbacks in nested parallel regions did not always give the correct thread_num, since the inner parallel region may have already been finalized. Now, the thread_num is stored at the beginning of the implicit task and retrieved at the end, whenever necessary. A testcase was added as well. Differential Revision: https://reviews.llvm.org/D46260 llvm-svn: 331632
Diffstat (limited to 'openmp/runtime/src/kmp_gsupport.cpp')
-rw-r--r--openmp/runtime/src/kmp_gsupport.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/openmp/runtime/src/kmp_gsupport.cpp b/openmp/runtime/src/kmp_gsupport.cpp
index b1923e307e1..be645e21d3c 100644
--- a/openmp/runtime/src/kmp_gsupport.cpp
+++ b/openmp/runtime/src/kmp_gsupport.cpp
@@ -401,6 +401,7 @@ static
ompt_callbacks.ompt_callback(ompt_callback_implicit_task)(
ompt_scope_begin, &(team_info->parallel_data),
&(task_info->task_data), ompt_team_size, __kmp_tid_from_gtid(gtid));
+ task_info->thread_num = __kmp_tid_from_gtid(gtid);
}
thr->th.ompt_thread_info.state = omp_state_work_parallel;
}
OpenPOWER on IntegriCloud