[Openmp-commits] [PATCH] D16714: [OMPT] Fix wrong parent_task_id in serialized parallel_begin with GCC

Jonas Hahnfeld via Openmp-commits openmp-commits at lists.llvm.org
Mon Mar 21 05:43:00 PDT 2016


This revision was automatically updated to reflect the committed changes.
Closed by commit rL263940: [OMPT] Fix wrong parent_task_id in serialized parallel_begin with GCC (authored by Hahnfeld).

Changed prior to commit:
  http://reviews.llvm.org/D16714?vs=47002&id=51151#toc

Repository:
  rL LLVM

http://reviews.llvm.org/D16714

Files:
  openmp/trunk/runtime/src/kmp_gsupport.c

Index: openmp/trunk/runtime/src/kmp_gsupport.c
===================================================================
--- openmp/trunk/runtime/src/kmp_gsupport.c
+++ openmp/trunk/runtime/src/kmp_gsupport.c
@@ -384,27 +384,32 @@
 static void
 __kmp_GOMP_serialized_parallel(ident_t *loc, kmp_int32 gtid, void (*task)(void *))
 {
-    __kmp_serialized_parallel(loc, gtid);
-
 #if OMPT_SUPPORT
+    ompt_parallel_id_t ompt_parallel_id;
     if (ompt_enabled) {
-        ompt_task_id_t ompt_task_id = __ompt_get_task_id_internal(0);
-        ompt_frame_t  *ompt_frame = __ompt_get_task_frame_internal(0);
-        kmp_info_t *thr = __kmp_threads[gtid];
-
-        ompt_parallel_id_t ompt_parallel_id = __ompt_parallel_id_new(gtid);
-        ompt_task_id_t my_ompt_task_id = __ompt_task_id_new(gtid);
+        ompt_task_info_t *task_info = __ompt_get_taskinfo(0);
+        task_info->frame.exit_runtime_frame = NULL;
 
-        ompt_frame->exit_runtime_frame = NULL;
+        ompt_parallel_id = __ompt_parallel_id_new(gtid);
 
         // parallel region callback
         if (ompt_callbacks.ompt_callback(ompt_event_parallel_begin)) {
             int team_size = 1;
             ompt_callbacks.ompt_callback(ompt_event_parallel_begin)(
-                ompt_task_id, ompt_frame, ompt_parallel_id,
+                task_info->task_id, &task_info->frame, ompt_parallel_id,
                 team_size, (void *) task,
                 OMPT_INVOKER(fork_context_gnu));
         }
+    }
+#endif
+
+    __kmp_serialized_parallel(loc, gtid);
+
+#if OMPT_SUPPORT
+    if (ompt_enabled) {
+        kmp_info_t *thr = __kmp_threads[gtid];
+
+        ompt_task_id_t my_ompt_task_id = __ompt_task_id_new(gtid);
 
         // set up lightweight task
         ompt_lw_taskteam_t *lwt = (ompt_lw_taskteam_t *)


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D16714.51151.patch
Type: text/x-patch
Size: 1788 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/openmp-commits/attachments/20160321/a5906385/attachment.bin>


More information about the Openmp-commits mailing list