diff --git a/cmake/load_sems_dev_env.sh b/cmake/load_sems_dev_env.sh index eb55dd63eba4..65f99faa8c5a 100644 --- a/cmake/load_sems_dev_env.sh +++ b/cmake/load_sems_dev_env.sh @@ -135,6 +135,5 @@ module load $sems_parmetis_and_version_default module load $sems_scotch_and_version_default module load $sems_superlu_and_version_default -if [ "${TRILINOS_SEMS_DEV_ENV_VERBOSE}" == "1" ] ; then - module list -fi +export OMP_NUM_THREADS=2 +# This was the agreement for the OpenMP builds as per #2317 diff --git a/cmake/std/MpiReleaseDebugSharedPtOpenMP.cmake b/cmake/std/MpiReleaseDebugSharedPtOpenMP.cmake new file mode 100644 index 000000000000..ad9160474394 --- /dev/null +++ b/cmake/std/MpiReleaseDebugSharedPtOpenMP.cmake @@ -0,0 +1,29 @@ +# This file can be read in using either: +# +# -C /.cmake +# +# or: +# +# -DTrilinos_CONFIGURE_OPTIONS_FILE:STRING=cmake/std/.cmake +# + +# Handle this being passed in with -C option instead of +# _CONFIGURE_OPTIONS_FILE. +IF ("${PROJECT_NAME}" STREQUAL "") + SET(PROJECT_NAME Trilinos) + INCLUDE("${CMAKE_CURRENT_LIST_DIR}/../tribits/core/utils/AssertDefined.cmake") +ENDIF() + +INCLUDE("${CMAKE_CURRENT_LIST_DIR}/SetUtils.cmake") + +TRIL_SET_BOOL_CACHE_VAR(${PROJECT_NAME}_ENABLE_OpenMP ON) + +TRIL_SET_CACHE_VAR(MPI_EXEC_PRE_NUMPROCS_FLAGS "--bind-to;none") +# NOTE: The above is a workaround for the problem of having threads on MPI +# ranks bind to the same cores (see #2422). + +# NOTE: The order of these includes matters! + +include("${CMAKE_CURRENT_LIST_DIR}/MpiReleaseDebugSharedPtSettings.cmake") +include("${CMAKE_CURRENT_LIST_DIR}/BasicCiTestingSettings.cmake") +include("${CMAKE_CURRENT_LIST_DIR}/sems/SEMSDevEnv.cmake") diff --git a/cmake/std/SetUtils.cmake b/cmake/std/SetUtils.cmake index 8eda01f9219b..699e01c417a2 100644 --- a/cmake/std/SetUtils.cmake +++ b/cmake/std/SetUtils.cmake @@ -1,7 +1,21 @@ -MACRO(TRIL_SET_BOOL_CACHE_VAR VAR_NAME VAR_VALUE) +# +# Usage: +# +# TRIL_SET_CACHE_VAR( CACHE ) +# +MACRO(TRIL_SET_CACHE_VAR VAR_NAME VAR_VALUE) IF ("${${VAR_NAME}}" STREQUAL "") MESSAGE("-- " "Setting ${VAR_NAME}='${VAR_VALUE}' by default") - SET(${VAR_NAME} ${VAR_VALUE} CACHE BOOL + SET(${VAR_NAME} "${VAR_VALUE}" ${ARGN} "Set in ${CMAKE_CURRENT_LIST_FILE}") ENDIF() ENDMACRO() + +# +# Usage: +# +# TRIL_SET_BOOL_CACHE_VAR( ) +# +MACRO(TRIL_SET_BOOL_CACHE_VAR VAR_NAME VAR_VALUE) + TRIL_SET_CACHE_VAR(${VAR_NAME} ${VAR_VALUE} CACHE BOOL) +ENDMACRO() diff --git a/project-checkin-test-config.py b/project-checkin-test-config.py index 708bad901914..620c5381fa81 100755 --- a/project-checkin-test-config.py +++ b/project-checkin-test-config.py @@ -32,7 +32,7 @@ 'default-builds': [ ('MPI_RELEASE_DEBUG_SHARED_PT', [ - '-DTrilinos_CONFIGURE_OPTIONS_FILE:STRING=cmake/std/MpiReleaseDebugSharedPtSerial.cmake', + '-DTrilinos_CONFIGURE_OPTIONS_FILE:STRING=cmake/std/MpiReleaseDebugSharedPtOpenMP.cmake', ]), ], # default-builds