Skip to content

Commit

Permalink
Move most options to *.cmake fragment files (trilinos#482, trilinos#158)
Browse files Browse the repository at this point in the history
I did a few things here:

* Got rid of Trilinos_ENABLE_CI_TEST_MODE out of
  cmake/CallbackSetupExtraOptions.cmake and moved all of those options to
  BasicCiTestingSettings.cmake

* Moved the majority of options for the MPI_RELEASE_DEBUG_SHARED build
  (changed name to MPI_RELEASE_DEBUG_SHARED_PT) from
  project-checkin-test-config.py to MpiReleaseDebugSharedPtSettings.cmake and
  then update project-checkin-test-config.py build MPI_RELEASE_DEBUG_SHARED_PT
  to just point to these *.cmake fragement files

* Moved MPI_RELESE_DEBUG_SHARED_PTR_COMPLEX to project-checkin-test-config.py
  but don't call it by default in checkin-test-sems.sh
  (i.e. --default-builds=MPI_DEBUG_RELEASE_SHARED_PT)

* Got rid of commented-out stuff from SEMSDevEnv.cmake (now it only contains
  system stuff)
  • Loading branch information
bartlettroscoe committed Nov 28, 2016
1 parent 75d8c90 commit 431ca0f
Show file tree
Hide file tree
Showing 6 changed files with 87 additions and 122 deletions.
68 changes: 0 additions & 68 deletions cmake/CallbackSetupExtraOptions.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,6 @@ MACRO(TRILINOS_DISABLE_PACKAGE_REQUIRING_CXX11 CXX11_PACKAGE_NAME_IN)
ENDMACRO()


MACRO(TRIL_SET_BOOL_CACHE_VAR_FOR_CI VAR_NAME VAR_VALUE)
IF ("${${VAR_NAME}}" STREQUAL "")
MESSAGE("-- " "Setting ${VAR_NAME}='${VAR_VALUE}' by default for CI testing")
SET(${VAR_NAME} ${VAR_VALUE} CACHE BOOL
"Set in Trilinos/cmake/CallbackSetupExtraOptions.cmake")
ENDIF()
ENDMACRO()


MACRO(TRIBITS_REPOSITORY_SETUP_EXTRA_OPTIONS)

#MESSAGE("TRIBITS_REPOSITORY_SETUP_EXTRA_OPTIONS got called!")
Expand Down Expand Up @@ -110,63 +101,4 @@ MACRO(TRIBITS_REPOSITORY_SETUP_EXTRA_OPTIONS)
# Used by some Trilinos packages?
SET(TRILINOS_BUILD_SHARED_LIBS ${BUILD_SHARED_LIBS})

#
# Adjust options for a standard CI build
#

ADVANCED_SET(Trilinos_ENABLE_CI_TEST_MODE OFF
CACHE BOOL
"If set to 'ON', then Trilinos packages will be put into CI mode which adjusts a bunch fo things"
)

IF (Trilinos_ENABLE_CI_TEST_MODE)

MESSAGE(
"-- "
"NOTE: Trilinos_ENABLE_CI_TEST_MODE='${Trilinos_ENABLE_CI_TEST_MODE}'"
", setting cache vars for Trilinos CI testing mode ..."
)

# Turn off float and complex by default
#TRIL_SET_BOOL_CACHE_VAR_FOR_CI(Teuchos_ENABLE_FLOAT OFF)
#TRIL_SET_BOOL_CACHE_VAR_FOR_CI(Teuchos_ENABLE_COMPLEX OFF)
#TRIL_SET_BOOL_CACHE_VAR_FOR_CI(Sacado_ENABLE_COMPLEX OFF)
#TRIL_SET_BOOL_CACHE_VAR_FOR_CI(Thyra_ENABLE_COMPLEX OFF)
#TRIL_SET_BOOL_CACHE_VAR_FOR_CI(Tpetra_INST_COMPLEX_DOUBLE OFF)
#TRIL_SET_BOOL_CACHE_VAR_FOR_CI(Tpetra_INST_COMPLEX_FLOAT OFF)
#TRIL_SET_BOOL_CACHE_VAR_FOR_CI(Anasazi_ENABLE_COMPLEX OFF)
# ToDo: Remove the above once Trlinos_ENABLE_FLOAT and
# Trilinos_ENABLE_COMPLEX are supported and are off by default (see
# Trilinos GitHub #362)

# Disable a bunch of TPLs that are not to be enabled in CI testing (since
# the SEMS env does not have them).
TRIL_SET_BOOL_CACHE_VAR_FOR_CI(TPL_ENABLE_GLM OFF)
TRIL_SET_BOOL_CACHE_VAR_FOR_CI(TPL_ENABLE_Matio OFF)
TRIL_SET_BOOL_CACHE_VAR_FOR_CI(TPL_ENABLE_X11 OFF)

# Default enable the TPLs that SEMS provides
TRIL_SET_BOOL_CACHE_VAR_FOR_CI(TPL_ENABLE_Pthread ON)
TRIL_SET_BOOL_CACHE_VAR_FOR_CI(TPL_ENABLE_BLAS ON)
TRIL_SET_BOOL_CACHE_VAR_FOR_CI(TPL_ENABLE_LAPACK ON)
TRIL_SET_BOOL_CACHE_VAR_FOR_CI(TPL_ENABLE_Boost ON)
TRIL_SET_BOOL_CACHE_VAR_FOR_CI(TPL_ENABLE_BoostLib ON)
IF (TPL_ENABLE_MPI)
TRIL_SET_BOOL_CACHE_VAR_FOR_CI(TPL_ENABLE_ParMETIS ON)
ENDIF()
TRIL_SET_BOOL_CACHE_VAR_FOR_CI(TPL_ENABLE_Zlib ON)
TRIL_SET_BOOL_CACHE_VAR_FOR_CI(TPL_ENABLE_HDF5 ON)
TRIL_SET_BOOL_CACHE_VAR_FOR_CI(TPL_ENABLE_Netcdf ON)
TRIL_SET_BOOL_CACHE_VAR_FOR_CI(TPL_ENABLE_SuperLU ON)

# Disable long-failing Pir test until it can be fixed (#826)
SET(Piro_EpetraSolver_MPI_4_DISABLE ON)

ENDIF()

# NOTE: Above, the cache var Trilinos_ENABLE_CI_TEST_MODE and the above code
# helps to remove dupliction between the checkin-test.py script and the
# post-push CI server. This could be moved into a *.cmake fragment file
# however.

ENDMACRO()
31 changes: 31 additions & 0 deletions cmake/std/BasicCiTestingSettings.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Helper function
MACRO(TRIL_SET_BOOL_CACHE_VAR_FOR_CI VAR_NAME VAR_VALUE)
IF ("${${VAR_NAME}}" STREQUAL "")
MESSAGE("-- " "Setting ${VAR_NAME}='${VAR_VALUE}' by default for CI testing")
SET(${VAR_NAME} ${VAR_VALUE} CACHE BOOL
"Set in BasicCiTestingSettings.cmake")
ENDIF()
ENDMACRO()

# Disable a bunch of TPLs that are not to be enabled in CI testing (since
# the SEMS env does not have them).
TRIL_SET_BOOL_CACHE_VAR_FOR_CI(TPL_ENABLE_GLM OFF)
TRIL_SET_BOOL_CACHE_VAR_FOR_CI(TPL_ENABLE_Matio OFF)
TRIL_SET_BOOL_CACHE_VAR_FOR_CI(TPL_ENABLE_X11 OFF)

# Default enable the TPLs that SEMS provides
TRIL_SET_BOOL_CACHE_VAR_FOR_CI(TPL_ENABLE_Pthread ON)
TRIL_SET_BOOL_CACHE_VAR_FOR_CI(TPL_ENABLE_BLAS ON)
TRIL_SET_BOOL_CACHE_VAR_FOR_CI(TPL_ENABLE_LAPACK ON)
TRIL_SET_BOOL_CACHE_VAR_FOR_CI(TPL_ENABLE_Boost ON)
TRIL_SET_BOOL_CACHE_VAR_FOR_CI(TPL_ENABLE_BoostLib ON)
IF (TPL_ENABLE_MPI)
TRIL_SET_BOOL_CACHE_VAR_FOR_CI(TPL_ENABLE_ParMETIS ON)
ENDIF()
TRIL_SET_BOOL_CACHE_VAR_FOR_CI(TPL_ENABLE_Zlib ON)
TRIL_SET_BOOL_CACHE_VAR_FOR_CI(TPL_ENABLE_HDF5 ON)
TRIL_SET_BOOL_CACHE_VAR_FOR_CI(TPL_ENABLE_Netcdf ON)
TRIL_SET_BOOL_CACHE_VAR_FOR_CI(TPL_ENABLE_SuperLU ON)

# Disable long-failing Pir test until it can be fixed (#826)
TRIL_SET_BOOL_CACHE_VAR_FOR_CI(Piro_EpetraSolver_MPI_4_DISABLE ON)
17 changes: 17 additions & 0 deletions cmake/std/MpiReleaseDebugSharedPtSettings.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Helper function
MACRO(TRIL_SET_BOOL_CACHE_VAR_FOR_PT_BUILD VAR_NAME VAR_VALUE)
IF ("${${VAR_NAME}}" STREQUAL "")
MESSAGE("-- " "Setting ${VAR_NAME}='${VAR_VALUE}' by default for standard PT CI build")
SET(${VAR_NAME} ${VAR_VALUE} CACHE BOOL
"Set in MpiReleaseDebugSharedPtSettings.cmake")
ENDIF()
ENDMACRO()

TRIL_SET_BOOL_CACHE_VAR_FOR_PT_BUILD(TPL_ENABLE_MPI ON)
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_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)
19 changes: 1 addition & 18 deletions cmake/std/sems/SEMSDevEnv.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -3,24 +3,7 @@
#

