This is an archive of the discontinued LLVM Phabricator instance.

Fix OMPT state maintenance for barriers in OpenMP runtime. Fix missing initialization of implicit task id.
ClosedPublic

Authored by jmellorcrummey on Jun 25 2015, 8:22 PM.

Details

Summary

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.

Diff Detail

Repository
rL LLVM

Event Timeline

jmellorcrummey retitled this revision from to Fix OMPT state maintenance for barriers in OpenMP runtime.
jmellorcrummey updated this object.
jmellorcrummey edited the test plan for this revision. (Show Details)
jmellorcrummey added a subscriber: Unknown Object (MLST).Jun 25 2015, 8:27 PM
jmellorcrummey set the repository for this revision to rL LLVM.
jmellorcrummey added a subscriber: Unknown Object (MLST).

I am adding a comment to trigger reposting of this patch. I forgot to join openmp-commits before submitting this patch.

jmellorcrummey updated this object.
jmellorcrummey edited the test plan for this revision. (Show Details)
jmellorcrummey edited reviewers, added: jcownie; removed: jlpeyton.
jmellorcrummey removed rL LLVM as the repository for this revision.
jmellorcrummey retitled this revision from Fix OMPT state maintenance for barriers in OpenMP runtime to Fix OMPT state maintenance for barriers in OpenMP runtime. Fix missing initialization of implicit task id..
jmellorcrummey set the repository for this revision to rL LLVM.Jun 27 2015, 2:18 PM

Patch to correct handling of OMPT states and implicit task ids. I'm a newbie committer to LLVM, so any comments about how to accelerate getting this commit accepted would be appreciated.

This revision was automatically updated to reflect the committed changes.