ctest works with lam and mpich
[unres.git] / source / unres / src_MD / CMakeLists.txt
index d0758db..ce3b264 100644 (file)
@@ -471,16 +471,24 @@ if(NOT UNRES_WITH_MPI)
 
 else(NOT UNRES_WITH_MPI)
 
+#  MESSAGE (STATUS "${MPI_Fortran_LIBRARIES}")
+  if ("${MPI_Fortran_LIBRARIES}"  MATCHES "lam")
+     MESSAGE (STATUS "LAM MPI library detected")
+     set (boot_lam "-boot")
+  else()
+     set (boot_lam "")
+  endif()
+
   if(UNRES_MD_FF STREQUAL "GAB")
-    add_test(NAME UNRES_MD_MPI_Ala10 COMMAND mpiexec -boot ${CMAKE_CURRENT_BINARY_DIR}/test_single_ala.sh )
+    add_test(NAME UNRES_MD_MPI_Ala10 COMMAND mpiexec ${boot_lam} ${CMAKE_CURRENT_BINARY_DIR}/test_single_ala.sh )
   endif(UNRES_MD_FF STREQUAL "GAB")
 
   if(UNRES_MD_FF STREQUAL "E0LL2Y")
-    add_test(NAME UNRES_ENE_prota COMMAND mpiexec -boot -np 2 ${CMAKE_CURRENT_BINARY_DIR}/test_prota_E0LL2Y.sh prota_ENE 2 )
-    add_test(NAME UNRES_MIN_prota COMMAND mpiexec -boot -np 2 ${CMAKE_CURRENT_BINARY_DIR}/test_prota_E0LL2Y.sh prota_MIN_CART 2 )
-    add_test(NAME UNRES_MIN_INT COMMAND mpiexec -boot -np 1 ${CMAKE_CURRENT_BINARY_DIR}/test_prota_E0LL2Y.sh 1l2y_MIN_INT 1 )
-    add_test(NAME UNRES_REGULAR COMMAND mpiexec -boot -np 1 ${CMAKE_CURRENT_BINARY_DIR}/test_prota_E0LL2Y.sh 1l2y_MIN_REGULAR_INT 1 )
-    add_test(NAME UNRES_MD_microcanonical COMMAND mpiexec -boot -np 2 ${CMAKE_CURRENT_BINARY_DIR}/test_prota_E0LL2Y.sh 1l2y_micro 2 )
+    add_test(NAME UNRES_ENE_prota COMMAND mpiexec ${boot_lam} -np 2 ${CMAKE_CURRENT_BINARY_DIR}/test_prota_E0LL2Y.sh prota_ENE 2 )
+    add_test(NAME UNRES_MIN_prota COMMAND mpiexec ${boot_lam} -np 2 ${CMAKE_CURRENT_BINARY_DIR}/test_prota_E0LL2Y.sh prota_MIN_CART 2 )
+    add_test(NAME UNRES_MIN_INT COMMAND mpiexec ${boot_lam} -np 1 ${CMAKE_CURRENT_BINARY_DIR}/test_prota_E0LL2Y.sh 1l2y_MIN_INT 1 )
+    add_test(NAME UNRES_REGULAR COMMAND mpiexec ${boot_lam} -np 1 ${CMAKE_CURRENT_BINARY_DIR}/test_prota_E0LL2Y.sh 1l2y_MIN_REGULAR_INT 1 )
+    add_test(NAME UNRES_MD_microcanonical COMMAND mpiexec ${boot_lam} -np 2 ${CMAKE_CURRENT_BINARY_DIR}/test_prota_E0LL2Y.sh 1l2y_micro 2 )
   endif(UNRES_MD_FF STREQUAL "E0LL2Y")
 
 endif(NOT UNRES_WITH_MPI)