From: Matthias Maier Date: Fri, 11 Feb 2022 10:09:50 +0000 (-0600) Subject: Add TESTING_ENVIRONMENT overrides to run_performance_tests.cmake X-Git-Tag: v9.4.0-rc1~508^2~4 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f25f8d11ef427ff04464ae5e47ec13b8ced042ac;p=dealii.git Add TESTING_ENVIRONMENT overrides to run_performance_tests.cmake --- diff --git a/tests/run_performance_tests.cmake b/tests/run_performance_tests.cmake index b7dfc57c39..5727922957 100644 --- a/tests/run_performance_tests.cmake +++ b/tests/run_performance_tests.cmake @@ -1,12 +1,54 @@ +# A small macro +MACRO(SET_IF_EMPTY _variable) + IF("${${_variable}}" STREQUAL "") + SET(${_variable} ${ARGN}) + ENDIF() +ENDMACRO() + +# By default we simply skip test submission to CDash SET(TRACK "Experimental") +SET_IF_EMPTY(SKIP_SUMBISSION TRUE) SET(CMAKE_BUILD_TYPE Release) SET(DEAL_II_COMPILE_EXAMPLES FALSE) SET(TEST_PICKUP_REGEX "^performance") SET(ENABLE_PERFORMANCE_TESTS TRUE) -IF(NOT DEFINED SKIP_SUBMISSION) - SET(SKIP_SUBMISSION TRUE) + +# +# Determine appropriate resource limits for performance tests: +# + +IF("${TESTING_ENVIRONMENT}" STREQUAL "whistler-node") + # Managed by Matthias + SET(CTEST_SITE "${TESTING_ENVIRONMENT}") + SET(TESTING_ENVIRONMENT "heavy") +ENDIF() + +MESSAGE("${CTEST_SITE}") + +# +# Determine appropriate resource limits for performance tests: +# + +SET_IF_EMPTY(TESTING_ENVIRONMENT "light") + +IF("${TESTING_ENVIRONMENT}" STREQUAL "light") + SET_IF_EMPTY(TEST_TIME_LIMIT 600) + SET_IF_EMPTY(TEST_MPI_RANK_LIMIT 2) + SET_IF_EMPTY(TEST_THREAD_LIMIT 2) +ELSEIF("${TESTING_ENVIRONMENT}" STREQUAL "medium") + SET_IF_EMPTY(TEST_TIME_LIMIT 600) + SET_IF_EMPTY(TEST_MPI_RANK_LIMIT 8) + SET_IF_EMPTY(TEST_THREAD_LIMIT 8) +ELSEIF("${TESTING_ENVIRONMENT}" STREQUAL "heavy") + SET_IF_EMPTY(TEST_TIME_LIMIT 600) + SET_IF_EMPTY(TEST_MPI_RANK_LIMIT 32) + SET_IF_EMPTY(TEST_THREAD_LIMIT 32) +ELSE() + MESSAGE(FATAL_ERROR + "The variable TESTING_ENVIRONMENT was set to the invalid value " + "»${TESTING_ENVIRONMENT}«. Valid options are light, medium, heavy.") ENDIF() INCLUDE(${CMAKE_CURRENT_LIST_DIR}/run_testsuite.cmake) diff --git a/tests/run_testsuite.cmake b/tests/run_testsuite.cmake index df5340cff0..b8744c66a1 100644 --- a/tests/run_testsuite.cmake +++ b/tests/run_testsuite.cmake @@ -231,14 +231,15 @@ MESSAGE("-- CTEST_CMAKE_GENERATOR: ${CTEST_CMAKE_GENERATOR}") # CTEST_SITE: # -FIND_PROGRAM(HOSTNAME_COMMAND NAMES hostname) -IF(NOT "${HOSTNAME_COMMAND}" MATCHES "-NOTFOUND") - EXEC_PROGRAM(${HOSTNAME_COMMAND} OUTPUT_VARIABLE _hostname) - STRING(REGEX REPLACE "\\..*$" "" _hostname ${_hostname}) - SET(CTEST_SITE "${_hostname}") -ELSE() - # Well, no hostname available. What about: - SET(CTEST_SITE "BobMorane") +IF(NOT "${CTEST_SITE}" STREQUAL "") + FIND_PROGRAM(HOSTNAME_COMMAND NAMES hostname) + IF(NOT "${HOSTNAME_COMMAND}" MATCHES "-NOTFOUND") + EXEC_PROGRAM(${HOSTNAME_COMMAND} OUTPUT_VARIABLE _hostname) + STRING(REGEX REPLACE "\\..*$" "" _hostname ${_hostname}) + ELSE() + # Well, no hostname available. What about: + SET(CTEST_SITE "BobMorane") + ENDIF() ENDIF() MESSAGE("-- CTEST_SITE: ${CTEST_SITE}")