#
# A) Set up some basic Trilinos options defaults
#

# All of this was moved to Trilinos/cmake/CallbackSetupExtraOptions.cmake

## Turn off float and complex by default
#SET(Teuchos_ENABLE_FLOAT OFF CACHE BOOL "Set in SEMSDevEnv.cmake")
#SET(Teuchos_ENABLE_COMPLEX OFF CACHE BOOL "Set in SEMSDevEnv.cmake")
#SET(Sacado_ENABLE_COMPLEX OFF CACHE BOOL "Set in SEMSDevEnv.cmake")
#SET(Thyra_ENABLE_COMPLEX OFF CACHE BOOL "Set in SEMSDevEnv.cmake")
#SET(Tpetra_INST_COMPLEX_DOUBLE OFF CACHE BOOL "Set in SEMSDevEnv.cmake")
#SET(Tpetra_INST_COMPLEX_FLOAT OFF CACHE BOOL "Set in SEMSDevEnv.cmake")
#SET(Anasazi_ENABLE_COMPLEX OFF CACHE BOOL "Set in SEMSDevEnv.cmake")
## ToDo: Remove the above when Trlinos_ENABLE_FLOAT and Trilinos_ENABLE_COMPLEX
## are supported and are off by default (see Trilinos #362)

#
# B) Define the compilers and basic env
# A) Define the compilers and basic env
#
# NOTE: Set up different compilers depending on if MPI is enabled or not.
#
Expand Down
35 changes: 19 additions & 16 deletions cmake/std/sems/checkin-test-sems.sh
Original file line number Diff line number Diff line change
Expand Up @@ -99,25 +99,21 @@ source $TRILINOS_DIR/cmake/load_ci_sems_dev_env.sh
# B) Set up the bulid configurations
#

