From c69311bc009d97c6e2f10a5d3699c9726d229972 Mon Sep 17 00:00:00 2001 From: Kevin Huck Date: Wed, 18 Nov 2020 15:55:50 -0800 Subject: [PATCH 1/2] Beginning the process of cleaning up the CMAKE config --- CMakeLists.txt | 110 +++++++++++------- cmake/Modules/APEX_DefaultOptions.cmake | 108 +++++++++++++++++ cmake/Modules/APEX_SetupPlugins.cmake | 2 +- cmake/Modules/FindActiveHarmony.cmake | 2 +- cmake/Modules/FindBFD.cmake | 2 +- cmake/Modules/FindOMPT.cmake | 2 +- cmake/Modules/FindOTF2.cmake | 2 +- etc/buildbot.sh | 44 +++---- .../i386-kevinmacbookair.local-gcc.sh | 16 +-- .../ppc64le-minotaur-gcc.sh | 10 +- etc/configuration-files/x86_64-delphi-gcc.sh | 8 +- .../x86_64-godzilla-gcc.sh | 8 +- etc/configuration-files/x86_64-grover-gcc.sh | 6 +- etc/configuration-files/x86_64-grover-icc.sh | 6 +- etc/configuration-files/x86_64-ktau-gcc.sh | 12 +- etc/regression-test.sh | 14 +-- etc/spack/package.py | 12 +- src/apex/CMakeLists.hpx | 4 +- src/apex/apex.cpp | 6 +- src/apex/apex.h | 2 + src/apex/apex_export.h | 2 + src/apex/apex_kokkos.hpp | 2 + src/apex/apex_openacc.hpp | 2 + src/apex/apex_policies.h | 4 +- src/apex/apex_raja.hpp | 2 + src/apex/apex_types.h | 5 +- src/apex/global_constructor_destructor.h | 4 +- src/examples/CMakeLists.txt | 4 +- src/examples/LuleshMPI/CMakeLists.txt | 4 +- src/examples/LuleshMPI/lulesh-comm.cc | 2 +- src/examples/LuleshMPI/lulesh-init.cc | 16 +-- src/examples/LuleshMPI/lulesh-util.cc | 6 +- src/examples/LuleshMPI/lulesh-viz.cc | 12 +- src/examples/LuleshMPI/lulesh.cc | 40 +++---- src/examples/LuleshMPI/lulesh.h | 8 +- src/examples/LuleshMPI/lulesh_tuple.h | 8 +- src/examples/LuleshMPIOpenMP/CMakeLists.txt | 4 +- src/examples/LuleshMPIOpenMP/lulesh-comm.cc | 2 +- src/examples/LuleshMPIOpenMP/lulesh-init.cc | 16 +-- src/examples/LuleshMPIOpenMP/lulesh-util.cc | 6 +- src/examples/LuleshMPIOpenMP/lulesh-viz.cc | 12 +- src/examples/LuleshMPIOpenMP/lulesh.cc | 40 +++---- src/examples/LuleshMPIOpenMP/lulesh.h | 8 +- src/examples/LuleshMPIOpenMP/lulesh_tuple.h | 8 +- src/examples/LuleshOpenMP/CMakeLists.txt | 4 +- src/examples/LuleshOpenMP/lulesh-comm.cc | 2 +- src/examples/LuleshOpenMP/lulesh-init.cc | 16 +-- src/examples/LuleshOpenMP/lulesh-util.cc | 6 +- src/examples/LuleshOpenMP/lulesh-viz.cc | 12 +- src/examples/LuleshOpenMP/lulesh.cc | 40 +++---- src/examples/LuleshOpenMP/lulesh.h | 8 +- src/examples/LuleshOpenMP/lulesh_tuple.h | 8 +- src/unit_tests/C++/CMakeLists.txt | 4 +- src/unit_tests/C++/apex_non_worker_thread.cpp | 4 +- src/unit_tests/C/CMakeLists.txt | 4 +- 55 files changed, 419 insertions(+), 282 deletions(-) create mode 100644 cmake/Modules/APEX_DefaultOptions.cmake diff --git a/CMakeLists.txt b/CMakeLists.txt index ac904fd2..16514ae7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -18,6 +18,9 @@ if (${CMAKE_MAJOR_VERSION} GREATER 2) endif() endif() +list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR}/cmake/Modules) +include(APEX_DefaultOptions) + if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU") # using GCC if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.9) @@ -25,8 +28,6 @@ if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU") endif() endif() -list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR}/cmake/Modules) - if(APEX_WITH_CUDA) if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU" AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 9) @@ -51,7 +52,7 @@ endif() if((DEFINED APEX_LXK_KITTEN) AND (APEX_LXK_KITTEN)) SET(BUILD_STATIC_EXECUTABLES TRUE CACHE BOOL "Build Static Libraries and Executables" FORCE) SET(READ_PROC_FILESYSTEM FALSE CACHE BOOL "Periodically read the /proc filesystem status" FORCE) - SET(USE_CLOCK_TIMESTAMP TRUE CACHE BOOL "Disable assembly code timestamp call" FORCE) + SET(APEX_USE_CLOCK_TIMESTAMP TRUE CACHE BOOL "Disable assembly code timestamp call" FORCE) endif() ################################################################################ @@ -83,31 +84,31 @@ endif() ################################################################################ if(NOT CMAKE_BUILD_TYPE) set(CMAKE_BUILD_TYPE "Release" CACHE STRING "Configuration type (one of Debug, RelWithDebInfo, Release, MinSizeRel)" FORCE) - set(BUILD_EXAMPLES TRUE) + set(APEX_BUILD_EXAMPLES TRUE) endif() IF("${CMAKE_BUILD_TYPE}" STREQUAL "Debug") - set(BUILD_TESTS TRUE) - set(BUILD_EXAMPLES TRUE) + set(APEX_BUILD_TESTS TRUE) + set(APEX_BUILD_EXAMPLES TRUE) add_definitions(-DDEBUG) #add_definitions(-DAPEX_DEBUG) endif() IF("${CMAKE_BUILD_TYPE}" STREQUAL "RelWithDebInfo") - set(BUILD_TESTS TRUE) - set(BUILD_EXAMPLES TRUE) + set(APEX_BUILD_TESTS TRUE) + set(APEX_BUILD_EXAMPLES TRUE) add_definitions(-DNDEBUG) endif() IF("${CMAKE_BUILD_TYPE}" STREQUAL "Release") add_definitions(-DNDEBUG) # they will still be configured, but excluded from "all" - if(NOT DEFINED BUILD_TESTS) - set(BUILD_TESTS FALSE) - endif(NOT DEFINED BUILD_TESTS) - if(NOT DEFINED BUILD_EXAMPLES) - set(BUILD_EXAMPLES FALSE) - endif(NOT DEFINED BUILD_EXAMPLES) + if(NOT DEFINED APEX_BUILD_TESTS) + set(APEX_BUILD_TESTS FALSE) + endif(NOT DEFINED APEX_BUILD_TESTS) + if(NOT DEFINED APEX_BUILD_EXAMPLES) + set(APEX_BUILD_EXAMPLES FALSE) + endif(NOT DEFINED APEX_BUILD_EXAMPLES) endif() # set(APEX_BUILD_TYPE "${CMAKE_BUILD_TYPE}" CACHE STRING "Configuration type (one of Debug, RelWithDebInfo, Release, MinSizeRel)" FORCE) @@ -121,7 +122,7 @@ set(CMAKE_CONFIGURATION_TYPES "${CMAKE_BUILD_TYPE}" CACHE INTERNAL if(APPLE) set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -undefined dynamic_lookup") set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -undefined dynamic_lookup") - set(USE_CLOCK_TIMESTAMP ON CACHE INTERNAL "Use gettimeofday not cycle counter" FORCE) + set(APEX_USE_CLOCK_TIMESTAMP ON CACHE INTERNAL "Use gettimeofday not cycle counter" FORCE) endif(APPLE) # If TAU is used, don't allow throttling - it can potentially lead to @@ -130,7 +131,7 @@ if((DEFINED APEX_THROTTLE) AND (APEX_THROTTLE)) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DAPEX_THROTTLE") endif() -if((DEFINED USE_CLOCK_TIMESTAMP) AND (USE_CLOCK_TIMESTAMP)) +if((DEFINED APEX_USE_CLOCK_TIMESTAMP) AND (APEX_USE_CLOCK_TIMESTAMP)) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DAPEX_USE_CLOCK_TIMESTAMP") set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DAPEX_USE_CLOCK_TIMESTAMP") endif() @@ -253,7 +254,7 @@ endif (NOT "${CMAKE_CXX_COMPILER_ID}" STREQUAL "PGI") # The version number. set (APEX_VERSION_MAJOR 2) -set (APEX_VERSION_MINOR 1) +set (APEX_VERSION_MINOR 3) # add_definitions(-std=c++11) include(CheckCXXCompilerFlag) @@ -320,9 +321,9 @@ if (BUILD_STATIC_EXECUTABLES) set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -static") set(CMAKE_SHARED_LIBRARY_LINK_C_FLAGS) set(CMAKE_SHARED_LIBRARY_LINK_CXX_FLAGS) - set(USE_JEMALLOC FALSE) + set(APEX_WITH_JEMALLOC FALSE) unset(JEMALLOC_ROOT) - set(USE_TCMALLOC FALSE) + set(APEX_WITH_TCMALLOC FALSE) unset(GPERFTOOLS_ROOT) else() # use PIC for shared objects @@ -375,7 +376,7 @@ endif(APEX_INTEL_MIC) # MPI configuration ################################################################################ -if(USE_MPI) +if(APEX_WITH_MPI) find_package(MPI REQUIRED) endif() @@ -430,16 +431,16 @@ if(OpenACC_CXX_FOUND) find_package(OpenACCProfiling) endif() -if((DEFINED USE_OMPT) AND (NOT USE_OMPT)) +if((DEFINED APEX_WITH_OMPT) AND (NOT APEX_WITH_OMPT)) # just in case, disable all ompt unset(OMPT_ROOT) unset(ENV{OMPT_ROOT}) - unset(BUILD_OMPT) + unset(APEX_BUILD_OMPT) endif() -if ((NOT DEFINED USE_OMPT) OR (USE_OMPT) OR (BUILD_OMPT)) +if ((NOT DEFINED APEX_WITH_OMPT) OR (APEX_WITH_OMPT) OR (APEX_BUILD_OMPT)) if (OPENMP_FOUND) - if ((DEFINED OMPT_ROOT) OR (USE_OMPT) OR (BUILD_OMPT)) + if ((DEFINED OMPT_ROOT) OR (APEX_WITH_OMPT) OR (APEX_BUILD_OMPT)) find_package(OMPT) if (OMPT_FOUND) include_directories(${OMPT_INCLUDE_DIRS}) @@ -456,7 +457,7 @@ if ((NOT DEFINED USE_OMPT) OR (USE_OMPT) OR (BUILD_OMPT)) endif() else() add_custom_target(project_ompt) -endif ((NOT DEFINED USE_OMPT) OR (USE_OMPT) OR (BUILD_OMPT)) +endif ((NOT DEFINED APEX_WITH_OMPT) OR (APEX_WITH_OMPT) OR (APEX_BUILD_OMPT)) # Just in case, to prevent concurrent builds if(APEX_INTEL_MIC) @@ -478,7 +479,7 @@ endif() # JE/TCMalloc configuration ################################################################################ -if((DEFINED JEMALLOC_ROOT) OR (USE_JEMALLOC)) +if((DEFINED JEMALLOC_ROOT) OR (APEX_WITH_JEMALLOC)) find_package(JEmalloc) if (JEmalloc_FOUND) include_directories(${JEmalloc_INCLUDE_DIRS}) @@ -489,7 +490,7 @@ if((DEFINED JEMALLOC_ROOT) OR (USE_JEMALLOC)) endif() endif() -if((DEFINED GPERFTOOLS_ROOT) OR (USE_TCMALLOC)) +if((DEFINED GPERFTOOLS_ROOT) OR (APEX_WITH_TCMALLOC)) find_package(Tcmalloc) if (Tcmalloc_FOUND) include_directories(${Tcmalloc_INCLUDE_DIRS}) @@ -521,14 +522,14 @@ endif() # ActiveHarmony configuration ################################################################################ -if((DEFINED USE_ACTIVEHARMONY) AND (NOT USE_ACTIVEHARMONY)) +if((DEFINED APEX_WITH_ACTIVEHARMONY) AND (NOT APEX_WITH_ACTIVEHARMONY)) # just in case, disable all Active Harmony unset(ACTIVEHARMONY_ROOT) unset(ENV{ACTIVEHARMONY_ROOT}) - unset(BUILD_ACTIVEHARMONY) + unset(APEX_BUILD_ACTIVEHARMONY) endif() -if(((DEFINED ACTIVEHARMONY_ROOT) OR (BUILD_ACTIVEHARMONY)) OR (USE_ACTIVEHARMONY)) +if(((DEFINED ACTIVEHARMONY_ROOT) OR (APEX_BUILD_ACTIVEHARMONY)) OR (APEX_WITH_ACTIVEHARMONY)) find_package(ActiveHarmony) if (ACTIVEHARMONY_FOUND) include_directories(${ACTIVEHARMONY_INCLUDE_DIRS}) @@ -549,7 +550,7 @@ add_dependencies (project_activeharmony project_ompt) # PAPI configuration ################################################################################ -if((DEFINED PAPI_ROOT) OR (USE_PAPI)) +if((DEFINED PAPI_ROOT) OR (APEX_WITH_PAPI)) find_package(PAPI) if (PAPI_FOUND) include_directories(${PAPI_INCLUDE_DIRS}) @@ -564,14 +565,14 @@ endif() # OTF2 configuration ################################################################################ -if((DEFINED USE_OTF2) AND (NOT USE_OTF2)) +if((DEFINED APEX_WITH_OTF2) AND (NOT APEX_WITH_OTF2)) # just in case, disable unset(OTF2_ROOT) unset(ENV{OTF2_ROOT}) - unset(BUILD_OTF2) + unset(APEX_BUILD_OTF2) endif() -if((DEFINED OTF2_ROOT) OR (USE_OTF2) OR (BUILD_OTF2)) +if((DEFINED OTF2_ROOT) OR (APEX_WITH_OTF2) OR (APEX_BUILD_OTF2)) find_package(OTF2) if (OTF2_FOUND) include_directories(${OTF2_INCLUDE_DIRS}) @@ -645,7 +646,7 @@ endif() # Binutils configuration ################################################################################ -if((DEFINED BFD_ROOT) OR (USE_BFD) OR (BUILD_BFD)) +if((DEFINED BFD_ROOT) OR (APEX_WITH_BFD) OR (APEX_BUILD_BFD)) find_package(BFD) if (BFD_FOUND) include_directories(${BFD_INCLUDE_DIRS}) @@ -728,10 +729,10 @@ else() "Try manually check out https://github.com/khuck/perfstubs.git to ${PROJECT_SOURCE_DIR}") endif() -if(USE_PLUGINS) +if(APEX_WITH_PLUGINS) message(INFO " apex will be built with plugin support.") set(LIBS ${LIBS} ${CMAKE_DL_LIBS}) - add_definitions("-DAPEX_USE_PLUGINS") + add_definitions("-DAPEX_WITH_PLUGINS") endif() git_external(rapidjson @@ -901,7 +902,7 @@ endif() add_subdirectory (src/utils) -if(BUILD_TESTS) +if(APEX_BUILD_TESTS) message(INFO " Building unit tests.") if(OMPT_FOUND) add_subdirectory (src/openmp) @@ -914,12 +915,39 @@ if(BUILD_TESTS) else() #add_subdirectory (src/unit_tests/C EXCLUDE_FROM_ALL) #add_subdirectory (src/unit_tests/C++ EXCLUDE_FROM_ALL) -endif(BUILD_TESTS) +endif(APEX_BUILD_TESTS) -if(BUILD_EXAMPLES) +if(APEX_BUILD_EXAMPLES) message(INFO " Building examples.") add_subdirectory (src/examples) else() #add_subdirectory (src/examples EXCLUDE_FROM_ALL) -endif(BUILD_EXAMPLES) +endif(APEX_BUILD_EXAMPLES) + +function(dump_cmake_variables) + get_cmake_property(_variableNames VARIABLES) + list (SORT _variableNames) + foreach (_variableName ${_variableNames}) + if (ARGV0) + unset(MATCHED) + string(REGEX MATCH ${ARGV0} MATCHED ${_variableName}) + if (NOT MATCHED) + continue() + endif() + endif() + message(STATUS "${_variableName} = ${${_variableName}}") + endforeach() +endfunction() +message(STATUS "----------------------------------------------------------------------") +message(STATUS "APEX Variable Report:") +message(STATUS "----------------------------------------------------------------------") +dump_cmake_variables("^APEX") +MESSAGE(STATUS "Build type: " ${CMAKE_BUILD_TYPE}) +MESSAGE(STATUS "Libraries: " ${LIBS}) +MESSAGE(STATUS "Compiler cxx debug flags:" ${CMAKE_CXX_FLAGS_DEBUG}) +MESSAGE(STATUS "Compiler cxx release flags:" ${CMAKE_CXX_FLAGS_RELEASE}) +MESSAGE(STATUS "Compiler cxx min size flags:" ${CMAKE_CXX_FLAGS_MINSIZEREL}) +MESSAGE(STATUS "Compiler cxx flags:" ${CMAKE_CXX_FLAGS}) +MESSAGE(STATUS "Install Prefix:" ${CMAKE_INSTALL_PREFIX}) +message(STATUS "----------------------------------------------------------------------") diff --git a/cmake/Modules/APEX_DefaultOptions.cmake b/cmake/Modules/APEX_DefaultOptions.cmake new file mode 100644 index 00000000..510e5c70 --- /dev/null +++ b/cmake/Modules/APEX_DefaultOptions.cmake @@ -0,0 +1,108 @@ +# The name of our project is "APEX". CMakeLists files in this project can +# refer to the root source directory of the project as ${APEX_SOURCE_DIR} and +# to the root binary directory of the project as ${APEX_BINARY_DIR}. + +# All CMAKE options for the APEX project... +option (APEX_WITH_ACTIVEHARMONY "Enable ActiveHarmony support" TRUE) +option (APEX_WITH_BFD "Enable Binutils (BFD)support" TRUE) +option (APEX_WITH_CUDA "Enable CUDA (CUPTI) support" TRUE) +option (APEX_WITH_MPI "Enable MPI support" TRUE) +option (APEX_WITH_OMPT "Enable OpenMP Tools (OMPT) support" TRUE) +option (APEX_WITH_PAPI "Enable PAPI support" FALSE) +option (APEX_WITH_PLUGINS "Enable APEX policy plugin support" TRUE) +option (APEX_WITH_TCMALLOC "Enable TCMalloc heap management" FALSE) +option (APEX_WITH_JEMALLOC "Enable JEMalloc heap management" FALSE) +option (APEX_BUILD_TESTS "Build APEX tests (for 'make test')" TRUE) +option (APEX_BUILD_EXAMPLES "Build APEX examples" TRUE) +option (APEX_SANITIZE "Enable compiler sanitizer flags" FALSE) +option (APEX_BUILD_ACTIVEHARMONY "Build ActiveHarmony library if not found" FALSE) +option (APEX_BUILD_BFD "Build Binutils library if not found" FALSE) +option (APEX_BUILD_OMPT "Build OpenMP runtime with OMPT if support not found" FALSE) +option (APEX_BUILD_OTF2 "Build OTF2 library if not found" FALSE) +option (APEX_USE_CLOCK_TIMESTAMP "On x86_64 systems, disable RDTSC timing" TRUE) + +# Provide some backwards compatability +if(DEFINED USE_ACTIVEHARMONY) + message(WARNING "USE_ACTIVEHARMONY is deprecated - please use APEX_WITH_ACTIVEHARMONY") + set(APEX_WITH_ACTIVEHARMONY CACHE BOOL ${USE_ACTIVEHARMONY}) +endif() + +# Provide some backwards compatability +if(DEFINED USE_BFD) + message(WARNING "USE_BFD is deprecated - please use APEX_WITH_BFD") + set(APEX_WITH_BFD CACHE BOOL ${USE_BFD}) +endif() + +# Provide some backwards compatability +if(DEFINED USE_MPI) + message(WARNING "USE_MPI is deprecated - please use APEX_WITH_MPI") + set(APEX_WITH_MPI CACHE BOOL ${USE_MPI}) +endif() + +# Provide some backwards compatability +if(DEFINED USE_OMPT) + message(WARNING "USE_OMPT is deprecated - please use APEX_WITH_OMPT") + set(APEX_WITH_OMPT CACHE BOOL ${USE_OMPT}) +endif() + +# Provide some backwards compatability +if(DEFINED USE_PAPI) + message(WARNING "USE_PAPI is deprecated - please use APEX_WITH_PAPI") + set(APEX_WITH_PAPI CACHE BOOL ${USE_PAPI}) +endif() + +# Provide some backwards compatability +if(DEFINED USE_PLUGINS) + message(WARNING "USE_PLUGINS is deprecated - please use APEX_WITH_PLUGINS") + set(APEX_WITH_PLUGINS CACHE BOOL ${USE_PLUGINS}) +endif() + +# Provide some backwards compatability +if(DEFINED USE_TCMALLOC) + message(WARNING "USE_TCMALLOC is deprecated - please use APEX_WITH_TCMALLOC") + set(APEX_WITH_TCMALLOC CACHE BOOL ${USE_TCMALLOC}) +endif() + +# Provide some backwards compatability +if(DEFINED USE_JEMALLOC) + message(WARNING "USE_JEMALLOC is deprecated - please use APEX_WITH_JEMALLOC") + set(APEX_WITH_JEMALLOC CACHE BOOL ${USE_JEMALLOC}) +endif() + +# Provide some backwards compatability +if(DEFINED BUILD_TESTS) + message(WARNING "BUILD_TESTS is deprecated - please use APEX_BUILD_TESTS") + set(APEX_BUILD_TESTS CACHE BOOL ${BUILD_TESTS}) +endif() + +# Provide some backwards compatability +if(DEFINED BUILD_EXAMPLES) + message(WARNING "BUILD_EXAMPLES is deprecated - please use APEX_BUILD_EXAMPLES") + set(APEX_BUILD_EXAMPLES CACHE BOOL ${BUILD_EXAMPLES}) +endif() + +# Provide some backwards compatability +if(DEFINED BUILD_ACTIVEHARMONY) + message(WARNING "BUILD_ACTIVEHARMONY is deprecated - please use APEX_BUILD_ACTIVEHARMONY") + set(APEX_BUILD_ACTIVEHARMONY CACHE BOOL ${BUILD_ACTIVEHARMONY}) +endif() + +# Provide some backwards compatability +if(DEFINED BUILD_BFD) + message(WARNING "BUILD_BFD is deprecated - please use APEX_BUILD_BFD") + set(APEX_BUILD_BFD CACHE BOOL ${BUILD_BFD}) +endif() + +# Provide some backwards compatability +if(DEFINED BUILD_OMPT) + message(WARNING "BUILD_OMPT is deprecated - please use APEX_BUILD_OMPT") + set(APEX_BUILD_OMPT CACHE BOOL ${BUILD_OMPT}) +endif() + +# Provide some backwards compatability +if(DEFINED BUILD_OTF2) + message(WARNING "BUILD_OTF2 is deprecated - please use APEX_BUILD_OTF2") + set(APEX_BUILD_OTF2 CACHE BOOL ${BUILD_OTF2}) +endif() + + diff --git a/cmake/Modules/APEX_SetupPlugins.cmake b/cmake/Modules/APEX_SetupPlugins.cmake index 6c50ab3f..d586c128 100644 --- a/cmake/Modules/APEX_SetupPlugins.cmake +++ b/cmake/Modules/APEX_SetupPlugins.cmake @@ -6,7 +6,7 @@ if(APEX_WITH_PLUGINS) message(INFO " apex will be built with plugin support.") set(LIBS ${LIBS} ${CMAKE_DL_LIBS}) - target_compile_definitions(apex_flags INTERFACE APEX_USE_PLUGINS) + target_compile_definitions(apex_flags INTERFACE APEX_WITH_PLUGINS) endif() # Regardless, APEX now depends on JSON for event filtering support. diff --git a/cmake/Modules/FindActiveHarmony.cmake b/cmake/Modules/FindActiveHarmony.cmake index a8a3412a..1c59f1d0 100644 --- a/cmake/Modules/FindActiveHarmony.cmake +++ b/cmake/Modules/FindActiveHarmony.cmake @@ -30,7 +30,7 @@ find_package_handle_standard_args(ACTIVEHARMONY DEFAULT_MSG mark_as_advanced(ACTIVEHARMONY_INCLUDE_DIR ACTIVEHARMONY_LIBRARY) # --------- DOWNLOAD AND BUILD THE EXTERNAL PROJECT! ------------ # -if((BUILD_ACTIVEHARMONY OR (NOT ACTIVEHARMONY_FOUND)) AND NOT APPLE) +if((APEX_BUILD_ACTIVEHARMONY OR (NOT ACTIVEHARMONY_FOUND)) AND NOT APPLE) set(CACHE ACTIVEHARMONY_ROOT ${CMAKE_INSTALL_PREFIX} STRING "Active Harmony Root directory") message("Attention: Downloading and Building ActiveHarmony as external project!") message(INFO " A working internet connection is required!") diff --git a/cmake/Modules/FindBFD.cmake b/cmake/Modules/FindBFD.cmake index 83ee7191..34766ab1 100644 --- a/cmake/Modules/FindBFD.cmake +++ b/cmake/Modules/FindBFD.cmake @@ -42,7 +42,7 @@ find_package_handle_standard_args(BFD DEFAULT_MSG mark_as_advanced(BFD_INCLUDE_DIR BFD_LIBRARY) # --------- DOWNLOAD AND BUILD THE EXTERNAL PROJECT! ------------ # -if((BUILD_BFD OR (NOT BFD_FOUND)) AND NOT APPLE) +if((APEX_BUILD_BFD OR (NOT BFD_FOUND)) AND NOT APPLE) message("Attention: Downloading and Building binutils as external project!") message(INFO " A working internet connection is required!") include(ExternalProject) diff --git a/cmake/Modules/FindOMPT.cmake b/cmake/Modules/FindOMPT.cmake index 0fd448e6..49f57643 100644 --- a/cmake/Modules/FindOMPT.cmake +++ b/cmake/Modules/FindOMPT.cmake @@ -57,7 +57,7 @@ if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU") endif() # --------- DOWNLOAD AND BUILD THE EXTERNAL PROJECT! ------------ # -if(BUILD_OMPT OR (NOT OMPT_FOUND)) +if(APEX_BUILD_OMPT OR (NOT OMPT_FOUND)) set(CACHE OMPT_ROOT ${CMAKE_INSTALL_PREFIX} STRING "OMPT Root directory") message("Attention: Downloading and Building OMPT as external project!") message(INFO " A working internet connection is required!") diff --git a/cmake/Modules/FindOTF2.cmake b/cmake/Modules/FindOTF2.cmake index 4a3747ef..9b405eed 100644 --- a/cmake/Modules/FindOTF2.cmake +++ b/cmake/Modules/FindOTF2.cmake @@ -32,7 +32,7 @@ find_package_handle_standard_args(OTF2 DEFAULT_MSG mark_as_advanced(OTF2_INCLUDE_DIR OTF2_LIBRARY) # --------- DOWNLOAD AND BUILD THE EXTERNAL PROJECT! ------------ # -if(BUILD_OTF2 OR (NOT OTF2_FOUND)) +if(APEX_BUILD_OTF2 OR (NOT OTF2_FOUND)) set(CACHE OTF2_ROOT ${CMAKE_INSTALL_PREFIX} STRING "OTF2 Root directory") message("Attention: Downloading and Building OTF2 as external project!") message(INFO " A working internet connection is required!") diff --git a/etc/buildbot.sh b/etc/buildbot.sh index 7b4d0177..18c0937f 100755 --- a/etc/buildbot.sh +++ b/etc/buildbot.sh @@ -31,29 +31,29 @@ my_readlink() } no_malloc="" -no_bfd=" -DUSE_BFD=FALSE" -no_ah=" -DUSE_ACTIVEHARMONY=FALSE" -no_ompt=" -DUSE_OMPT=FALSE" -no_papi=" -DUSE_PAPI=FALSE" -no_mpi=" -DUSE_MPI=FALSE" -no_otf=" -DUSE_OTF2=FALSE" -no_tau=" -DUSE_TAU=FALSE" -yes_malloc=" -DUSE_JEMALLOC=TRUE" -yes_bfd=" -DUSE_BFD=TRUE" -yes_ah=" -DUSE_ACTIVEHARMONY=TRUE -DACTIVEHARMONY_ROOT=/usr/local/activeharmony/4.6 -DUSE_PLUGINS=TRUE" -yes_otf=" -DUSE_OTF2=TRUE -DOTF2_ROOT=/usr/local/otf2/2.1" -yes_ompt=" -DUSE_OMPT=TRUE -DOMPT_ROOT=/usr/local/ompt/5.0" -#yes_mpi=" -DUSE_MPI=TRUE -DCMAKE_C_COMPILER=mpicc -DCMAKE_CXX_COMPILER=mpicxx" -yes_mpi=" -DUSE_MPI=TRUE" -yes_papi=" -DUSE_PAPI=TRUE -DPAPI_ROOT=/usr" -yes_tau=" -DUSE_TAU=TRUE " +no_bfd=" -DAPEX_WITH_BFD=FALSE" +no_ah=" -DAPEX_WITH_ACTIVEHARMONY=FALSE" +no_ompt=" -DAPEX_WITH_OMPT=FALSE" +no_papi=" -DAPEX_WITH_PAPI=FALSE" +no_mpi=" -DAPEX_WITH_MPI=FALSE" +no_otf=" -DAPEX_WITH_OTF2=FALSE" +no_tau=" -DAPEX_WITH_TAU=FALSE" +yes_malloc=" -DAPEX_WITH_JEMALLOC=TRUE" +yes_bfd=" -DAPEX_WITH_BFD=TRUE" +yes_ah=" -DAPEX_WITH_ACTIVEHARMONY=TRUE -DACTIVEHARMONY_ROOT=/usr/local/activeharmony/4.6 -DAPEX_WITH_PLUGINS=TRUE" +yes_otf=" -DAPEX_WITH_OTF2=TRUE -DOTF2_ROOT=/usr/local/otf2/2.1" +yes_ompt=" -DAPEX_WITH_OMPT=TRUE -DOMPT_ROOT=/usr/local/ompt/5.0" +#yes_mpi=" -DAPEX_WITH_MPI=TRUE -DCMAKE_C_COMPILER=mpicc -DCMAKE_CXX_COMPILER=mpicxx" +yes_mpi=" -DAPEX_WITH_MPI=TRUE" +yes_papi=" -DAPEX_WITH_PAPI=TRUE -DPAPI_ROOT=/usr" +yes_tau=" -DAPEX_WITH_TAU=TRUE " if [ "$host" == "delphi" ] ; then - yes_bfd=" -DUSE_BFD=TRUE -DBFD_ROOT=/usr/local/packages/binutils/2.27" - yes_malloc=" -DUSE_JEMALLOC=TRUE -DJEMALLOC_ROOT=/usr/local/packages/jemalloc/5.0.1-gcc" - yes_ah=" -DUSE_ACTIVEHARMONY=TRUE -DACTIVEHARMONY_ROOT=/usr/local/packages/activeharmony/4.6.0-gcc -DUSE_PLUGINS=TRUE" - yes_otf=" -DUSE_OTF2=TRUE -DOTF2_ROOT=/usr/local/packages/otf2/2.1" - yes_ompt=" -DUSE_OMPT=TRUE -DOMPT_ROOT=/usr/local/packages/llvm-openmp/2020-03-25" - yes_papi=" -DUSE_PAPI=TRUE -DPAPI_ROOT=/usr/local/packages/papi/5.6.0" + yes_bfd=" -DAPEX_WITH_BFD=TRUE -DBFD_ROOT=/usr/local/packages/binutils/2.27" + yes_malloc=" -DAPEX_WITH_JEMALLOC=TRUE -DJEMALLOC_ROOT=/usr/local/packages/jemalloc/5.0.1-gcc" + yes_ah=" -DAPEX_WITH_ACTIVEHARMONY=TRUE -DACTIVEHARMONY_ROOT=/usr/local/packages/activeharmony/4.6.0-gcc -DAPEX_WITH_PLUGINS=TRUE" + yes_otf=" -DAPEX_WITH_OTF2=TRUE -DOTF2_ROOT=/usr/local/packages/otf2/2.1" + yes_ompt=" -DAPEX_WITH_OMPT=TRUE -DOMPT_ROOT=/usr/local/packages/llvm-openmp/2020-03-25" + yes_papi=" -DAPEX_WITH_PAPI=TRUE -DPAPI_ROOT=/usr/local/packages/papi/5.6.0" fi # set defaults diff --git a/etc/configuration-files/i386-kevinmacbookair.local-gcc.sh b/etc/configuration-files/i386-kevinmacbookair.local-gcc.sh index ff015a61..69c90293 100755 --- a/etc/configuration-files/i386-kevinmacbookair.local-gcc.sh +++ b/etc/configuration-files/i386-kevinmacbookair.local-gcc.sh @@ -1,12 +1,12 @@ #platform_malloc="-DJEMALLOC_ROOT=$HOME/install/jemalloc-3.5.1" #platform_malloc="-DGPERFTOOLS_ROOT=/usr/local/gperftools/2.5" -#platform_malloc="-DUSE_JEMALLOC=TRUE" -platform_bfd="-DUSE_BFD=FALSE" -platform_ah="-DBUILD_ACTIVEHARMONY=TRUE" -platform_otf="-DBUILD_OTF2=TRUE" -platform_ompt="-DBUILD_OMPT=TRUE -DUSE_PLUGINS=TRUE" -platform_mpi="-DCMAKE_C_COMPILER=mpicc -DCMAKE_CXX_COMPILER=mpicxx -DUSE_MPI=TRUE" -platform_papi="-DUSE_PAPI=TRUE -DPAPI_ROOT=$HOME/install/papi-5.3.0" -platform_tau="-DUSE_TAU=TRUE -DTAU_ROOT=$HOME/src/tau2 -DTAU_ARCH=apple -DTAU_OPTIONS=-pthread" +#platform_malloc="-DAPEX_WITH_JEMALLOC=TRUE" +platform_bfd="-DAPEX_WITH_BFD=FALSE" +platform_ah="-DAPEX_BUILD_ACTIVEHARMONY=TRUE" +platform_otf="-DAPEX_BUILD_OTF2=TRUE" +platform_ompt="-DAPEX_BUILD_OMPT=TRUE -DAPEX_WITH_PLUGINS=TRUE" +platform_mpi="-DCMAKE_C_COMPILER=mpicc -DCMAKE_CXX_COMPILER=mpicxx -DAPEX_WITH_MPI=TRUE" +platform_papi="-DAPEX_WITH_PAPI=TRUE -DPAPI_ROOT=$HOME/install/papi-5.3.0" +platform_tau="-DAPEX_WITH_TAU=TRUE -DTAU_ROOT=$HOME/src/tau2 -DTAU_ARCH=apple -DTAU_OPTIONS=-pthread" parallel_build="-j 8" diff --git a/etc/configuration-files/ppc64le-minotaur-gcc.sh b/etc/configuration-files/ppc64le-minotaur-gcc.sh index 8e08bdb3..2c6e7ce2 100755 --- a/etc/configuration-files/ppc64le-minotaur-gcc.sh +++ b/etc/configuration-files/ppc64le-minotaur-gcc.sh @@ -2,12 +2,12 @@ platform_malloc="-DGPERFTOOLS_ROOT=/usr/local/packages/gperftools/2.5" platform_bfd="-DBFD_ROOT=/usr/local/packages/binutils/2.25" platform_ah="-DACTIVEHARMONY_ROOT=/usr/local/packages/activeharmony/4.6.0-ppc64le" -platform_ompt="-DOMPT_ROOT=/usr/local/packages/LLVM-ompt/power8_gcc-4.9.2 -DUSE_PLUGINS=TRUE" -platform_papi="-DUSE_PAPI=TRUE -DPAPI_ROOT=/usr/local/packages/papi/5.5.0-ppc64le" -#platform_mpi="-DCMAKE_C_COMPILER=mpicc -DCMAKE_CXX_COMPILER=mpicxx -DUSE_MPI=TRUE" -platform_mpi="-DUSE_MPI=FALSE" +platform_ompt="-DOMPT_ROOT=/usr/local/packages/LLVM-ompt/power8_gcc-4.9.2 -DAPEX_WITH_PLUGINS=TRUE" +platform_papi="-DAPEX_WITH_PAPI=TRUE -DPAPI_ROOT=/usr/local/packages/papi/5.5.0-ppc64le" +#platform_mpi="-DCMAKE_C_COMPILER=mpicc -DCMAKE_CXX_COMPILER=mpicxx -DAPEX_WITH_MPI=TRUE" +platform_mpi="-DAPEX_WITH_MPI=FALSE" platform_otf="-DOTF2_ROOT=/usr/local/packages/otf2/2.0-ppc64le" -platform_tau="-DUSE_TAU=TRUE -DTAU_ROOT=$HOME/src/tau2 -DTAU_ARCH=ibm64linux -DTAU_OPTIONS=-pthread" +platform_tau="-DAPEX_WITH_TAU=TRUE -DTAU_ROOT=$HOME/src/tau2 -DTAU_ARCH=ibm64linux -DTAU_OPTIONS=-pthread" module load gcc/5.3 diff --git a/etc/configuration-files/x86_64-delphi-gcc.sh b/etc/configuration-files/x86_64-delphi-gcc.sh index ced34ddc..6115faeb 100755 --- a/etc/configuration-files/x86_64-delphi-gcc.sh +++ b/etc/configuration-files/x86_64-delphi-gcc.sh @@ -4,12 +4,12 @@ platform_malloc="-DGPERFTOOLS_ROOT=/usr/local/packages/gperftools/2.5" platform_bfd="-DBFD_ROOT=$HOME/src/tau2/x86_64/binutils-2.23.2" platform_ah="-DACTIVEHARMONY_ROOT=$HOME/install/activeharmony/4.6.0" platform_otf="-DOTF2_ROOT=/usr/local/packages/otf2/2.0-x86_64" -platform_ompt="-DOMPT_ROOT=$HOME/src/LLVM-openmp/build-gcc-Release -DUSE_PLUGINS=TRUE" -platform_mpi="-DCMAKE_C_COMPILER=mpicc -DCMAKE_CXX_COMPILER=mpicxx -DUSE_MPI=TRUE" +platform_ompt="-DOMPT_ROOT=$HOME/src/LLVM-openmp/build-gcc-Release -DAPEX_WITH_PLUGINS=TRUE" +platform_mpi="-DCMAKE_C_COMPILER=mpicc -DCMAKE_CXX_COMPILER=mpicxx -DAPEX_WITH_MPI=TRUE" #platform_mpi="" -platform_papi="-DUSE_PAPI=TRUE -DPAPI_ROOT=${PAPI}" +platform_papi="-DAPEX_WITH_PAPI=TRUE -DPAPI_ROOT=${PAPI}" #platform_papi="" -platform_tau="-DUSE_TAU=TRUE -DTAU_ROOT=$HOME/src/tau2 -DTAU_ARCH=x86_64 -DTAU_OPTIONS=-pthread" +platform_tau="-DAPEX_WITH_TAU=TRUE -DTAU_ROOT=$HOME/src/tau2 -DTAU_ARCH=x86_64 -DTAU_OPTIONS=-pthread" module purge module load cmake mpi-tor/openmpi-1.8_gcc-4.9 papi diff --git a/etc/configuration-files/x86_64-godzilla-gcc.sh b/etc/configuration-files/x86_64-godzilla-gcc.sh index db9f90b5..15597af7 100755 --- a/etc/configuration-files/x86_64-godzilla-gcc.sh +++ b/etc/configuration-files/x86_64-godzilla-gcc.sh @@ -4,12 +4,12 @@ platform_malloc="-DGPERFTOOLS_ROOT=/usr/local/packages/gperftools/2.5" platform_bfd="-DBFD_ROOT=$HOME/src/tau2/x86_64/binutils-2.23.2" platform_ah="-DACTIVEHARMONY_ROOT=$HOME/install/activeharmony/4.6.0" platform_otf="-DOTF2_ROOT=/usr/local/packages/otf2/2.0-x86_64" -platform_ompt="-DOMPT_ROOT=$HOME/src/LLVM-openmp/build-gcc-Release -DUSE_PLUGINS=TRUE" -platform_mpi="-DCMAKE_C_COMPILER=mpicc -DCMAKE_CXX_COMPILER=mpicxx -DUSE_MPI=TRUE" +platform_ompt="-DOMPT_ROOT=$HOME/src/LLVM-openmp/build-gcc-Release -DAPEX_WITH_PLUGINS=TRUE" +platform_mpi="-DCMAKE_C_COMPILER=mpicc -DCMAKE_CXX_COMPILER=mpicxx -DAPEX_WITH_MPI=TRUE" #platform_mpi="" -platform_papi="-DUSE_PAPI=TRUE -DPAPI_ROOT=${PAPI}" +platform_papi="-DAPEX_WITH_PAPI=TRUE -DPAPI_ROOT=${PAPI}" #platform_papi="" -platform_tau="-DUSE_TAU=TRUE -DTAU_ROOT=$HOME/src/tau2 -DTAU_ARCH=x86_64 -DTAU_OPTIONS=-pthread" +platform_tau="-DAPEX_WITH_TAU=TRUE -DTAU_ROOT=$HOME/src/tau2 -DTAU_ARCH=x86_64 -DTAU_OPTIONS=-pthread" module purge module load cmake mpi-tor/openmpi-1.8_gcc-4.9 papi diff --git a/etc/configuration-files/x86_64-grover-gcc.sh b/etc/configuration-files/x86_64-grover-gcc.sh index 89a1d6c7..e87c36c1 100755 --- a/etc/configuration-files/x86_64-grover-gcc.sh +++ b/etc/configuration-files/x86_64-grover-gcc.sh @@ -3,10 +3,10 @@ platform_malloc="-DGPERFTOOLS_ROOT=${HOME}/install/gperftools/2.5" platform_bfd="-DBFD_ROOT=${HOME}/install/binutils-2.25-knl" platform_ah="-DACTIVEHARMONY_ROOT=${HOME}/install/activeharmony/4.6.0-knl" platform_otf="-DOTF2_ROOT=${HOME}/install/otf2/2.0-knl" -platform_ompt="-DOMPT_ROOT=${HOME}/src/LLVM-openmp/build-icc-Release -DUSE_PLUGINS=TRUE" +platform_ompt="-DOMPT_ROOT=${HOME}/src/LLVM-openmp/build-icc-Release -DAPEX_WITH_PLUGINS=TRUE" platform_mpi="" -platform_papi="-DUSE_PAPI=TRUE -DPAPI_ROOT=${HOME}/install/papi/5.5.0-knl" -platform_tau="-DUSE_TAU=TRUE -DTAU_ROOT=$HOME/src/tau2 -DTAU_ARCH=x86_64 -DTAU_OPTIONS=-pthread" +platform_papi="-DAPEX_WITH_PAPI=TRUE -DPAPI_ROOT=${HOME}/install/papi/5.5.0-knl" +platform_tau="-DAPEX_WITH_TAU=TRUE -DTAU_ROOT=$HOME/src/tau2 -DTAU_ARCH=x86_64 -DTAU_OPTIONS=-pthread" module load cmake intel gcc/5.3 diff --git a/etc/configuration-files/x86_64-grover-icc.sh b/etc/configuration-files/x86_64-grover-icc.sh index d67c35b5..18591bfe 100755 --- a/etc/configuration-files/x86_64-grover-icc.sh +++ b/etc/configuration-files/x86_64-grover-icc.sh @@ -3,10 +3,10 @@ platform_malloc="-DGPERFTOOLS_ROOT=${HOME}/install/gperftools/2.5" platform_bfd="-DBFD_ROOT=${HOME}/install/binutils-2.25-knl" platform_ah="-DACTIVEHARMONY_ROOT=${HOME}/install/activeharmony/4.6.0-knl" platform_otf="-DOTF2_ROOT=${HOME}/install/otf2/2.0-knl" -platform_ompt="-DOMPT_ROOT=${HOME}/src/LLVM-openmp/build-icc-Release -DUSE_PLUGINS=TRUE" +platform_ompt="-DOMPT_ROOT=${HOME}/src/LLVM-openmp/build-icc-Release -DAPEX_WITH_PLUGINS=TRUE" platform_mpi="" -platform_papi="-DUSE_PAPI=TRUE -DPAPI_ROOT=${HOME}/install/papi/5.5.0-knl" -platform_tau="-DUSE_TAU=TRUE -DTAU_ROOT=$HOME/src/tau2 -DTAU_ARCH=x86_64 -DTAU_OPTIONS=-icpc-pthread" +platform_papi="-DAPEX_WITH_PAPI=TRUE -DPAPI_ROOT=${HOME}/install/papi/5.5.0-knl" +platform_tau="-DAPEX_WITH_TAU=TRUE -DTAU_ROOT=$HOME/src/tau2 -DTAU_ARCH=x86_64 -DTAU_OPTIONS=-icpc-pthread" module load cmake intel gcc/5.3 diff --git a/etc/configuration-files/x86_64-ktau-gcc.sh b/etc/configuration-files/x86_64-ktau-gcc.sh index 10b7356c..afde0694 100755 --- a/etc/configuration-files/x86_64-ktau-gcc.sh +++ b/etc/configuration-files/x86_64-ktau-gcc.sh @@ -1,14 +1,14 @@ #platform_malloc="-DJEMALLOC_ROOT=$HOME/install/jemalloc-3.5.1" platform_malloc="-DGPERFTOOLS_ROOT=/usr/local/gperftools/2.5" -#platform_malloc="-DUSE_JEMALLOC=TRUE" -platform_bfd="-DUSE_BFD=TRUE" +#platform_malloc="-DAPEX_WITH_JEMALLOC=TRUE" +platform_bfd="-DAPEX_WITH_BFD=TRUE" platform_ah="-DACTIVEHARMONY_ROOT=/usr/local/activeharmony/4.6" #platform_otf="-DOTF2_ROOT=/usr/local/otf2/2.0" platform_otf="-DOTF2_ROOT=/usr/local/otf2/2.1-debug" #platform_ompt="-DOMPT_ROOT=/usr/local/LLVM-ompt/Release" -platform_ompt="-DOMPT_ROOT=$HOME/src/LLVM-openmp/build-gcc-Release -DUSE_PLUGINS=TRUE" -platform_mpi="-DCMAKE_C_COMPILER=mpicc -DCMAKE_CXX_COMPILER=mpicxx -DUSE_MPI=TRUE" -platform_papi="-DUSE_PAPI=TRUE -DPAPI_ROOT=/usr/local/papi/5.5.0" -platform_tau="-DUSE_TAU=TRUE -DTAU_ROOT=/usr/local/tau/git -DTAU_ARCH=x86_64 -DTAU_OPTIONS=-pthread" +platform_ompt="-DOMPT_ROOT=$HOME/src/LLVM-openmp/build-gcc-Release -DAPEX_WITH_PLUGINS=TRUE" +platform_mpi="-DCMAKE_C_COMPILER=mpicc -DCMAKE_CXX_COMPILER=mpicxx -DAPEX_WITH_MPI=TRUE" +platform_papi="-DAPEX_WITH_PAPI=TRUE -DPAPI_ROOT=/usr/local/papi/5.5.0" +platform_tau="-DAPEX_WITH_TAU=TRUE -DTAU_ROOT=/usr/local/tau/git -DTAU_ARCH=x86_64 -DTAU_OPTIONS=-pthread" parallel_build="-j 8" diff --git a/etc/regression-test.sh b/etc/regression-test.sh index 3bd12521..1cc0f430 100755 --- a/etc/regression-test.sh +++ b/etc/regression-test.sh @@ -163,13 +163,13 @@ conditional_build() # Clean settings malloc="" -bfd="-DUSE_BFD=FALSE" -ah="-DUSE_ACTIVEHARMONY=FALSE" -ompt="-DUSE_OMPT=FALSE" -papi="-DUSE_PAPI=FALSE" -mpi="-DUSE_MPI=FALSE" -otf="-DUSE_OTF2=FALSE" -tau="-DUSE_TAU=FALSE" +bfd="-DAPEX_WITH_BFD=FALSE" +ah="-DAPEX_WITH_ACTIVEHARMONY=FALSE" +ompt="-DAPEX_WITH_OMPT=FALSE" +papi="-DAPEX_WITH_PAPI=FALSE" +mpi="-DAPEX_WITH_MPI=FALSE" +otf="-DAPEX_WITH_OTF2=FALSE" +tau="-DAPEX_WITH_TAU=FALSE" workdir=${rootdir}/regression-${host} diff --git a/etc/spack/package.py b/etc/spack/package.py index 57d54457..f015b274 100644 --- a/etc/spack/package.py +++ b/etc/spack/package.py @@ -58,21 +58,21 @@ def cmake_args(self): args.append('-DAPEX_WITH_CUDA=TRUE') if '+binutils' in spec: args.append('-DBFD_ROOT={0}'.format(spec['binutils'].prefix)) - args.append('-DUSE_BFD=TRUE') + args.append('-DAPEX_WITH_BFD=TRUE') if '+activeharmony' in spec: args.append('-DACTIVEHARMONY_ROOT={0}'.format(spec['activeharmony'].prefix)) - args.append('-DUSE_ACTIVEHARMONY=TRUE') + args.append('-DAPEX_WITH_ACTIVEHARMONY=TRUE') if '+otf2' in spec: args.append('-DOTF2_ROOT={0}'.format(spec['otf2'].prefix)) - args.append('-DUSE_OTF2=TRUE') + args.append('-DAPEX_WITH_OTF2=TRUE') if '+openmp' in spec: - args.append('-DUSE_OMPT=TRUE') + args.append('-DAPEX_WITH_OMPT=TRUE') if '+gperftools' in spec: args.append('-DGPERFTOOLS_ROOT={0}'.format(spec['gperftools'].prefix)) - args.append('-DUSE_TCMALLOC=TRUE') + args.append('-DAPEX_WITH_TCMALLOC=TRUE') if '+jemalloc' in spec: args.append('-DJEMALLOC_ROOT={0}'.format(spec['jemalloc'].prefix)) - args.append('-DUSE_JEMALLOC=TRUE') + args.append('-DAPEX_WITH_JEMALLOC=TRUE') if '+boost' in spec: args.append('-DBOOST_ROOT={0}'.format(spec['boost'].prefix)) diff --git a/src/apex/CMakeLists.hpx b/src/apex/CMakeLists.hpx index a42cb9bb..401b0c94 100644 --- a/src/apex/CMakeLists.hpx +++ b/src/apex/CMakeLists.hpx @@ -219,8 +219,8 @@ endif() # Setup BFD if((DEFINED BFD_ROOT) OR (APEX_WITH_BFD) OR (APEX_BUILD_BFD)) - set(USE_BFD ${APEX_WITH_BFD}) - set(BUILD_BFD ${APEX_BUILD_BFD}) + set(APEX_WITH_BFD ${APEX_WITH_BFD}) + set(APEX_BUILD_BFD ${APEX_BUILD_BFD}) # Setup BFD include(APEX_SetupBFD) set(bfd_sources apex_bfd.cpp address_resolution.cpp) diff --git a/src/apex/apex.cpp b/src/apex/apex.cpp index 3004d48d..3337e853 100644 --- a/src/apex/apex.cpp +++ b/src/apex/apex.cpp @@ -28,7 +28,7 @@ #include #include #include -#if APEX_USE_PLUGINS +#if APEX_WITH_PLUGINS #include #endif //#include // this is for demangling strings. @@ -1260,7 +1260,7 @@ hpx::runtime * get_hpx_runtime_ptr(void) { #endif void init_plugins(void) { -#ifdef APEX_USE_PLUGINS +#ifdef APEX_WITH_PLUGINS FUNCTION_ENTER if (apex_options::disable() == true) { return; } std::string plugin_names_str{apex_options::plugins()}; @@ -1326,7 +1326,7 @@ void init_plugins(void) { } void finalize_plugins(void) { -#ifdef APEX_USE_PLUGINS +#ifdef APEX_WITH_PLUGINS FUNCTION_ENTER if (apex_options::disable() == true) { return; } apex * instance = apex::instance(); diff --git a/src/apex/apex.h b/src/apex/apex.h index 14f9dc90..fa5fed42 100644 --- a/src/apex/apex.h +++ b/src/apex/apex.h @@ -23,6 +23,8 @@ * The C API is required for HPX5 support. */ +#pragma once + #ifndef APEX_H #define APEX_H diff --git a/src/apex/apex_export.h b/src/apex/apex_export.h index 08eadf97..460d46f3 100644 --- a/src/apex/apex_export.h +++ b/src/apex/apex_export.h @@ -6,6 +6,8 @@ * file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) */ +#pragma once + #ifndef APEX_EXPORT_H #define APEX_EXPORT_H diff --git a/src/apex/apex_kokkos.hpp b/src/apex/apex_kokkos.hpp index a6cc0573..82c2b741 100644 --- a/src/apex/apex_kokkos.hpp +++ b/src/apex/apex_kokkos.hpp @@ -6,6 +6,8 @@ * file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) */ +#pragma once + #include typedef struct KokkosPDeviceInfo { diff --git a/src/apex/apex_openacc.hpp b/src/apex/apex_openacc.hpp index 9cf3deb0..eaa22424 100644 --- a/src/apex/apex_openacc.hpp +++ b/src/apex/apex_openacc.hpp @@ -6,6 +6,8 @@ * file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) */ +#pragma once + #include #if defined(__PGI) #include "pgi_acc_prof.h" diff --git a/src/apex/apex_policies.h b/src/apex/apex_policies.h index 402b8385..cb5d13d4 100644 --- a/src/apex/apex_policies.h +++ b/src/apex/apex_policies.h @@ -6,8 +6,7 @@ * file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) */ -#ifndef APEX_POLICIES_H -#define APEX_POLICIES_H +#pragma once #include "apex_export.h" @@ -31,4 +30,3 @@ typedef enum { #define APEX_MIN_THREADS 1 #define MAX_WINDOW_SIZE 3 -#endif // APEX_POLICIES_H diff --git a/src/apex/apex_raja.hpp b/src/apex/apex_raja.hpp index 3a4cf7a3..a55d0d84 100644 --- a/src/apex/apex_raja.hpp +++ b/src/apex/apex_raja.hpp @@ -1,3 +1,5 @@ +#pragma once + #include "RAJA/util/PluginStrategy.hpp" #include "apex_api.hpp" #include diff --git a/src/apex/apex_types.h b/src/apex/apex_types.h index 9b4688a6..1ce9f18b 100644 --- a/src/apex/apex_types.h +++ b/src/apex/apex_types.h @@ -6,9 +6,7 @@ * file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) */ -// apex main class -#ifndef APEX_TYPES_HPP -#define APEX_TYPES_HPP +#pragma once /* required for Doxygen */ @@ -348,4 +346,3 @@ inline unsigned int sc_nprocessors_onln() #endif /* DOXYGEN_SHOULD_SKIP_THIS */ -#endif //APEX_TYPES_HPP diff --git a/src/apex/global_constructor_destructor.h b/src/apex/global_constructor_destructor.h index 821228c7..c23c40bb 100644 --- a/src/apex/global_constructor_destructor.h +++ b/src/apex/global_constructor_destructor.h @@ -9,8 +9,7 @@ /* Portable global constructor/destructor for GCC and MSVC. * I found this code here: http://www.gonwan.com/?p=8 */ -#ifndef GLOBAL_CONSTRUCTOR_DESTRUCTOR_H -#define GLOBAL_CONSTRUCTOR_DESTRUCTOR_H +#pragma once #include #if defined (_MSC_VER) @@ -70,4 +69,3 @@ DEFINE_DESTRUCTOR(apex_finalize_static_void) #endif */ -#endif // GLOBAL_CONSTRUCTOR_DESTRUCTOR_H diff --git a/src/examples/CMakeLists.txt b/src/examples/CMakeLists.txt index 339bcb95..f005d7dc 100644 --- a/src/examples/CMakeLists.txt +++ b/src/examples/CMakeLists.txt @@ -38,7 +38,7 @@ if(OPENMP_FOUND) add_subdirectory (OpenMP_1D_stencil) endif() endif() - if (NOT BUILD_STATIC_EXECUTABLES AND USE_PLUGINS) + if (NOT BUILD_STATIC_EXECUTABLES AND APEX_WITH_PLUGINS) add_subdirectory (OpenMP_Policy) endif() endif() @@ -192,7 +192,7 @@ if(OPENMP_FOUND) set_property (TEST ExampleOpenMPStencil APPEND PROPERTY ENVIRONMENT "OMP_NUM_THREADS=${PROCESSOR_COUNT}") endif() - if (NOT BUILD_STATIC_EXECUTABLES AND USE_PLUGINS) + if (NOT BUILD_STATIC_EXECUTABLES AND APEX_WITH_PLUGINS) add_test (ExampleOpenMP_Policy OpenMP_Policy/policy_test) set_property (TEST ExampleOpenMP_Policy APPEND PROPERTY ENVIRONMENT "OMP_NUM_THREADS=${PROCESSOR_COUNT}") diff --git a/src/examples/LuleshMPI/CMakeLists.txt b/src/examples/LuleshMPI/CMakeLists.txt index 14c26a29..243abd7d 100644 --- a/src/examples/LuleshMPI/CMakeLists.txt +++ b/src/examples/LuleshMPI/CMakeLists.txt @@ -15,8 +15,8 @@ add_executable (lulesh_MPI_2.0 lulesh.cc lulesh-comm.cc lulesh-init.cc lulesh-ut add_dependencies (lulesh_MPI_2.0 apex) add_dependencies (examples lulesh_MPI_2.0) -set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -O3 -DUSE_MPI=1") -set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O3 -DUSE_MPI=1") +set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -O3 -DAPEX_WITH_MPI=1") +set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O3 -DAPEX_WITH_MPI=1") # Link the executable to the Apex library. target_link_libraries (lulesh_MPI_2.0 apex apex_mpi diff --git a/src/examples/LuleshMPI/lulesh-comm.cc b/src/examples/LuleshMPI/lulesh-comm.cc index 9a882e21..ee79026e 100644 --- a/src/examples/LuleshMPI/lulesh-comm.cc +++ b/src/examples/LuleshMPI/lulesh-comm.cc @@ -1,7 +1,7 @@ #include "lulesh.h" // If no MPI, then this whole file is stubbed out -#if USE_MPI +#if APEX_WITH_MPI #include #include diff --git a/src/examples/LuleshMPI/lulesh-init.cc b/src/examples/LuleshMPI/lulesh-init.cc index 4ad6cbf0..6b641a87 100644 --- a/src/examples/LuleshMPI/lulesh-init.cc +++ b/src/examples/LuleshMPI/lulesh-init.cc @@ -1,5 +1,5 @@ #include -#if USE_MPI +#if APEX_WITH_MPI # include #endif #if _OPENMP @@ -295,7 +295,7 @@ Domain::SetupThreadSupportStructures() if ((clv < 0) || (clv > numElem()*8)) { fprintf(stderr, "AllocateNodeElemIndexes(): nodeElemCornerList entry out of range!\n"); -#if USE_MPI +#if APEX_WITH_MPI MPI_Abort(MPI_COMM_WORLD, -1); #else exit(-1); @@ -330,7 +330,7 @@ Domain::SetupCommBuffers(Int_t edgeNodes) m_planeMin = (m_planeLoc == 0) ? 0 : 1; m_planeMax = (m_planeLoc == m_tp-1) ? 0 : 1; -#if USE_MPI +#if APEX_WITH_MPI // account for face communication Index_t comBufSize = (m_rowMin + m_rowMax + m_colMin + m_colMax + m_planeMin + m_planeMax) * @@ -376,7 +376,7 @@ Domain::SetupCommBuffers(Int_t edgeNodes) void Domain::CreateRegionIndexSets(Int_t nr, Int_t balance) { -#if USE_MPI +#if APEX_WITH_MPI Index_t myRank; MPI_Comm_rank(MPI_COMM_WORLD, &myRank) ; srand(myRank); @@ -658,7 +658,7 @@ void InitMeshDecomp(Int_t numRanks, Int_t myRank, testProcs = Int_t(cbrt(Real_t(numRanks))+0.5) ; if (testProcs*testProcs*testProcs != numRanks) { printf("Num processors must be a cube of an integer (1, 8, 27, ...)\n") ; -#if USE_MPI +#if APEX_WITH_MPI MPI_Abort(MPI_COMM_WORLD, -1) ; #else exit(-1); @@ -666,7 +666,7 @@ void InitMeshDecomp(Int_t numRanks, Int_t myRank, } if (sizeof(Real_t) != 4 && sizeof(Real_t) != 8) { printf("MPI operations only support float and double right now...\n"); -#if USE_MPI +#if APEX_WITH_MPI MPI_Abort(MPI_COMM_WORLD, -1) ; #else exit(-1); @@ -674,7 +674,7 @@ void InitMeshDecomp(Int_t numRanks, Int_t myRank, } if (MAX_FIELDS_PER_MPI_COMM > CACHE_COHERENCE_PAD_REAL) { printf("corner element comm buffers too small. Fix code.\n") ; -#if USE_MPI +#if APEX_WITH_MPI MPI_Abort(MPI_COMM_WORLD, -1) ; #else exit(-1); @@ -688,7 +688,7 @@ void InitMeshDecomp(Int_t numRanks, Int_t myRank, // temporary test if (dx*dy*dz != numRanks) { printf("error -- must have as many domains as procs\n") ; -#if USE_MPI +#if APEX_WITH_MPI MPI_Abort(MPI_COMM_WORLD, -1) ; #else exit(-1); diff --git a/src/examples/LuleshMPI/lulesh-util.cc b/src/examples/LuleshMPI/lulesh-util.cc index 2fac8fd9..110e4a3c 100644 --- a/src/examples/LuleshMPI/lulesh-util.cc +++ b/src/examples/LuleshMPI/lulesh-util.cc @@ -2,7 +2,7 @@ #include #include #include -#if USE_MPI +#if APEX_WITH_MPI #include #endif #include "lulesh.h" @@ -49,7 +49,7 @@ static void ParseError(const char *message, int myRank) { if (myRank == 0) { printf("%s\n", message); -#if USE_MPI +#if APEX_WITH_MPI MPI_Abort(MPI_COMM_WORLD, -1); #else exit(-1); @@ -151,7 +151,7 @@ void ParseCommandLineOptions(int argc, char *argv[], /* -h */ else if (strcmp(argv[i], "-h") == 0) { PrintCommandLineOptions(argv[0], myRank); -#if USE_MPI +#if APEX_WITH_MPI MPI_Abort(MPI_COMM_WORLD, 0); #else exit(0); diff --git a/src/examples/LuleshMPI/lulesh-viz.cc b/src/examples/LuleshMPI/lulesh-viz.cc index 1d7b16c9..795a406a 100644 --- a/src/examples/LuleshMPI/lulesh-viz.cc +++ b/src/examples/LuleshMPI/lulesh-viz.cc @@ -10,7 +10,7 @@ extern "C" { #endif #include "silo.h" -#if USE_MPI +#if APEX_WITH_MPI # include "pmpio.h" #endif #ifdef __cplusplus @@ -23,7 +23,7 @@ DumpDomainToVisit(DBfile *db, Domain& domain, int myRank); static -#if USE_MPI +#if APEX_WITH_MPI // For some reason, earlier versions of g++ (e.g. 4.2) won't let me // put the 'static' qualifier on this prototype, even if it's done // consistently in the prototype and definition @@ -62,7 +62,7 @@ void DumpToVisit(Domain& domain, int numFiles, int myRank, int numRanks) sprintf(basename, "lulesh_plot_c%d", domain.cycle()); sprintf(subdirName, "data_%d", myRank); -#if USE_MPI +#if APEX_WITH_MPI PMPIO_baton_t *bat = PMPIO_Init(numFiles, PMPIO_WRITE, @@ -258,7 +258,7 @@ DumpDomainToVisit(DBfile *db, Domain& domain, int myRank) /**********************************************************************/ -#if USE_MPI +#if APEX_WITH_MPI void DumpMultiblockObjects(DBfile *db, PMPIO_baton_t *bat, char basename[], int numRanks) @@ -304,7 +304,7 @@ void // Build up the multiobject names for(int i=0 ; i= 0) { -#if USE_MPI +#if APEX_WITH_MPI MPI_Abort(MPI_COMM_WORLD, QStopError) ; #else exit(QStopError); @@ -2357,7 +2357,7 @@ void ApplyMaterialPropertiesForElems(Domain& domain, Real_t vnew[]) vc = eosvmax ; } if (vc <= 0.) { -#if USE_MPI +#if APEX_WITH_MPI MPI_Abort(MPI_COMM_WORLD, VolumeError) ; #else exit(VolumeError); @@ -2578,7 +2578,7 @@ void LagrangeLeapFrog(Domain& domain) * material states */ LagrangeElements(domain, domain.numElem()); -#if USE_MPI +#if APEX_WITH_MPI #ifdef SEDOV_SYNC_POS_VEL_LATE CommRecv(domain, MSG_SYNC_POS_VEL, 6, domain.sizeX() + 1, domain.sizeY() + 1, domain.sizeZ() + 1, @@ -2599,7 +2599,7 @@ void LagrangeLeapFrog(Domain& domain) CalcTimeConstraintsForElems(domain); -#if USE_MPI +#if APEX_WITH_MPI #ifdef SEDOV_SYNC_POS_VEL_LATE CommSyncPosVel(domain) ; #endif @@ -2618,7 +2618,7 @@ int main(int argc, char *argv[]) Int_t myRank ; struct cmdLineOpts opts; -#if USE_MPI +#if APEX_WITH_MPI Domain_member fieldData ; MPI_Init(&argc, &argv) ; @@ -2668,7 +2668,7 @@ int main(int argc, char *argv[]) side, opts.numReg, opts.balance, opts.cost) ; -#if USE_MPI +#if APEX_WITH_MPI fieldData = &Domain::nodalMass ; // Initial domain boundary communication @@ -2685,7 +2685,7 @@ int main(int argc, char *argv[]) #endif // BEGIN timestep to solution */ -#if USE_MPI +#if APEX_WITH_MPI double start = MPI_Wtime(); #else timeval start; @@ -2710,7 +2710,7 @@ int main(int argc, char *argv[]) // Use reduced max elapsed time double elapsed_time; -#if USE_MPI +#if APEX_WITH_MPI elapsed_time = MPI_Wtime() - start; #else timeval end; @@ -2718,7 +2718,7 @@ int main(int argc, char *argv[]) elapsed_time = (double)(end.tv_sec - start.tv_sec) + ((double)(end.tv_usec - start.tv_usec))/1000000 ; #endif double elapsed_timeG; -#if USE_MPI +#if APEX_WITH_MPI MPI_Reduce(&elapsed_time, &elapsed_timeG, 1, MPI_DOUBLE, MPI_MAX, 0, MPI_COMM_WORLD); #else @@ -2735,7 +2735,7 @@ int main(int argc, char *argv[]) } apex::finalize(); -#if USE_MPI +#if APEX_WITH_MPI MPI_Finalize() ; #endif diff --git a/src/examples/LuleshMPI/lulesh.h b/src/examples/LuleshMPI/lulesh.h index b6afd5c4..dcc704f9 100644 --- a/src/examples/LuleshMPI/lulesh.h +++ b/src/examples/LuleshMPI/lulesh.h @@ -1,5 +1,5 @@ -#if !defined(USE_MPI) -# error "You should specify USE_MPI=0 or USE_MPI=1 on the compile line" +#if !defined(APEX_WITH_MPI) +# error "You should specify APEX_WITH_MPI=0 or APEX_WITH_MPI=1 on the compile line" #endif @@ -7,7 +7,7 @@ // used supports it (i.e. the _OPENMP symbol is defined) #define USE_OMP 1 -#if USE_MPI +#if APEX_WITH_MPI #include /* @@ -403,7 +403,7 @@ class Domain { // MPI-Related additional data // -#if USE_MPI +#if APEX_WITH_MPI // Communication Work space Real_t *commDataSend ; Real_t *commDataRecv ; diff --git a/src/examples/LuleshMPI/lulesh_tuple.h b/src/examples/LuleshMPI/lulesh_tuple.h index 9ad7412f..7fb8f52d 100644 --- a/src/examples/LuleshMPI/lulesh_tuple.h +++ b/src/examples/LuleshMPI/lulesh_tuple.h @@ -1,5 +1,5 @@ -#if !defined(USE_MPI) -# error "You should specify USE_MPI=0 or USE_MPI=1 on the compile line" +#if !defined(APEX_WITH_MPI) +# error "You should specify APEX_WITH_MPI=0 or APEX_WITH_MPI=1 on the compile line" #endif @@ -7,7 +7,7 @@ // used supports it (i.e. the _OPENMP symbol is defined) #define USE_OMP 1 -#if USE_MPI +#if APEX_WITH_MPI #include #endif @@ -390,7 +390,7 @@ class Domain { // MPI-Related additional data // -#if USE_MPI +#if APEX_WITH_MPI // Communication Work space Real_t *commDataSend ; Real_t *commDataRecv ; diff --git a/src/examples/LuleshMPIOpenMP/CMakeLists.txt b/src/examples/LuleshMPIOpenMP/CMakeLists.txt index 126a2181..ebf7db15 100644 --- a/src/examples/LuleshMPIOpenMP/CMakeLists.txt +++ b/src/examples/LuleshMPIOpenMP/CMakeLists.txt @@ -15,8 +15,8 @@ add_executable (lulesh_MPI_OpenMP_2.0 lulesh.cc lulesh-comm.cc lulesh-init.cc lu add_dependencies (lulesh_MPI_OpenMP_2.0 apex) add_dependencies (examples lulesh_MPI_OpenMP_2.0) -set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS} -O3 -DUSE_MPI=1 -Wall") -set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS} -O3 -DUSE_MPI=1 -Wall") +set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS} -O3 -DAPEX_WITH_MPI=1 -Wall") +set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS} -O3 -DAPEX_WITH_MPI=1 -Wall") # Link the executable to the Apex library. target_link_libraries (lulesh_MPI_OpenMP_2.0 apex apex_mpi ${OMPT_LIBRARIES} diff --git a/src/examples/LuleshMPIOpenMP/lulesh-comm.cc b/src/examples/LuleshMPIOpenMP/lulesh-comm.cc index a30c3ec1..390e1774 100644 --- a/src/examples/LuleshMPIOpenMP/lulesh-comm.cc +++ b/src/examples/LuleshMPIOpenMP/lulesh-comm.cc @@ -1,7 +1,7 @@ #include "lulesh.h" // If no MPI, then this whole file is stubbed out -#if USE_MPI +#if APEX_WITH_MPI #include #include diff --git a/src/examples/LuleshMPIOpenMP/lulesh-init.cc b/src/examples/LuleshMPIOpenMP/lulesh-init.cc index 4ad6cbf0..6b641a87 100644 --- a/src/examples/LuleshMPIOpenMP/lulesh-init.cc +++ b/src/examples/LuleshMPIOpenMP/lulesh-init.cc @@ -1,5 +1,5 @@ #include -#if USE_MPI +#if APEX_WITH_MPI # include #endif #if _OPENMP @@ -295,7 +295,7 @@ Domain::SetupThreadSupportStructures() if ((clv < 0) || (clv > numElem()*8)) { fprintf(stderr, "AllocateNodeElemIndexes(): nodeElemCornerList entry out of range!\n"); -#if USE_MPI +#if APEX_WITH_MPI MPI_Abort(MPI_COMM_WORLD, -1); #else exit(-1); @@ -330,7 +330,7 @@ Domain::SetupCommBuffers(Int_t edgeNodes) m_planeMin = (m_planeLoc == 0) ? 0 : 1; m_planeMax = (m_planeLoc == m_tp-1) ? 0 : 1; -#if USE_MPI +#if APEX_WITH_MPI // account for face communication Index_t comBufSize = (m_rowMin + m_rowMax + m_colMin + m_colMax + m_planeMin + m_planeMax) * @@ -376,7 +376,7 @@ Domain::SetupCommBuffers(Int_t edgeNodes) void Domain::CreateRegionIndexSets(Int_t nr, Int_t balance) { -#if USE_MPI +#if APEX_WITH_MPI Index_t myRank; MPI_Comm_rank(MPI_COMM_WORLD, &myRank) ; srand(myRank); @@ -658,7 +658,7 @@ void InitMeshDecomp(Int_t numRanks, Int_t myRank, testProcs = Int_t(cbrt(Real_t(numRanks))+0.5) ; if (testProcs*testProcs*testProcs != numRanks) { printf("Num processors must be a cube of an integer (1, 8, 27, ...)\n") ; -#if USE_MPI +#if APEX_WITH_MPI MPI_Abort(MPI_COMM_WORLD, -1) ; #else exit(-1); @@ -666,7 +666,7 @@ void InitMeshDecomp(Int_t numRanks, Int_t myRank, } if (sizeof(Real_t) != 4 && sizeof(Real_t) != 8) { printf("MPI operations only support float and double right now...\n"); -#if USE_MPI +#if APEX_WITH_MPI MPI_Abort(MPI_COMM_WORLD, -1) ; #else exit(-1); @@ -674,7 +674,7 @@ void InitMeshDecomp(Int_t numRanks, Int_t myRank, } if (MAX_FIELDS_PER_MPI_COMM > CACHE_COHERENCE_PAD_REAL) { printf("corner element comm buffers too small. Fix code.\n") ; -#if USE_MPI +#if APEX_WITH_MPI MPI_Abort(MPI_COMM_WORLD, -1) ; #else exit(-1); @@ -688,7 +688,7 @@ void InitMeshDecomp(Int_t numRanks, Int_t myRank, // temporary test if (dx*dy*dz != numRanks) { printf("error -- must have as many domains as procs\n") ; -#if USE_MPI +#if APEX_WITH_MPI MPI_Abort(MPI_COMM_WORLD, -1) ; #else exit(-1); diff --git a/src/examples/LuleshMPIOpenMP/lulesh-util.cc b/src/examples/LuleshMPIOpenMP/lulesh-util.cc index 2fac8fd9..110e4a3c 100644 --- a/src/examples/LuleshMPIOpenMP/lulesh-util.cc +++ b/src/examples/LuleshMPIOpenMP/lulesh-util.cc @@ -2,7 +2,7 @@ #include #include #include -#if USE_MPI +#if APEX_WITH_MPI #include #endif #include "lulesh.h" @@ -49,7 +49,7 @@ static void ParseError(const char *message, int myRank) { if (myRank == 0) { printf("%s\n", message); -#if USE_MPI +#if APEX_WITH_MPI MPI_Abort(MPI_COMM_WORLD, -1); #else exit(-1); @@ -151,7 +151,7 @@ void ParseCommandLineOptions(int argc, char *argv[], /* -h */ else if (strcmp(argv[i], "-h") == 0) { PrintCommandLineOptions(argv[0], myRank); -#if USE_MPI +#if APEX_WITH_MPI MPI_Abort(MPI_COMM_WORLD, 0); #else exit(0); diff --git a/src/examples/LuleshMPIOpenMP/lulesh-viz.cc b/src/examples/LuleshMPIOpenMP/lulesh-viz.cc index 1d7b16c9..795a406a 100644 --- a/src/examples/LuleshMPIOpenMP/lulesh-viz.cc +++ b/src/examples/LuleshMPIOpenMP/lulesh-viz.cc @@ -10,7 +10,7 @@ extern "C" { #endif #include "silo.h" -#if USE_MPI +#if APEX_WITH_MPI # include "pmpio.h" #endif #ifdef __cplusplus @@ -23,7 +23,7 @@ DumpDomainToVisit(DBfile *db, Domain& domain, int myRank); static -#if USE_MPI +#if APEX_WITH_MPI // For some reason, earlier versions of g++ (e.g. 4.2) won't let me // put the 'static' qualifier on this prototype, even if it's done // consistently in the prototype and definition @@ -62,7 +62,7 @@ void DumpToVisit(Domain& domain, int numFiles, int myRank, int numRanks) sprintf(basename, "lulesh_plot_c%d", domain.cycle()); sprintf(subdirName, "data_%d", myRank); -#if USE_MPI +#if APEX_WITH_MPI PMPIO_baton_t *bat = PMPIO_Init(numFiles, PMPIO_WRITE, @@ -258,7 +258,7 @@ DumpDomainToVisit(DBfile *db, Domain& domain, int myRank) /**********************************************************************/ -#if USE_MPI +#if APEX_WITH_MPI void DumpMultiblockObjects(DBfile *db, PMPIO_baton_t *bat, char basename[], int numRanks) @@ -304,7 +304,7 @@ void // Build up the multiobject names for(int i=0 ; i= 0) { -#if USE_MPI +#if APEX_WITH_MPI MPI_Abort(MPI_COMM_WORLD, QStopError) ; #else exit(QStopError); @@ -2412,7 +2412,7 @@ void ApplyMaterialPropertiesForElems(Domain& domain, Real_t vnew[]) vc = eosvmax ; } if (vc <= 0.) { -#if USE_MPI +#if APEX_WITH_MPI MPI_Abort(MPI_COMM_WORLD, VolumeError) ; #else exit(VolumeError); @@ -2669,7 +2669,7 @@ void LagrangeLeapFrog(Domain& domain) * material states */ LagrangeElements(domain, domain.numElem()); -#if USE_MPI +#if APEX_WITH_MPI #ifdef SEDOV_SYNC_POS_VEL_LATE CommRecv(domain, MSG_SYNC_POS_VEL, 6, domain.sizeX() + 1, domain.sizeY() + 1, domain.sizeZ() + 1, @@ -2690,7 +2690,7 @@ void LagrangeLeapFrog(Domain& domain) CalcTimeConstraintsForElems(domain); -#if USE_MPI +#if APEX_WITH_MPI #ifdef SEDOV_SYNC_POS_VEL_LATE CommSyncPosVel(domain) ; #endif @@ -2708,7 +2708,7 @@ int main(int argc, char *argv[]) Int_t myRank ; struct cmdLineOpts opts; -#if USE_MPI +#if APEX_WITH_MPI Domain_member fieldData ; //MPI_Init(&argc, &argv) ; @@ -2771,7 +2771,7 @@ int main(int argc, char *argv[]) side, opts.numReg, opts.balance, opts.cost) ; -#if USE_MPI +#if APEX_WITH_MPI fieldData = &Domain::nodalMass ; // Initial domain boundary communication @@ -2788,7 +2788,7 @@ int main(int argc, char *argv[]) #endif // BEGIN timestep to solution */ -#if USE_MPI +#if APEX_WITH_MPI double start = MPI_Wtime(); #else timeval start; @@ -2813,7 +2813,7 @@ int main(int argc, char *argv[]) // Use reduced max elapsed time double elapsed_time; -#if USE_MPI +#if APEX_WITH_MPI elapsed_time = MPI_Wtime() - start; #else timeval end; @@ -2821,7 +2821,7 @@ int main(int argc, char *argv[]) elapsed_time = (double)(end.tv_sec - start.tv_sec) + ((double)(end.tv_usec - start.tv_usec))/1000000 ; #endif double elapsed_timeG; -#if USE_MPI +#if APEX_WITH_MPI MPI_Reduce(&elapsed_time, &elapsed_timeG, 1, MPI_DOUBLE, MPI_MAX, 0, MPI_COMM_WORLD); #else @@ -2839,7 +2839,7 @@ int main(int argc, char *argv[]) //apex_global_teardown(); // do this before MPI_Finalize apex::finalize(); -#if USE_MPI +#if APEX_WITH_MPI MPI_Finalize() ; #endif diff --git a/src/examples/LuleshMPIOpenMP/lulesh.h b/src/examples/LuleshMPIOpenMP/lulesh.h index b6afd5c4..dcc704f9 100644 --- a/src/examples/LuleshMPIOpenMP/lulesh.h +++ b/src/examples/LuleshMPIOpenMP/lulesh.h @@ -1,5 +1,5 @@ -#if !defined(USE_MPI) -# error "You should specify USE_MPI=0 or USE_MPI=1 on the compile line" +#if !defined(APEX_WITH_MPI) +# error "You should specify APEX_WITH_MPI=0 or APEX_WITH_MPI=1 on the compile line" #endif @@ -7,7 +7,7 @@ // used supports it (i.e. the _OPENMP symbol is defined) #define USE_OMP 1 -#if USE_MPI +#if APEX_WITH_MPI #include /* @@ -403,7 +403,7 @@ class Domain { // MPI-Related additional data // -#if USE_MPI +#if APEX_WITH_MPI // Communication Work space Real_t *commDataSend ; Real_t *commDataRecv ; diff --git a/src/examples/LuleshMPIOpenMP/lulesh_tuple.h b/src/examples/LuleshMPIOpenMP/lulesh_tuple.h index 9ad7412f..7fb8f52d 100644 --- a/src/examples/LuleshMPIOpenMP/lulesh_tuple.h +++ b/src/examples/LuleshMPIOpenMP/lulesh_tuple.h @@ -1,5 +1,5 @@ -#if !defined(USE_MPI) -# error "You should specify USE_MPI=0 or USE_MPI=1 on the compile line" +#if !defined(APEX_WITH_MPI) +# error "You should specify APEX_WITH_MPI=0 or APEX_WITH_MPI=1 on the compile line" #endif @@ -7,7 +7,7 @@ // used supports it (i.e. the _OPENMP symbol is defined) #define USE_OMP 1 -#if USE_MPI +#if APEX_WITH_MPI #include #endif @@ -390,7 +390,7 @@ class Domain { // MPI-Related additional data // -#if USE_MPI +#if APEX_WITH_MPI // Communication Work space Real_t *commDataSend ; Real_t *commDataRecv ; diff --git a/src/examples/LuleshOpenMP/CMakeLists.txt b/src/examples/LuleshOpenMP/CMakeLists.txt index 7a875776..e130c7f2 100644 --- a/src/examples/LuleshOpenMP/CMakeLists.txt +++ b/src/examples/LuleshOpenMP/CMakeLists.txt @@ -12,8 +12,8 @@ add_dependencies (examples lulesh_OpenMP_2.0) set (CMAKE_C_FLAGS_RELEASE "-O3") # can't exceed this, for math reasons. set (CMAKE_CXX_FLAGS_RELEASE "-O3") # can't exceed this, for math reasons. -set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS} -DUSE_MPI=0 -Wall") -set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS} -DUSE_MPI=0 -Wall") +set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS} -DAPEX_WITH_MPI=0 -Wall") +set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS} -DAPEX_WITH_MPI=0 -Wall") # Link the executable to the Apex library. target_link_libraries (lulesh_OpenMP_2.0 apex ${OMPT_LIBRARIES} ${LIBS}) diff --git a/src/examples/LuleshOpenMP/lulesh-comm.cc b/src/examples/LuleshOpenMP/lulesh-comm.cc index a30c3ec1..390e1774 100644 --- a/src/examples/LuleshOpenMP/lulesh-comm.cc +++ b/src/examples/LuleshOpenMP/lulesh-comm.cc @@ -1,7 +1,7 @@ #include "lulesh.h" // If no MPI, then this whole file is stubbed out -#if USE_MPI +#if APEX_WITH_MPI #include #include diff --git a/src/examples/LuleshOpenMP/lulesh-init.cc b/src/examples/LuleshOpenMP/lulesh-init.cc index 4ad6cbf0..6b641a87 100644 --- a/src/examples/LuleshOpenMP/lulesh-init.cc +++ b/src/examples/LuleshOpenMP/lulesh-init.cc @@ -1,5 +1,5 @@ #include -#if USE_MPI +#if APEX_WITH_MPI # include #endif #if _OPENMP @@ -295,7 +295,7 @@ Domain::SetupThreadSupportStructures() if ((clv < 0) || (clv > numElem()*8)) { fprintf(stderr, "AllocateNodeElemIndexes(): nodeElemCornerList entry out of range!\n"); -#if USE_MPI +#if APEX_WITH_MPI MPI_Abort(MPI_COMM_WORLD, -1); #else exit(-1); @@ -330,7 +330,7 @@ Domain::SetupCommBuffers(Int_t edgeNodes) m_planeMin = (m_planeLoc == 0) ? 0 : 1; m_planeMax = (m_planeLoc == m_tp-1) ? 0 : 1; -#if USE_MPI +#if APEX_WITH_MPI // account for face communication Index_t comBufSize = (m_rowMin + m_rowMax + m_colMin + m_colMax + m_planeMin + m_planeMax) * @@ -376,7 +376,7 @@ Domain::SetupCommBuffers(Int_t edgeNodes) void Domain::CreateRegionIndexSets(Int_t nr, Int_t balance) { -#if USE_MPI +#if APEX_WITH_MPI Index_t myRank; MPI_Comm_rank(MPI_COMM_WORLD, &myRank) ; srand(myRank); @@ -658,7 +658,7 @@ void InitMeshDecomp(Int_t numRanks, Int_t myRank, testProcs = Int_t(cbrt(Real_t(numRanks))+0.5) ; if (testProcs*testProcs*testProcs != numRanks) { printf("Num processors must be a cube of an integer (1, 8, 27, ...)\n") ; -#if USE_MPI +#if APEX_WITH_MPI MPI_Abort(MPI_COMM_WORLD, -1) ; #else exit(-1); @@ -666,7 +666,7 @@ void InitMeshDecomp(Int_t numRanks, Int_t myRank, } if (sizeof(Real_t) != 4 && sizeof(Real_t) != 8) { printf("MPI operations only support float and double right now...\n"); -#if USE_MPI +#if APEX_WITH_MPI MPI_Abort(MPI_COMM_WORLD, -1) ; #else exit(-1); @@ -674,7 +674,7 @@ void InitMeshDecomp(Int_t numRanks, Int_t myRank, } if (MAX_FIELDS_PER_MPI_COMM > CACHE_COHERENCE_PAD_REAL) { printf("corner element comm buffers too small. Fix code.\n") ; -#if USE_MPI +#if APEX_WITH_MPI MPI_Abort(MPI_COMM_WORLD, -1) ; #else exit(-1); @@ -688,7 +688,7 @@ void InitMeshDecomp(Int_t numRanks, Int_t myRank, // temporary test if (dx*dy*dz != numRanks) { printf("error -- must have as many domains as procs\n") ; -#if USE_MPI +#if APEX_WITH_MPI MPI_Abort(MPI_COMM_WORLD, -1) ; #else exit(-1); diff --git a/src/examples/LuleshOpenMP/lulesh-util.cc b/src/examples/LuleshOpenMP/lulesh-util.cc index 2fac8fd9..110e4a3c 100644 --- a/src/examples/LuleshOpenMP/lulesh-util.cc +++ b/src/examples/LuleshOpenMP/lulesh-util.cc @@ -2,7 +2,7 @@ #include #include #include -#if USE_MPI +#if APEX_WITH_MPI #include #endif #include "lulesh.h" @@ -49,7 +49,7 @@ static void ParseError(const char *message, int myRank) { if (myRank == 0) { printf("%s\n", message); -#if USE_MPI +#if APEX_WITH_MPI MPI_Abort(MPI_COMM_WORLD, -1); #else exit(-1); @@ -151,7 +151,7 @@ void ParseCommandLineOptions(int argc, char *argv[], /* -h */ else if (strcmp(argv[i], "-h") == 0) { PrintCommandLineOptions(argv[0], myRank); -#if USE_MPI +#if APEX_WITH_MPI MPI_Abort(MPI_COMM_WORLD, 0); #else exit(0); diff --git a/src/examples/LuleshOpenMP/lulesh-viz.cc b/src/examples/LuleshOpenMP/lulesh-viz.cc index 1d7b16c9..795a406a 100644 --- a/src/examples/LuleshOpenMP/lulesh-viz.cc +++ b/src/examples/LuleshOpenMP/lulesh-viz.cc @@ -10,7 +10,7 @@ extern "C" { #endif #include "silo.h" -#if USE_MPI +#if APEX_WITH_MPI # include "pmpio.h" #endif #ifdef __cplusplus @@ -23,7 +23,7 @@ DumpDomainToVisit(DBfile *db, Domain& domain, int myRank); static -#if USE_MPI +#if APEX_WITH_MPI // For some reason, earlier versions of g++ (e.g. 4.2) won't let me // put the 'static' qualifier on this prototype, even if it's done // consistently in the prototype and definition @@ -62,7 +62,7 @@ void DumpToVisit(Domain& domain, int numFiles, int myRank, int numRanks) sprintf(basename, "lulesh_plot_c%d", domain.cycle()); sprintf(subdirName, "data_%d", myRank); -#if USE_MPI +#if APEX_WITH_MPI PMPIO_baton_t *bat = PMPIO_Init(numFiles, PMPIO_WRITE, @@ -258,7 +258,7 @@ DumpDomainToVisit(DBfile *db, Domain& domain, int myRank) /**********************************************************************/ -#if USE_MPI +#if APEX_WITH_MPI void DumpMultiblockObjects(DBfile *db, PMPIO_baton_t *bat, char basename[], int numRanks) @@ -304,7 +304,7 @@ void // Build up the multiobject names for(int i=0 ; i= 0) { -#if USE_MPI +#if APEX_WITH_MPI MPI_Abort(MPI_COMM_WORLD, QStopError) ; #else exit(QStopError); @@ -2430,7 +2430,7 @@ void ApplyMaterialPropertiesForElems(Domain& domain, Real_t vnew[]) vc = eosvmax ; } if (vc <= 0.) { -#if USE_MPI +#if APEX_WITH_MPI MPI_Abort(MPI_COMM_WORLD, VolumeError) ; #else exit(VolumeError); @@ -2701,7 +2701,7 @@ void LagrangeLeapFrog(Domain& domain) * material states */ LagrangeElements(domain, domain.numElem()); -#if USE_MPI +#if APEX_WITH_MPI #ifdef SEDOV_SYNC_POS_VEL_LATE CommRecv(domain, MSG_SYNC_POS_VEL, 6, domain.sizeX() + 1, domain.sizeY() + 1, domain.sizeZ() + 1, @@ -2722,7 +2722,7 @@ void LagrangeLeapFrog(Domain& domain) CalcTimeConstraintsForElems(domain); -#if USE_MPI +#if APEX_WITH_MPI #ifdef SEDOV_SYNC_POS_VEL_LATE CommSyncPosVel(domain) ; #endif @@ -2740,7 +2740,7 @@ int main(int argc, char *argv[]) Int_t myRank ; struct cmdLineOpts opts; -#if USE_MPI +#if APEX_WITH_MPI Domain_member fieldData ; MPI_Init(&argc, &argv) ; @@ -2793,7 +2793,7 @@ int main(int argc, char *argv[]) side, opts.numReg, opts.balance, opts.cost) ; -#if USE_MPI +#if APEX_WITH_MPI fieldData = &Domain::nodalMass ; // Initial domain boundary communication @@ -2810,7 +2810,7 @@ int main(int argc, char *argv[]) #endif // BEGIN timestep to solution */ -#if USE_MPI +#if APEX_WITH_MPI double start = MPI_Wtime(); #else timeval start; @@ -2835,7 +2835,7 @@ int main(int argc, char *argv[]) // Use reduced max elapsed time double elapsed_time; -#if USE_MPI +#if APEX_WITH_MPI elapsed_time = MPI_Wtime() - start; #else timeval end; @@ -2843,7 +2843,7 @@ int main(int argc, char *argv[]) elapsed_time = (double)(end.tv_sec - start.tv_sec) + ((double)(end.tv_usec - start.tv_usec))/1000000 ; #endif double elapsed_timeG; -#if USE_MPI +#if APEX_WITH_MPI MPI_Reduce(&elapsed_time, &elapsed_timeG, 1, MPI_DOUBLE, MPI_MAX, 0, MPI_COMM_WORLD); #else @@ -2860,7 +2860,7 @@ int main(int argc, char *argv[]) } apex_finalize(); -#if USE_MPI +#if APEX_WITH_MPI MPI_Finalize() ; #endif diff --git a/src/examples/LuleshOpenMP/lulesh.h b/src/examples/LuleshOpenMP/lulesh.h index b6afd5c4..dcc704f9 100644 --- a/src/examples/LuleshOpenMP/lulesh.h +++ b/src/examples/LuleshOpenMP/lulesh.h @@ -1,5 +1,5 @@ -#if !defined(USE_MPI) -# error "You should specify USE_MPI=0 or USE_MPI=1 on the compile line" +#if !defined(APEX_WITH_MPI) +# error "You should specify APEX_WITH_MPI=0 or APEX_WITH_MPI=1 on the compile line" #endif @@ -7,7 +7,7 @@ // used supports it (i.e. the _OPENMP symbol is defined) #define USE_OMP 1 -#if USE_MPI +#if APEX_WITH_MPI #include /* @@ -403,7 +403,7 @@ class Domain { // MPI-Related additional data // -#if USE_MPI +#if APEX_WITH_MPI // Communication Work space Real_t *commDataSend ; Real_t *commDataRecv ; diff --git a/src/examples/LuleshOpenMP/lulesh_tuple.h b/src/examples/LuleshOpenMP/lulesh_tuple.h index 9ad7412f..7fb8f52d 100644 --- a/src/examples/LuleshOpenMP/lulesh_tuple.h +++ b/src/examples/LuleshOpenMP/lulesh_tuple.h @@ -1,5 +1,5 @@ -#if !defined(USE_MPI) -# error "You should specify USE_MPI=0 or USE_MPI=1 on the compile line" +#if !defined(APEX_WITH_MPI) +# error "You should specify APEX_WITH_MPI=0 or APEX_WITH_MPI=1 on the compile line" #endif @@ -7,7 +7,7 @@ // used supports it (i.e. the _OPENMP symbol is defined) #define USE_OMP 1 -#if USE_MPI +#if APEX_WITH_MPI #include #endif @@ -390,7 +390,7 @@ class Domain { // MPI-Related additional data // -#if USE_MPI +#if APEX_WITH_MPI // Communication Work space Real_t *commDataSend ; Real_t *commDataRecv ; diff --git a/src/unit_tests/C++/CMakeLists.txt b/src/unit_tests/C++/CMakeLists.txt index 3a8d6ae0..830ab1db 100644 --- a/src/unit_tests/C++/CMakeLists.txt +++ b/src/unit_tests/C++/CMakeLists.txt @@ -67,11 +67,11 @@ if (NOT "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Intel") set(example_programs "${example_programs};apex_fibonacci_std_async;apex_fibonacci_std_async2") #endif() set(example_programs "${example_programs};apex_new_task;apex_task_wrapper;apex_task_wrapper2") - if ((NOT DEFINED TAU_ROOT) AND (NOT USE_TAU) AND (NOT TAU_FOUND)) + if ((NOT DEFINED TAU_ROOT) AND (NOT APEX_WITH_TAU) AND (NOT TAU_FOUND)) if (APEX_THROTTLE) set(example_programs "${example_programs};apex_throttle_event") endif (APEX_THROTTLE) - endif ((NOT DEFINED TAU_ROOT) AND (NOT USE_TAU) AND (NOT TAU_FOUND)) + endif ((NOT DEFINED TAU_ROOT) AND (NOT APEX_WITH_TAU) AND (NOT TAU_FOUND)) endif (NOT "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Intel") endif() diff --git a/src/unit_tests/C++/apex_non_worker_thread.cpp b/src/unit_tests/C++/apex_non_worker_thread.cpp index 2077f91b..0f63bb8f 100644 --- a/src/unit_tests/C++/apex_non_worker_thread.cpp +++ b/src/unit_tests/C++/apex_non_worker_thread.cpp @@ -1,10 +1,9 @@ -#include "apex_api.hpp" #include #include #include #include #include -#include "thread_instance.hpp" +#include "apex_api.hpp" #define MAX_OUTER 50 #define MAX_INNER 50 @@ -36,7 +35,6 @@ uint64_t foo(uint64_t i) { uint64_t bar(uint64_t i) { // ask for a thread instance, as a test. // - //apex::thread_instance::instance(false); // create a task, but don't start a timer. apex::new_task((apex_function_address)&bar); uint64_t j=0; diff --git a/src/unit_tests/C/CMakeLists.txt b/src/unit_tests/C/CMakeLists.txt index 7855c586..3529e7b2 100644 --- a/src/unit_tests/C/CMakeLists.txt +++ b/src/unit_tests/C/CMakeLists.txt @@ -44,7 +44,7 @@ set(example_programs # apex_setup_throughput_tuning # apex_set_thread_cap -if ((NOT DEFINED TAU_ROOT) AND (NOT USE_PAPI) AND (NOT USE_TAU) AND (NOT TAU_FOUND) AND (NOT OTF2_FOUND)) +if ((NOT DEFINED TAU_ROOT) AND (NOT APEX_WITH_PAPI) AND (NOT APEX_WITH_TAU) AND (NOT TAU_FOUND) AND (NOT OTF2_FOUND)) set(example_programs "${example_programs};apex_fibonacci_pthread") set(example_programs "${example_programs};apex_new_task") #set(example_programs "${example_programs};apex_cross_thread_timing") @@ -53,7 +53,7 @@ if ((NOT DEFINED TAU_ROOT) AND (NOT USE_PAPI) AND (NOT USE_TAU) AND (NOT TAU_FOU if (APEX_THROTTLE) set(example_programs "${example_programs};apex_throttle_event") endif (APEX_THROTTLE) -endif ((NOT DEFINED TAU_ROOT) AND (NOT USE_PAPI) AND (NOT USE_TAU) AND (NOT TAU_FOUND) AND (NOT OTF2_FOUND)) +endif ((NOT DEFINED TAU_ROOT) AND (NOT APEX_WITH_PAPI) AND (NOT APEX_WITH_TAU) AND (NOT TAU_FOUND) AND (NOT OTF2_FOUND)) #if (OPENMP_FOUND) From 01d6be866397ef975a1c8a61f0b40fd7cfc65736 Mon Sep 17 00:00:00 2001 From: Kevin Huck Date: Fri, 22 Jan 2021 10:49:51 -0800 Subject: [PATCH 2/2] Testing the CMake cleanup before merge with develop --- CMakeLists.txt | 10 ++++++---- cmake/Modules/APEX_DefaultOptions.cmake | 7 +++++++ src/apex/CMakeLists.hpx | 2 +- 3 files changed, 14 insertions(+), 5 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 16514ae7..d1ca0c91 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -5,6 +5,12 @@ # set the project name project (APEX CXX C) +# The version number. +set (APEX_DESCRIPTION "Autonomic Performance Environment for eXascale" CACHE STRING "APEX project description") +set (APEX_VERSION_MAJOR 2 CACHE STRING "APEX Major Version") +set (APEX_VERSION_MINOR 3 CACHE STRING "APEX Minor Version") +set (APEX_HOMEPAGE_URL "http://github.com/khuck/xpress-apex" CACHE STRING "APEX homepage URL") + cmake_minimum_required (VERSION 2.8.12 FATAL_ERROR) cmake_policy(VERSION 2.8.12) if (${CMAKE_MAJOR_VERSION} GREATER 2) @@ -252,10 +258,6 @@ endif (NOT "${CMAKE_CXX_COMPILER_ID}" STREQUAL "PGI") # --------------------------------------------------- -# The version number. -set (APEX_VERSION_MAJOR 2) -set (APEX_VERSION_MINOR 3) - # add_definitions(-std=c++11) include(CheckCXXCompilerFlag) CHECK_CXX_COMPILER_FLAG("-std=c++17" COMPILER_SUPPORTS_CXX17) diff --git a/cmake/Modules/APEX_DefaultOptions.cmake b/cmake/Modules/APEX_DefaultOptions.cmake index 510e5c70..2f510bd8 100644 --- a/cmake/Modules/APEX_DefaultOptions.cmake +++ b/cmake/Modules/APEX_DefaultOptions.cmake @@ -8,6 +8,7 @@ option (APEX_WITH_BFD "Enable Binutils (BFD)support" TRUE) option (APEX_WITH_CUDA "Enable CUDA (CUPTI) support" TRUE) option (APEX_WITH_MPI "Enable MPI support" TRUE) option (APEX_WITH_OMPT "Enable OpenMP Tools (OMPT) support" TRUE) +option (APEX_WITH_OTF2 "Enable Open Trace Format 2 (OTF2) support" TRUE) option (APEX_WITH_PAPI "Enable PAPI support" FALSE) option (APEX_WITH_PLUGINS "Enable APEX policy plugin support" TRUE) option (APEX_WITH_TCMALLOC "Enable TCMalloc heap management" FALSE) @@ -51,6 +52,12 @@ if(DEFINED USE_PAPI) set(APEX_WITH_PAPI CACHE BOOL ${USE_PAPI}) endif() +# Provide some backwards compatability +if(DEFINED USE_OTF2) + message(WARNING "USE_OTF2 is deprecated - please use APEX_WITH_OTF2") + set(APEX_WITH_OTF2 CACHE BOOL ${USE_OTF2}) +endif() + # Provide some backwards compatability if(DEFINED USE_PLUGINS) message(WARNING "USE_PLUGINS is deprecated - please use APEX_WITH_PLUGINS") diff --git a/src/apex/CMakeLists.hpx b/src/apex/CMakeLists.hpx index 401b0c94..e79cc1b1 100644 --- a/src/apex/CMakeLists.hpx +++ b/src/apex/CMakeLists.hpx @@ -18,7 +18,7 @@ endif() hpx_info("apex" "Will build APEX") set (APEX_VERSION_MAJOR 2) -set (APEX_VERSION_MINOR 1) +set (APEX_VERSION_MINOR 3) if (NOT APEX_ROOT) if (EXISTS ${HPX_SOURCE_DIR}/apex)