[Openmp-commits] [PATCH] D141618: [OpenMP] Fix for distributed barrier
Terry Wilmarth via Phabricator via Openmp-commits
openmp-commits at lists.llvm.org
Thu Jan 12 08:37:44 PST 2023
tlwilmar created this revision.
tlwilmar added reviewers: jlpeyton, Nawrin.
tlwilmar added a project: OpenMP.
Herald added subscribers: guansong, yaxunl.
Herald added a project: All.
tlwilmar requested review of this revision.
Herald added a reviewer: jdoerfert.
Herald added a subscriber: sstefan1.
Distributed barrier was found to cause hangs in some test cases. Found that a section updating the barrier size was improperly shifted to a different code section during patching. Restored to original location, all tests run to completion.
Repository:
rOMP OpenMP
https://reviews.llvm.org/D141618
Files:
openmp/runtime/src/kmp_runtime.cpp
Index: openmp/runtime/src/kmp_runtime.cpp
===================================================================
--- openmp/runtime/src/kmp_runtime.cpp
+++ openmp/runtime/src/kmp_runtime.cpp
@@ -1011,6 +1011,12 @@
__kmp_partition_places(team);
}
#endif
+
+ if (team->t.t_nproc > 1 &&
+ __kmp_barrier_gather_pattern[bs_forkjoin_barrier] == bp_dist_bar) {
+ team->t.b->update_num_threads(team->t.t_nproc);
+ __kmp_add_threads_to_team(team, team->t.t_nproc);
+ }
}
if (__kmp_display_affinity && team->t.t_display_affinity != 1) {
@@ -2479,12 +2485,6 @@
parent_team->t.t_stack_id = NULL;
}
#endif
-
- if (team->t.t_nproc > 1 &&
- __kmp_barrier_gather_pattern[bs_forkjoin_barrier] == bp_dist_bar) {
- team->t.b->update_num_threads(team->t.t_nproc);
- __kmp_add_threads_to_team(team, team->t.t_nproc);
- }
}
KMP_MB();
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D141618.488669.patch
Type: text/x-patch
Size: 897 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/openmp-commits/attachments/20230112/256f19e4/attachment.bin>
More information about the Openmp-commits
mailing list