]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Add TESTING_ENVIRONMENT overrides to run_performance_tests.cmake
authorMatthias Maier <tamiko@43-1.org>
Fri, 11 Feb 2022 10:09:50 +0000 (04:09 -0600)
committerMatthias Maier <tamiko@43-1.org>
Fri, 11 Feb 2022 10:11:00 +0000 (04:11 -0600)
tests/run_performance_tests.cmake
tests/run_testsuite.cmake

index b7dfc57c3968d04a69ba7f6210feec7bc9d62b06..572792295731dc18f1be4bdd20458ac3da61fb37 100644 (file)
@@ -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)
index df5340cff0e798fc78cc856e2a88432cb8f2a5b1..b8744c66a1085cb61c02387dd9a9199bcff91998 100644 (file)
@@ -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}")

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.