[Openmp-commits] [openmp] [OpenMP] Fix distributed barrier hang for OMP_WAIT_POLICY=passive (PR #83058)

via Openmp-commits openmp-commits at lists.llvm.org
Mon Feb 26 12:58:15 PST 2024


github-actions[bot] wrote:

<!--LLVM CODE FORMAT COMMENT: {clang-format}-->


:warning: C/C++ code formatter, clang-format found issues in your code. :warning:

<details>
<summary>
You can test this locally with the following command:
</summary>

``````````bash
git-clang-format --diff 6a884a9aef397f76178b141d789efadf280f2c3f d10e1b505a4cbd7632d2bc83de9a00a2cc83b9c2 -- openmp/runtime/test/barrier/llvm-issue-80664.c openmp/runtime/src/kmp_runtime.cpp
``````````

</details>

<details>
<summary>
View the diff from clang-format here.
</summary>

``````````diff
diff --git a/openmp/runtime/test/barrier/llvm-issue-80664.c b/openmp/runtime/test/barrier/llvm-issue-80664.c
index c56052eafb..071c1f45e3 100644
--- a/openmp/runtime/test/barrier/llvm-issue-80664.c
+++ b/openmp/runtime/test/barrier/llvm-issue-80664.c
@@ -1,8 +1,10 @@
 // RUN: %libomp-compile
-// RUN: env OMP_WAIT_POLICY=passive KMP_FORKJOIN_BARRIER_PATTERN='linear,linear' %libomp-run
-// RUN: env OMP_WAIT_POLICY=passive KMP_FORKJOIN_BARRIER_PATTERN='tree,tree' %libomp-run
-// RUN: env OMP_WAIT_POLICY=passive KMP_FORKJOIN_BARRIER_PATTERN='hyper,hyper' %libomp-run
-// RUN: env OMP_WAIT_POLICY=passive KMP_FORKJOIN_BARRIER_PATTERN='dist,dist' %libomp-run
+// RUN: env OMP_WAIT_POLICY=passive KMP_FORKJOIN_BARRIER_PATTERN='linear,linear'
+// %libomp-run RUN: env OMP_WAIT_POLICY=passive
+// KMP_FORKJOIN_BARRIER_PATTERN='tree,tree' %libomp-run RUN: env
+// OMP_WAIT_POLICY=passive KMP_FORKJOIN_BARRIER_PATTERN='hyper,hyper'
+// %libomp-run RUN: env OMP_WAIT_POLICY=passive
+// KMP_FORKJOIN_BARRIER_PATTERN='dist,dist' %libomp-run
 //
 // LLVM ISSUE 80664: https://github.com/llvm/llvm-project/issues/80664
 //
@@ -15,13 +17,12 @@
 
 int a = 0;
 
-void test_omp_barrier()
-{
-  #pragma omp parallel
+void test_omp_barrier() {
+#pragma omp parallel
   {
-    #pragma omp task
+#pragma omp task
     {
-      #pragma omp atomic
+#pragma omp atomic
       a++;
     }
   }

``````````

</details>


https://github.com/llvm/llvm-project/pull/83058


More information about the Openmp-commits mailing list