[Openmp-commits] [PATCH] D41176: [OMPT] Fix ompt_task_data handling in implicit barriers

Simon Convent via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Wed Dec 13 05:11:40 PST 2017


sconvent created this revision.
sconvent added reviewers: protze.joachim, Hahnfeld, jlpeyton.

Solves Issue 39 <https://github.com/OpenMPToolsInterface/LLVM-openmp/issues/39>


https://reviews.llvm.org/D41176

Files:
  runtime/src/kmp_barrier.cpp
  runtime/src/kmp_runtime.cpp


Index: runtime/src/kmp_runtime.cpp
===================================================================
--- runtime/src/kmp_runtime.cpp
+++ runtime/src/kmp_runtime.cpp
@@ -5669,7 +5669,6 @@
         __ompt_get_task_info_object(0)->frame.exit_frame = NULL;
 
         this_thr->th.ompt_thread_info.state = omp_state_overhead;
-        this_thr->th.ompt_thread_info.task_data = *OMPT_CUR_TASK_DATA(this_thr);
       }
 #endif
       /* join barrier after parallel region */
Index: runtime/src/kmp_barrier.cpp
===================================================================
--- runtime/src/kmp_barrier.cpp
+++ runtime/src/kmp_barrier.cpp
@@ -1624,6 +1624,8 @@
           my_task_data, codeptr);
     }
 #endif
+    if (!KMP_MASTER_TID(ds_tid))
+      this_thr->th.ompt_thread_info.task_data = *OMPT_CUR_TASK_DATA(this_thr);
     this_thr->th.ompt_thread_info.state = omp_state_wait_barrier_implicit;
   }
 #endif


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D41176.126736.patch
Type: text/x-patch
Size: 913 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/openmp-commits/attachments/20171213/8c948f49/attachment.bin>


More information about the Openmp-commits mailing list