[Openmp-commits] [PATCH] D112861: [OpenMP][DeviceRTL] Fixed an issue that causes hang in SU3

Shilei Tian via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Sat Oct 30 11:44:45 PDT 2021


This revision was automatically updated to reflect the committed changes.
Closed by commit rG025f54924014: [OpenMP][DeviceRTL] Fixed an issue that causes hang in SU3 (authored by tianshilei1992).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D112861/new/

https://reviews.llvm.org/D112861

Files:
  openmp/libomptarget/DeviceRTL/src/Parallelism.cpp


Index: openmp/libomptarget/DeviceRTL/src/Parallelism.cpp
===================================================================
--- openmp/libomptarget/DeviceRTL/src/Parallelism.cpp
+++ openmp/libomptarget/DeviceRTL/src/Parallelism.cpp
@@ -123,6 +123,11 @@
       synchronize::threadsAligned();
     }
 
+    // Synchronize all threads to make sure every thread exits the scope above;
+    // otherwise the following assertions and the assumption in
+    // __kmpc_target_deinit may not hold.
+    synchronize::threadsAligned();
+
     ASSERT(state::ParallelTeamSize == 1u);
     ASSERT(icv::ActiveLevel == 0u);
     ASSERT(icv::Level == 0u);


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D112861.383611.patch
Type: text/x-patch
Size: 640 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/openmp-commits/attachments/20211030/d0f63738/attachment.bin>


More information about the Openmp-commits mailing list