[Openmp-commits] [PATCH] D123195: [OpenMP] libomp: Fix dist barrier for nested parallel/team
Misono Tomohiro via Phabricator via Openmp-commits
openmp-commits at lists.llvm.org
Wed Apr 6 02:30:25 PDT 2022
t-msn created this revision.
Herald added subscribers: guansong, yaxunl.
Herald added a project: All.
t-msn added a reviewer: tlwilmar.
t-msn added a project: OpenMP.
t-msn added a subscriber: openmp-commits.
t-msn published this revision for review.
t-msn added a comment.
Herald added a reviewer: jdoerfert.
Herald added a subscriber: sstefan1.
I noticed this when running check-openmp with dist barrier by using https://reviews.llvm.org/D122645
btw, it seems parallel tests run does not work when using dist barrier, but I couldn't figure out the reason.
Some code path in nested parallelism miss updates for dist barrier
which could lead hang. Add appropriate function calls.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D123195
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
@@ -1002,6 +1002,9 @@
}
}
}
+ if (__kmp_barrier_release_pattern[bs_forkjoin_barrier] == bp_dist_bar) {
+ __kmp_add_threads_to_team(team, team->t.t_nproc);
+ }
#if KMP_AFFINITY_SUPPORTED
// Do not partition the places list for teams construct workers who
@@ -2529,6 +2532,10 @@
}
}
}
+ if (__kmp_barrier_release_pattern[bs_forkjoin_barrier] == bp_dist_bar) {
+ // Reset barrier status
+ __kmp_resize_dist_barrier(team, team->t.t_nproc, team->t.t_nproc);
+ }
#if OMPT_SUPPORT
if (ompt_enabled.enabled) {
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D123195.420747.patch
Type: text/x-patch
Size: 775 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/openmp-commits/attachments/20220406/07ed964b/attachment.bin>
More information about the Openmp-commits
mailing list