]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
CMake: Limit concurrency of mpi tests
authormaier <maier@0785d39b-7218-0410-832d-ea1e28bc413d>
Mon, 28 Apr 2014 21:49:36 +0000 (21:49 +0000)
committermaier <maier@0785d39b-7218-0410-832d-ea1e28bc413d>
Mon, 28 Apr 2014 21:49:36 +0000 (21:49 +0000)
git-svn-id: https://svn.dealii.org/trunk@32854 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/cmake/macros/macro_add_test.cmake

index a1d6e1ac62e8684e7b48f04e98a5001967f18dc5..758604e778c7251f216d20ae352509691d40386b 100644 (file)
@@ -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}}

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.