[Openmp-commits] [PATCH] D112597: [OpenMP] libomp: Fix handling of barrier pattern environment variables
Misono Tomohiro via Phabricator via Openmp-commits
openmp-commits at lists.llvm.org
Wed Oct 27 00:35:20 PDT 2021
t-msn created this revision.
Herald added subscribers: guansong, yaxunl.
t-msn added a reviewer: tlwilmar.
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.
Herald added a project: OpenMP.
Hello, this is the first time I submitted a patch and please let me know if I misunderstood something.
It is better to set all barrier patterns to use "dist" when at least
one environment variable specifies "dist". Otherwise if only one
environment is set to "dist" and others left blank inadvertently,
it would result in mixing dist barrier with default hyper barrier
pattern.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D112597
Files:
openmp/runtime/src/kmp_settings.cpp
Index: openmp/runtime/src/kmp_settings.cpp
===================================================================
--- openmp/runtime/src/kmp_settings.cpp
+++ openmp/runtime/src/kmp_settings.cpp
@@ -1753,17 +1753,9 @@
}
}
}
- if ((dist_req == 0) && (non_dist_req != 0)) {
- // Something was set to a barrier other than dist; set all others to hyper
- for (int i = bs_plain_barrier; i < bs_last_barrier; i++) {
- if (__kmp_barrier_release_pattern[i] == bp_dist_bar)
- __kmp_barrier_release_pattern[i] = bp_hyper_bar;
- if (__kmp_barrier_gather_pattern[i] == bp_dist_bar)
- __kmp_barrier_gather_pattern[i] = bp_hyper_bar;
- }
- } else if (non_dist_req != 0) {
- // some requests for dist, plus requests for others; set all to dist
- if (non_dist_req > 0 && dist_req > 0 && warn) {
+ if (dist_req != 0) {
+ // set all barriers to dist
+ if ((non_dist_req != 0) && warn) {
KMP_INFORM(BarrierPatternOverride, name,
__kmp_barrier_pattern_name[bp_dist_bar]);
warn = 0;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D112597.382536.patch
Type: text/x-patch
Size: 1053 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/openmp-commits/attachments/20211027/9efa2546/attachment.bin>
More information about the Openmp-commits
mailing list