[Openmp-commits] [openmp] r225793 - small fixes to the hierarchical barrier
Andrey Churbanov
Andrey.Churbanov at intel.com
Tue Jan 13 06:47:02 PST 2015
Author: achurbanov
Date: Tue Jan 13 08:47:02 2015
New Revision: 225793
URL: http://llvm.org/viewvc/llvm-project?rev=225793&view=rev
Log:
small fixes to the hierarchical barrier
Modified:
openmp/trunk/runtime/src/kmp_barrier.cpp
Modified: openmp/trunk/runtime/src/kmp_barrier.cpp
URL: http://llvm.org/viewvc/llvm-project/openmp/trunk/runtime/src/kmp_barrier.cpp?rev=225793&r1=225792&r2=225793&view=diff
==============================================================================
--- openmp/trunk/runtime/src/kmp_barrier.cpp (original)
+++ openmp/trunk/runtime/src/kmp_barrier.cpp Tue Jan 13 08:47:02 2015
@@ -834,6 +834,9 @@ __kmp_hierarchical_barrier_gather(enum b
KA_TRACE(20, ("__kmp_hierarchical_barrier_gather: T#%d(%d:%d) set team %d arrived(%p) = %u\n",
gtid, team->t.t_id, tid, team->t.t_id, &team->t.t_bar[bt].b_arrived, team->t.t_bar[bt].b_arrived));
}
+ // If nested, but outer level is top-level, resume use of oncore optimization
+ if (this_thr->th.th_team->t.t_level <=2) thr_bar->use_oncore_barrier = 1;
+ else thr_bar->use_oncore_barrier = 0;
// Is the team access below unsafe or just technically invalid?
KA_TRACE(20, ("__kmp_hierarchical_barrier_gather: T#%d(%d:%d) exit for barrier type %d\n",
gtid, team->t.t_id, tid, bt));
@@ -896,7 +899,7 @@ __kmp_hierarchical_barrier_release(enum
KMP_MB(); // Flush all pending memory write invalidates.
}
- if (this_thr->th.th_team->t.t_level == 1) thr_bar->use_oncore_barrier = 1;
+ if (this_thr->th.th_team->t.t_level <= 1) thr_bar->use_oncore_barrier = 1;
else thr_bar->use_oncore_barrier = 0;
nproc = this_thr->th.th_team_nproc;
More information about the Openmp-commits
mailing list