diff --git a/openmp/runtime/src/kmp_barrier.cpp b/openmp/runtime/src/kmp_barrier.cpp --- a/openmp/runtime/src/kmp_barrier.cpp +++ b/openmp/runtime/src/kmp_barrier.cpp @@ -1443,6 +1443,8 @@ kmp_flag_64<> flag(&child_bar->b_arrived, new_state); flag.wait(this_thr, FALSE USE_ITT_BUILD_ARG(itt_sync_obj)); if (reduce) { + OMPT_REDUCTION_DECL(this_thr, gtid); + OMPT_REDUCTION_BEGIN; KA_TRACE(100, ("__kmp_hierarchical_barrier_gather: T#%d(%d:%d) += " "T#%d(%d:%d)\n", gtid, team->t.t_id, tid, @@ -1450,6 +1452,7 @@ child_tid)); (*reduce)(this_thr->th.th_local.reduce_data, child_thr->th.th_local.reduce_data); + OMPT_REDUCTION_END; } } } @@ -1472,6 +1475,8 @@ kmp_flag_64<> flag(&child_bar->b_arrived, new_state); flag.wait(this_thr, FALSE USE_ITT_BUILD_ARG(itt_sync_obj)); if (reduce) { + OMPT_REDUCTION_DECL(this_thr, gtid); + OMPT_REDUCTION_BEGIN; KA_TRACE(100, ("__kmp_hierarchical_barrier_gather: T#%d(%d:%d) += " "T#%d(%d:%d)\n", gtid, team->t.t_id, tid, @@ -1479,6 +1484,7 @@ child_tid)); (*reduce)(this_thr->th.th_local.reduce_data, child_thr->th.th_local.reduce_data); + OMPT_REDUCTION_END; } } }