Patches to support OMPT

Hi all!

After some months of work, we would like to share our patches to add support
for OMPT[1] to this version of the Intel runtime.
Implementation was mainly done by John Mellor-Crummey from Rice University
in a repository at Google Code[2].

Support for OMPT is disabled by default and therefore has to be enabled
explicitly:
With CMake, define "ompt-support": $ cmake -Dompt-support=true ..
build.pl works nearly the same: $ make build_args="--ompt-support=on"
With this switch, ompt-blame and ompt-trace will be enabled as well which
can be disabled separately.

We've uploaded the patches to LLVM's Phabricator. Some short explanation:
0001-kmp_lock-Change-return-type-of-release-functions-fro.patch[3]
This is a preparation patch to get information about the actual release
status from nested locks.

0002-Add-new-files-for-OMPT.patch[4]
This patch contains the new files for OMPT and the needed changes to the
build infrastructure.

0003-Modify-runtime-to-call-correct-functions-for-OMPT.patch[5]
These are the actual changes in the runtime to issue OMPT-related functions.
All of them are surrounded by #if OMPT_SUPPORT and can be disabled (which is
the default).

The implementation is tested with the OMPT-TestSuite[6] and conforms with
the OpenMP's 2nd Technical Report[1].
Additionally we ran the OpenMP Validation Suite contained in this repository
to make sure that nothing broke.

Please review and commit if found suitable.
We know that these are rather big patches (for a big feature), but we
couldn't come up with a better splitting.

From Aachen,

Tim Cramer and Jonas Hahnfeld

[1]: http://openmp.org/mp-documents/ompt-tr2.pdf
[2]: Google Code Archive - Long-term storage for Google Code Project Hosting.
[3]: http://reviews.llvm.org/D8916
[4]: http://reviews.llvm.org/D8917
[5]: http://reviews.llvm.org/D8918
[6]: Google Code Archive - Long-term storage for Google Code Project Hosting.

Hi,

we have just updated the revisions with your feedback.
Any further comments on this?

Regards,
Jonas Hahnfeld

From: openmp-dev-bounces@cs.uiuc.edu [mailto:openmp-dev-
bounces@cs.uiuc.edu] On Behalf Of Hahnfeld, Jonas
Sent: Thursday, April 09, 2015 3:25 PM
To: 'openmp-dev@dcs-maillist2.engr.illinois.edu'
Cc: John Mellor-Crummey (johnmc@rice.edu); Cramer, Tim
Subject: [Openmp-dev] Patches to support OMPT

Hi all!

After some months of work, we would like to share our patches to add
support for OMPT[1] to this version of the Intel runtime.
Implementation was mainly done by John Mellor-Crummey from Rice
University in a repository at Google Code[2].

Support for OMPT is disabled by default and therefore has to be enabled
explicitly:
With CMake, define "ompt-support": $ cmake -Dompt-support=true ..
build.pl works nearly the same: $ make build_args="--ompt-support=on"
With this switch, ompt-blame and ompt-trace will be enabled as well which
can be disabled separately.

We've uploaded the patches to LLVM's Phabricator. Some short explanation:
0001-kmp_lock-Change-return-type-of-release-functions-fro.patch[3]
This is a preparation patch to get information about the actual release

status

from nested locks.

0002-Add-new-files-for-OMPT.patch[4]
This patch contains the new files for OMPT and the needed changes to the
build infrastructure.

0003-Modify-runtime-to-call-correct-functions-for-OMPT.patch[5]
These are the actual changes in the runtime to issue OMPT-related

functions.

All of them are surrounded by #if OMPT_SUPPORT and can be disabled
(which is the default).

The implementation is tested with the OMPT-TestSuite[6] and conforms with
the OpenMP's 2nd Technical Report[1].
Additionally we ran the OpenMP Validation Suite contained in this

repository