# Leave the COMMON.config file for the user to fil in for any strange aspects
# to their system not coverted by SEMS (I can't imagine what that might be).
# Should not need any extra COMMON options on a machine with the SEMS env
# present.
echo "
" > COMMON.config

# All of the options needed for the --default-builds
# MPI_RELEASE_DEBUG_SHARED_PT and MPI_RELEASE_DEBUG_SHARED_PT_COMPLEX are in
# project-checkin-test-config.py so no need to set them here. Also note that
# the SEMS env will be read in automatically because load_ci_sems_dev_env.sh
# was sourced above.

# All of the options needed for the --default-builds=MPI_RELEASE_DEBUG_SHARED
# is set in project-checkin-test-config.py.
echo "
" > MPI_RELEASE_DEBUG_SHARED.config
" > MPI_RELEASE_DEBUG_SHARED_PT.config

echo "
-DTPL_ENABLE_MPI=ON
-DCMAKE_BUILD_TYPE=RELEASE
-DTrilinos_ENABLE_DEBUG=ON
-DBUILD_SHARED_LIBS=ON
-DTrilinos_ENABLE_SECONDARY_TESTED_CODE=OFF
-DTrilinos_ENABLE_COMPLEX=ON
-DTrilinos_ENABLE_DEBUG_SYMBOLS=ON
-DTrilinos_ENABLE_CI_TEST_MODE=ON
-DTrilinos_ENABLE_EXPLICIT_INSTANTIATION=ON
-DTeuchos_ENABLE_DEFAULT_STACKTRACE=OFF
" > MPI_RELEASE_DEBUG_SHARED_PT_COMPLEX.config

