ctest on cray with srun all tests
[unres.git] / source / cluster / wham / src / CMakeLists.txt
index 49068c4..8271a1d 100644 (file)
@@ -184,6 +184,13 @@ install(TARGETS UNRES_CLUSTER_WHAM_BIN DESTINATION ${CMAKE_INSTALL_PREFIX}/clust
      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/cluster_wham_mpi_E0LL2Y.sh
 "#!/bin/sh
@@ -216,7 +223,7 @@ export SIDEP=$DD/contact.3.parm
 export SCRATCHDIR=.
 #-----------------------------------------------------------------------------
 echo CTEST_FULL_OUTPUT
-mpiexec ${boot_lam} -np $2 $CLUSTER_WHAM_BIN 
+${mpiexec} ${boot_lam} ${np} $2 $CLUSTER_WHAM_BIN 
 ./cluster_wham_check.sh $1 
 ")