[Openmp-commits] [openmp] r321675 - [OMPT] Build runtime with OMPT support by default
Joachim Protze via Openmp-commits
openmp-commits at lists.llvm.org
Tue Jan 2 13:09:00 PST 2018
Author: jprotze
Date: Tue Jan 2 13:09:00 2018
New Revision: 321675
URL: http://llvm.org/viewvc/llvm-project?rev=321675&view=rev
Log:
[OMPT] Build runtime with OMPT support by default
This patch enables OMPT by default if version 50 or later is built and the config says, that OMPT will be supported.
Differential Revision: https://reviews.llvm.org/D41508
Modified:
openmp/trunk/README.rst
openmp/trunk/runtime/CMakeLists.txt
openmp/trunk/runtime/cmake/config-ix.cmake
Modified: openmp/trunk/README.rst
URL: http://llvm.org/viewvc/llvm-project/openmp/trunk/README.rst?rev=321675&r1=321674&r2=321675&view=diff
==============================================================================
--- openmp/trunk/README.rst (original)
+++ openmp/trunk/README.rst Tue Jan 2 13:09:00 2018
@@ -191,8 +191,11 @@ Optional Features
Align certain data structures on 4096-byte. This option is useful on
multi-node systems where a small ``CACHE_LINE`` setting leads to false sharing.
-**LIBOMP_OMPT_SUPPORT** = ``OFF|ON``
- Include support for the OpenMP Tools Interface (OMPT).
+**LIBOMP_OMPT_SUPPORT** = ``ON|OFF``
+ Include support for the OpenMP Tools Interface (OMPT).
+ This option is supported and ``ON`` by default for x86, x86_64, AArch64, and
+ PPC64 on Linux, Windows, and mac OS.
+ This option is ``OFF`` if this feature is not supported for the platform.
**LIBOMP_OMPT_OPTIONAL** = ``ON|OFF``
Include support for optional OMPT functionality. This option is ignored if
Modified: openmp/trunk/runtime/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/openmp/trunk/runtime/CMakeLists.txt?rev=321675&r1=321674&r2=321675&view=diff
==============================================================================
--- openmp/trunk/runtime/CMakeLists.txt (original)
+++ openmp/trunk/runtime/CMakeLists.txt Tue Jan 2 13:09:00 2018
@@ -299,12 +299,17 @@ if(LIBOMP_USE_VERSION_SYMBOLS AND (NOT L
set (LIBOMP_USE_VERSION_SYMBOLS FALSE)
endif()
-# OMPT-support
+# OMPT-support defaults to ON for OpenMP 5.0+ and if the requirements in
+# cmake/config-ix.cmake are fulfilled.
+set(OMPT_DEFAULT FALSE)
+if ((${LIBOMP_OMP_VERSION} GREATER 49) AND (LIBOMP_HAVE_OMPT_SUPPORT))
+ set(OMPT_DEFAULT TRUE)
+endif()
+set(LIBOMP_OMPT_SUPPORT ${OMPT_DEFAULT} CACHE BOOL
+ "OMPT-support?")
+
set(LIBOMP_OMPT_DEBUG FALSE CACHE BOOL
"Trace OMPT initialization?")
-#after testing: turn on ompt support by default for OpenMP 5.0 and higher
-set(LIBOMP_OMPT_SUPPORT FALSE CACHE BOOL
- "OMPT-support?")
set(LIBOMP_OMPT_OPTIONAL TRUE CACHE BOOL
"OMPT-optional?")
if(LIBOMP_OMPT_SUPPORT AND (NOT LIBOMP_HAVE_OMPT_SUPPORT))
Modified: openmp/trunk/runtime/cmake/config-ix.cmake
URL: http://llvm.org/viewvc/llvm-project/openmp/trunk/runtime/cmake/config-ix.cmake?rev=321675&r1=321674&r2=321675&view=diff
==============================================================================
--- openmp/trunk/runtime/cmake/config-ix.cmake (original)
+++ openmp/trunk/runtime/cmake/config-ix.cmake Tue Jan 2 13:09:00 2018
@@ -236,7 +236,15 @@ endif()
if(NOT LIBOMP_HAVE___BUILTIN_FRAME_ADDRESS)
set(LIBOMP_HAVE_OMPT_SUPPORT FALSE)
else()
- if((WIN32 AND LIBOMP_HAVE_PSAPI) OR APPLE OR (NOT WIN32 AND LIBOMP_HAVE_WEAK_ATTRIBUTE))
+ if( # hardware architecture supported?
+ ((LIBOMP_ARCH STREQUAL x86_64) OR
+ (LIBOMP_ARCH STREQUAL i386) OR
+# (LIBOMP_ARCH STREQUAL arm) OR
+ (LIBOMP_ARCH STREQUAL aarch64) OR
+ (LIBOMP_ARCH STREQUAL ppc64le) OR
+ (LIBOMP_ARCH STREQUAL ppc64))
+ AND # OS supported?
+ ((WIN32 AND LIBOMP_HAVE_PSAPI) OR APPLE OR (NOT WIN32 AND LIBOMP_HAVE_WEAK_ATTRIBUTE)))
set(LIBOMP_HAVE_OMPT_SUPPORT TRUE)
else()
set(LIBOMP_HAVE_OMPT_SUPPORT FALSE)
More information about the Openmp-commits
mailing list