From: Matthias Maier Date: Mon, 28 Apr 2014 21:49:36 +0000 (+0000) Subject: CMake: Limit concurrency of mpi tests X-Git-Tag: v8.2.0-rc1~538 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9eebaf30c23a1e8dcafc321d8857f5a80e170281;p=dealii.git CMake: Limit concurrency of mpi tests git-svn-id: https://svn.dealii.org/trunk@32854 0785d39b-7218-0410-832d-ea1e28bc413d --- 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}}