From d01cd10c876790f3316bd4b490f68be8629e2518 Mon Sep 17 00:00:00 2001 From: Matthias Maier Date: Sat, 8 Jul 2023 09:39:42 -0500 Subject: [PATCH] CMake: avoid "binding to none" for performance tests It turns out that this change introduces a lot of noise. Let us thus not override the mpi binding policy if we already run exclusively. --- cmake/macros/macro_deal_ii_add_test.cmake | 5 ++++- cmake/scripts/run_test.sh | 9 ++++++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/cmake/macros/macro_deal_ii_add_test.cmake b/cmake/macros/macro_deal_ii_add_test.cmake index 40ede17232..43cdeb459b 100644 --- a/cmake/macros/macro_deal_ii_add_test.cmake +++ b/cmake/macros/macro_deal_ii_add_test.cmake @@ -637,7 +637,10 @@ function(deal_ii_add_test _category _test_name _comparison_file) # Ensure that the test is not executed concurrently with any other # tests. # - set_tests_properties(${_test_full} PROPERTIES RUN_SERIAL TRUE) + set_tests_properties(${_test_full} PROPERTIES + RUN_SERIAL TRUE + ENVIRONMENT "TEST_IS_EXCLUSIVE=true" + ) else() # diff --git a/cmake/scripts/run_test.sh b/cmake/scripts/run_test.sh index cb1383a088..4da68f557c 100644 --- a/cmake/scripts/run_test.sh +++ b/cmake/scripts/run_test.sh @@ -91,8 +91,15 @@ case $STAGE in # cores/processors/sockets. Otherwise we run the risk that multiple # mpi tests (for example with two ranks) are all pinned to the same # processor core, bringing everything to a grinding halt. + # + # If the test runs exclusively, however, do not override MPI binding + # policies. This is important to ensure that performance tests are + # scheduled properly. + # export OMPI_MCA_rmaps_base_oversubscribe=1 - export OMPI_MCA_hwloc_base_binding_policy=none + if [ -z "${TEST_IS_EXCLUSIVE+x}" ]; then + export OMPI_MCA_hwloc_base_binding_policy=none + fi # # Kokkos parameters: -- 2.39.5