[Openmp-commits] [openmp] [OpenMP] Sync the team task for serialized parallel (PR #85600)

via Openmp-commits openmp-commits at lists.llvm.org
Mon Mar 18 11:49:14 PDT 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 8e5de66af3da8c2fc79b8fe2cbc26f94b677434d 51d848954d2e9067c41851002fca9af9d4f62276 -- openmp/runtime/test/tasking/bug_81488.c openmp/runtime/src/kmp_barrier.cpp
``````````

</details>

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

``````````diff
diff --git a/openmp/runtime/test/tasking/bug_81488.c b/openmp/runtime/test/tasking/bug_81488.c
index 853a0e5e3e..031c1afd90 100644
--- a/openmp/runtime/test/tasking/bug_81488.c
+++ b/openmp/runtime/test/tasking/bug_81488.c
@@ -4,30 +4,29 @@
 /*
 https://github.com/llvm/llvm-project/issues/81488
 
-Assertion failure at kmp_runtime.cpp(2460): master_th->th.th_task_team == team->t.t_task_team[master_th->th.th_task_state].
-OMP: Error #13: Assertion failure at kmp_runtime.cpp(2460).
+Assertion failure at kmp_runtime.cpp(2460): master_th->th.th_task_team ==
+team->t.t_task_team[master_th->th.th_task_state]. OMP: Error #13: Assertion
+failure at kmp_runtime.cpp(2460).
 
 The assertion fails with OMP_NUM_THREADS=1.
 
 */
 
-# include <omp.h>
+#include <omp.h>
 
-# define Nz  8
-# define DEVICE_ID  0
+#define Nz 8
+#define DEVICE_ID 0
 
-int
-main(void)
-{
-    # pragma omp parallel
+int main(void) {
+#pragma omp parallel
+  {
+#pragma omp single
     {
-        # pragma omp single
-        {
-            # pragma omp target teams distribute parallel for nowait device(DEVICE_ID)
-            for (int i = 0 ; i < Nz ; ++i)
-                {}
-        }
-        # pragma omp barrier
+#pragma omp target teams distribute parallel for nowait device(DEVICE_ID)
+      for (int i = 0; i < Nz; ++i) {
+      }
     }
-    return 0;
+#pragma omp barrier
+  }
+  return 0;
 }
\ No newline at end of file

``````````

</details>


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


More information about the Openmp-commits mailing list