From cfd247c908fb1aacdabd3e1cacf6994df6b31ab5 Mon Sep 17 00:00:00 2001 From: "Roscoe A. Bartlett" Date: Tue, 13 Mar 2018 19:13:02 -0600 Subject: [PATCH] Enable OpenMP for SEMS CI build (#482) --- cmake/load_sems_dev_env.sh | 14 +++++++++++++- cmake/std/MpiReleaseDebugSharedPtSettings.cmake | 1 + 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/cmake/load_sems_dev_env.sh b/cmake/load_sems_dev_env.sh index c8d2fa4349b7..d6dcc1c79f66 100644 --- a/cmake/load_sems_dev_env.sh +++ b/cmake/load_sems_dev_env.sh @@ -63,6 +63,9 @@ # and load different modules for CMake, git, and Python since these are just # tools that don't depend on the selected compiler or MPI. # +# NOTE: This also sets OMP_NUM_THREADS for an OpenMP build so that tests can +# be run with ctest out of the blocks. +# # Get the base dir for the sourced script called=$_ @@ -135,12 +138,21 @@ module load $sems_parmetis_and_version_default module load $sems_scotch_and_version_default module load $sems_superlu_and_version_default +# +# D) Set up for standard basic OpenMP build and running tests +# + +export OMP_NUM_THREAD=2 + if [ "${TRILINOS_SEMS_DEV_ENV_VERBOSE}" == "1" ] ; then module list + echo + echo "Set env vars:" + set | grep "^OMP_" fi # -# D) Remember the loaded SEMS Dev Env +# E) Remember the loaded SEMS Dev Env # export TRILINOS_SEMS_DEV_ENV_LOADED="$TRILINOS_SEMS_DEV_ENV_TO_LOAD" diff --git a/cmake/std/MpiReleaseDebugSharedPtSettings.cmake b/cmake/std/MpiReleaseDebugSharedPtSettings.cmake index 5d29ef8d92eb..b7c5c0166dfa 100644 --- a/cmake/std/MpiReleaseDebugSharedPtSettings.cmake +++ b/cmake/std/MpiReleaseDebugSharedPtSettings.cmake @@ -12,6 +12,7 @@ TRIL_SET_BOOL_CACHE_VAR_FOR_PT_BUILD(CMAKE_BUILD_TYPE RELEASE) TRIL_SET_BOOL_CACHE_VAR_FOR_PT_BUILD(Trilinos_ENABLE_DEBUG ON) TRIL_SET_BOOL_CACHE_VAR_FOR_PT_BUILD(BUILD_SHARED_LIBS ON) TRIL_SET_BOOL_CACHE_VAR_FOR_PT_BUILD(Trilinos_ENABLE_DEBUG_SYMBOLS ON) +TRIL_SET_BOOL_CACHE_VAR_FOR_PT_BUILD(Trilinos_ENABLE_OpenMP ON) TRIL_SET_BOOL_CACHE_VAR_FOR_PT_BUILD(Trilinos_ENABLE_EXPLICIT_INSTANTIATION ON) TRIL_SET_BOOL_CACHE_VAR_FOR_PT_BUILD(Trilinos_ENABLE_SECONDARY_TESTED_CODE OFF) TRIL_SET_BOOL_CACHE_VAR_FOR_PT_BUILD(Teuchos_ENABLE_DEFAULT_STACKTRACE OFF)