]> SALOME platform Git repositories - tools/medcoupling.git/commitdiff
Salome HOME
Portability: MPICH does not support "--oversubscribe" option
authorabn <adrien.bruneton@cea.fr>
Fri, 18 Sep 2020 10:21:05 +0000 (12:21 +0200)
committerabn <adrien.bruneton@cea.fr>
Mon, 28 Sep 2020 11:34:38 +0000 (13:34 +0200)
src/ParaMEDMEMTest/CMakeLists.txt

index 4ef86e55364542b0e922eaec8f93a6e52afb2541..7e65d5cbef94e9263040bb0e72df25c4c6a3484a 100644 (file)
@@ -118,21 +118,26 @@ ENDFOREACH(bintestparamem ${TESTSParaMEDMEM})
 SALOME_GENERATE_TESTS_ENVIRONMENT(tests_env)
 
 #  -- some tests require 2, 3, 4 or 5 procs --
-ADD_TEST(NAME TestParaMEDMEM_Proc2 COMMAND ${MPIEXEC} -np 2 --oversubscribe $<TARGET_FILE:TestParaMEDMEM>)
+# MPICH does not support --oversubscribe:
+IF(NOT ${MPIEXEC_EXECUTABLE} MATCHES "mpich")
+    SET(_oversub_opt "--oversubscribe")
+ENDIF()
+
+ADD_TEST(NAME TestParaMEDMEM_Proc2 COMMAND ${MPIEXEC} -np 2  ${_oversub_opt} $<TARGET_FILE:TestParaMEDMEM>)
 SET_TESTS_PROPERTIES(TestParaMEDMEM_Proc2 PROPERTIES ENVIRONMENT "${tests_env}")
-ADD_TEST(NAME TestParaMEDMEM_Proc3 COMMAND ${MPIEXEC} -np 3 --oversubscribe $<TARGET_FILE:TestParaMEDMEM>)
+ADD_TEST(NAME TestParaMEDMEM_Proc3 COMMAND ${MPIEXEC} -np 3 ${_oversub_opt} $<TARGET_FILE:TestParaMEDMEM>)
 SET_TESTS_PROPERTIES(TestParaMEDMEM_Proc3 PROPERTIES ENVIRONMENT "${tests_env}")
-ADD_TEST(NAME TestParaMEDMEM_Proc4 COMMAND ${MPIEXEC} -np 4 --oversubscribe $<TARGET_FILE:TestParaMEDMEM>)
+ADD_TEST(NAME TestParaMEDMEM_Proc4 COMMAND ${MPIEXEC} -np 4 ${_oversub_opt} $<TARGET_FILE:TestParaMEDMEM>)
 SET_TESTS_PROPERTIES(TestParaMEDMEM_Proc4 PROPERTIES ENVIRONMENT "${tests_env}")
-ADD_TEST(NAME TestParaMEDMEM_Proc5 COMMAND ${MPIEXEC} -np 5 --oversubscribe $<TARGET_FILE:TestParaMEDMEM>)
+ADD_TEST(NAME TestParaMEDMEM_Proc5 COMMAND ${MPIEXEC} -np 5 ${_oversub_opt} $<TARGET_FILE:TestParaMEDMEM>)
 SET_TESTS_PROPERTIES(TestParaMEDMEM_Proc5 PROPERTIES ENVIRONMENT "${tests_env}")
 
-ADD_TEST(NAME TestMPIAccess_Proc2 COMMAND ${MPIEXEC} -np 2 --oversubscribe $<TARGET_FILE:TestMPIAccess>)
+ADD_TEST(NAME TestMPIAccess_Proc2 COMMAND ${MPIEXEC} -np 2 ${_oversub_opt} $<TARGET_FILE:TestMPIAccess>)
 SET_TESTS_PROPERTIES(TestMPIAccess_Proc2 PROPERTIES ENVIRONMENT "${tests_env}")
-ADD_TEST(NAME TestMPIAccess_Proc3 COMMAND ${MPIEXEC} -np 3 --oversubscribe $<TARGET_FILE:TestMPIAccess>)
+ADD_TEST(NAME TestMPIAccess_Proc3 COMMAND ${MPIEXEC} -np 3 ${_oversub_opt} $<TARGET_FILE:TestMPIAccess>)
 SET_TESTS_PROPERTIES(TestMPIAccess_Proc3 PROPERTIES ENVIRONMENT "${tests_env}")
 
-ADD_TEST(NAME TestMPIAccessDEC_Proc4 COMMAND ${MPIEXEC} -np 4 --oversubscribe $<TARGET_FILE:TestMPIAccessDEC>)
+ADD_TEST(NAME TestMPIAccessDEC_Proc4 COMMAND ${MPIEXEC} -np 4 ${_oversub_opt} $<TARGET_FILE:TestMPIAccessDEC>)
 SET_TESTS_PROPERTIES(TestMPIAccessDEC_Proc4 PROPERTIES ENVIRONMENT "${tests_env}")
 
 # Installation rules