echo "
Expand Down Expand Up @@ -199,8 +195,15 @@ fi
#
# D) Run the checkin-test.py script!
#
# NOTE: default args are read in from the local-checkin-test-defaults.py file!
# NOTE: default args are read in from the local-checkin-test-defaults.py file
#
# NOTE: to run the other PT default builds, use:
#
# --default-builds=MPI_RELEASE_DEBUG_SHARED_PT,MPI_RELEASE_DEBUG_SHARED_PT_COMPLEX
#

$TRILINOS_DIR/checkin-test.py \
--default-builds=MPI_RELEASE_DEBUG_SHARED_PT \
"$@"


39 changes: 19 additions & 20 deletions project-checkin-test-config.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,9 @@
# Default options that are common to all builds.
'common': [
# Shared libs safes a ton of disk space and catches more errors
# than static builds.
'-DBUILD_SHARED_LIBS=ON',
# For graceful disables, we want to turn this on
# For graceful disables, we want to turn this on.
'-DTrilinos_DISABLE_ENABLED_FORWARD_DEP_PACKAGES=ON',
# We want to see tracing of added tests to help in debugging
# problems.
Expand All @@ -35,27 +36,25 @@
# developers prefer one case to fail earlier than another).
'default-builds': [

# Options for the MPI_DEBUG build.
('MPI_RELEASE_DEBUG_SHARED', [
'-DTPL_ENABLE_MPI=ON',
'-DCMAKE_BUILD_TYPE=RELEASE',
'-DTrilinos_ENABLE_DEBUG=ON',
'-DBUILD_SHARED_LIBS=ON',
'-DTrilinos_ENABLE_DEBUG_SYMBOLS=ON',
'-DTrilinos_ENABLE_CI_TEST_MODE=ON',
'-DTrilinos_ENABLE_EXPLICIT_INSTANTIATION=ON',
'-DTrilinos_ENABLE_SECONDARY_TESTED_CODE=OFF',
'-DTeuchos_ENABLE_DEFAULT_STACKTRACE=OFF',
('MPI_RELEASE_DEBUG_SHARED_PT', [
'-DTrilinos_CONFIGURE_OPTIONS_FILE:STRING=cmake/std/MpiReleaseDebugSharedPtSettings.cmake,cmake/std/BasicCiTestingSettings.cmake',
]),

# # Options for the SERIAL_RELEASE build.
# ('SERIAL_RELEASE_SHARED', [
# '-DTPL_ENABLE_MPI:BOOL=OFF',
# '-DCMAKE_BUILD_TYPE:STRING=RELEASE',
# '-DTrilinos_ENABLE_DEBUG:BOOL=OFF',
# '-DBUILD_SHARED_LIBS=ON',
# '-DTrilinos_ENABLE_EXPLICIT_INSTANTIATION:BOOL=OFF',
# ]),
('MPI_RELEASE_DEBUG_SHARED_PT_COMPLEX', [
'-DTrilinos_CONFIGURE_OPTIONS_FILE:STRING=cmake/std/MpiReleaseDebugSharedPtSettings.cmake,cmake/std/BasicCiTestingSettings.cmake',
'-DTrilinos_ENABLE_COMPLEX=ON',
]),

## Options for the SERIAL_RELEASE build.
#('SERIAL_RELEASE_SHARED', [
# '-DTPL_ENABLE_MPI:BOOL=OFF',
# '-DCMAKE_BUILD_TYPE:STRING=RELEASE',
# '-DTrilinos_ENABLE_DEBUG:BOOL=OFF',
# '-DBUILD_SHARED_LIBS=ON',
# '-DTrilinos_ENABLE_EXPLICIT_INSTANTIATION:BOOL=OFF',
# ]),
# ToDo: Should we define serial builds to allow developers to run
# them if they want?

], # default-builds

Expand Down

0 comments on commit 431ca0f

Please sign in to comment.