diff options
| author | Joachim Protze <protze@itc.rwth-aachen.de> | 2018-05-07 12:42:21 +0000 |
|---|---|---|
| committer | Joachim Protze <protze@itc.rwth-aachen.de> | 2018-05-07 12:42:21 +0000 |
| commit | 9be9cf20bf81b48bbb08b9d324beabd6a7785889 (patch) | |
| tree | b36ef2ac906f38c6ed1dd0f731151a6e532386ff /openmp/runtime/src/kmp_csupport.cpp | |
| parent | 8fc39f6b19a98838b590462a3d37cebc060c6796 (diff) | |
| download | bcm5719-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_csupport.cpp')
| -rw-r--r-- | openmp/runtime/src/kmp_csupport.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/openmp/runtime/src/kmp_csupport.cpp b/openmp/runtime/src/kmp_csupport.cpp index 61a8c89fdf1..6bbae57ea71 100644 --- a/openmp/runtime/src/kmp_csupport.cpp +++ b/openmp/runtime/src/kmp_csupport.cpp @@ -486,7 +486,7 @@ void __kmpc_end_serialized_parallel(ident_t *loc, kmp_int32 global_tid) { if (ompt_enabled.ompt_callback_implicit_task) { ompt_callbacks.ompt_callback(ompt_callback_implicit_task)( ompt_scope_end, NULL, OMPT_CUR_TASK_DATA(this_thr), 1, - __kmp_tid_from_gtid(global_tid)); + OMPT_CUR_TASK_INFO(this_thr)->thread_num); } // reset clear the task id only after unlinking the task |

