From ff655bf2d8914d460192397b098ce78511497104 Mon Sep 17 00:00:00 2001 From: maier Date: Mon, 28 Apr 2014 21:49:36 +0000 Subject: [PATCH] CMake: Limit concurrency of mpi tests git-svn-id: https://svn.dealii.org/trunk@32854 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/cmake/macros/macro_add_test.cmake | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/deal.II/cmake/macros/macro_add_test.cmake b/deal.II/cmake/macros/macro_add_test.cmake index a1d6e1ac62..758604e778 100644 --- a/deal.II/cmake/macros/macro_add_test.cmake +++ b/deal.II/cmake/macros/macro_add_test.cmake @@ -258,16 +258,21 @@ MACRO(DEAL_II_ADD_TEST _category _test_name _comparison_file) TIMEOUT ${TEST_TIME_LIMIT} ) - # - # We have to be careful not to run different mpirun settings for the - # same executable in parallel because this triggers a race condition - # when compiling the not yet existent executable that is shared - # between the different tests. - # - # Luckily CMake has a mechanism to force a test to be run after - # another has finished (and both are scheduled): - # IF(NOT "${_n_cpu}" STREQUAL "0") + # + # Limit concurrency of mpi tests: + # + SET_TESTS_PROPERTIES(${_test_full} PROPERTIES PROCESSORS ${_n_cpu}) + + # + # We have to be careful not to run different mpirun settings for the + # same executable in parallel because this triggers a race condition + # when compiling the not yet existent executable that is shared + # between the different tests. + # + # Luckily CMake has a mechanism to force a test to be run after + # another has finished (and both are scheduled): + # IF(DEFINED TEST_DEPENDENCIES_${_target}) SET_TESTS_PROPERTIES(${_test_full} PROPERTIES DEPENDS ${TEST_DEPENDENCIES_${_target}} -- 2.39.5