[Openmp-commits] [PATCH] D23259: kmp_gsupport: Fix library initialization with taskgroup
Jonas Hahnfeld via Openmp-commits
openmp-commits at lists.llvm.org
Mon Aug 8 06:31:10 PDT 2016
This revision was automatically updated to reflect the committed changes.
Hahnfeld marked an inline comment as done.
Closed by commit rL278003: kmp_gsupport: Fix library initialization with taskgroup (authored by Hahnfeld).
Changed prior to commit:
https://reviews.llvm.org/D23259?vs=67146&id=67153#toc
Repository:
rL LLVM
https://reviews.llvm.org/D23259
Files:
openmp/trunk/runtime/src/kmp_gsupport.c
openmp/trunk/runtime/test/tasking/bug_serial_taskgroup.c
Index: openmp/trunk/runtime/test/tasking/bug_serial_taskgroup.c
===================================================================
--- openmp/trunk/runtime/test/tasking/bug_serial_taskgroup.c
+++ openmp/trunk/runtime/test/tasking/bug_serial_taskgroup.c
@@ -0,0 +1,16 @@
+// RUN: %libomp-compile-and-run
+
+/*
+ GCC failed this test because __kmp_get_gtid() instead of __kmp_entry_gtid()
+ was called in xexpand(KMP_API_NAME_GOMP_TASKGROUP_START)(void).
+ __kmp_entry_gtid() will initialize the runtime if not yet done which does not
+ happen with __kmp_get_gtid().
+ */
+
+int main()
+{
+ #pragma omp taskgroup
+ { }
+
+ return 0;
+}
Index: openmp/trunk/runtime/src/kmp_gsupport.c
===================================================================
--- openmp/trunk/runtime/src/kmp_gsupport.c
+++ openmp/trunk/runtime/src/kmp_gsupport.c
@@ -1259,7 +1259,7 @@
void
xexpand(KMP_API_NAME_GOMP_TASKGROUP_START)(void)
{
- int gtid = __kmp_get_gtid();
+ int gtid = __kmp_entry_gtid();
MKLOC(loc, "GOMP_taskgroup_start");
KA_TRACE(20, ("GOMP_taskgroup_start: T#%d\n", gtid));
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D23259.67153.patch
Type: text/x-patch
Size: 1100 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/openmp-commits/attachments/20160808/720b88e2/attachment-0001.bin>
More information about the Openmp-commits
mailing list