Fix OMPT state maintenance for barriers and missing init of implicit task id.
authorJonathan Peyton <jonathan.l.peyton@intel.com>
Mon, 29 Jun 2015 17:28:57 +0000 (17:28 +0000)
committerJonathan Peyton <jonathan.l.peyton@intel.com>
Mon, 29 Jun 2015 17:28:57 +0000 (17:28 +0000)
commit117a94ff9d12d4fbf1ff81cea9f69154ecf831bb
tree4e12ec64f529fb03954cec143d817db89e0663be
parentcdfea9a7a72898a4fbbfa0cbfa9f7fef25ece04d
Fix OMPT state maintenance for barriers and missing init of implicit task id.

Fix OMPT support for barriers so that state changes occur even if OMPT_TRACE turned off.
These state changes are needed by performance tools that use callbacks for either
ompt_event_wait_barrier_begin or ompt_event_wait_barrier_end.  Change ifdef flag to OMPT_BLAME
for callbacks ompt_event_wait_barrier_begin or ompt_event_wait_barrier_end rather than
OMPT_TRACE -- they were misclassified.  Without this patch, when the runtime is compiled with
LIBOMP_OMPT_SUPPORT=true, LIBOMP_OMPT_BLAME=true, and LIBOMP_OMPT_TRACE=false, and a callback
is registered for either ompt_event_wait_barrier_begin or ompt_event_wait_barrier_end, then an
assertion will trip.  Fix the scoping of one OMPT_TRACE ifdef, which should not have surrounded
an update of an OMPT state.  Add a missing initialization of an OMPT task id for an implicit task.

Patch by John Mellor-Crummey

Differential Revision: http://reviews.llvm.org/D10759

llvm-svn: 240970
openmp/runtime/src/kmp_barrier.cpp
openmp/runtime/src/kmp_runtime.c