ctest on cray with srun all tests
[unres.git] / source / wham / src-M / CMakeLists.txt
index 195e5df..7f6c295 100644 (file)
@@ -252,6 +252,13 @@ install(TARGETS UNRES_WHAM_M_BIN DESTINATION ${CMAKE_INSTALL_PREFIX}/wham)
      set (boot_lam "")
   endif()
 
+  if (UNRES_SRUN)
+   set (np "-n")
+   set (mpiexec "srun")
+  else()
+   set (np "-np")
+   set (mpiexec "mpiexec")
+  endif()
 
 FILE(WRITE ${CMAKE_CURRENT_BINARY_DIR}/scripts/wham_mpi_E0LL2Y.sh
 "#!/bin/sh
@@ -279,7 +286,7 @@ export SIDEP=$DD/contact.3.parm
 export SCRATCHDIR=.
 #-----------------------------------------------------------------------------
 echo CTEST_FULL_OUTPUT
-mpiexec ${boot_lam} -np $2 $WHAM_BIN 
+${mpiexec} ${boot_lam} ${np} $2 $WHAM_BIN 
 ./wham_check.sh $1 
 ")