From d635b1b4a9826a8cac0a4a20eff8c83465800187 Mon Sep 17 00:00:00 2001 From: Cezary Czaplewski Date: Mon, 25 Apr 2016 18:18:34 +0200 Subject: [PATCH] ctest on cray with srun all tests --- source/cluster/wham/src-M/CMakeLists.txt | 10 +++++++++- source/cluster/wham/src/CMakeLists.txt | 9 ++++++++- source/unres/src_CSA/CMakeLists.txt | 18 ++++++++++++++---- source/unres/src_MD-M/CMakeLists.txt | 24 ++++++++++++++++-------- source/wham/src-M/CMakeLists.txt | 9 ++++++++- source/wham/src/CMakeLists.txt | 10 +++++++++- 6 files changed, 64 insertions(+), 16 deletions(-) diff --git a/source/cluster/wham/src-M/CMakeLists.txt b/source/cluster/wham/src-M/CMakeLists.txt index 0293d15..51a1ad6 100644 --- a/source/cluster/wham/src-M/CMakeLists.txt +++ b/source/cluster/wham/src-M/CMakeLists.txt @@ -183,6 +183,14 @@ install(TARGETS UNRES_CLUSTER_WHAM_M_BIN DESTINATION ${CMAKE_INSTALL_PREFIX}/clu 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 @@ -215,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 ") diff --git a/source/cluster/wham/src/CMakeLists.txt b/source/cluster/wham/src/CMakeLists.txt index 49068c4..8271a1d 100644 --- a/source/cluster/wham/src/CMakeLists.txt +++ b/source/cluster/wham/src/CMakeLists.txt @@ -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 ") diff --git a/source/unres/src_CSA/CMakeLists.txt b/source/unres/src_CSA/CMakeLists.txt index 53337fe..ae33e99 100644 --- a/source/unres/src_CSA/CMakeLists.txt +++ b/source/unres/src_CSA/CMakeLists.txt @@ -394,14 +394,24 @@ endif(UNRES_CSA_FF STREQUAL "E0LL2Y") set (boot_lam "") endif() + + if (UNRES_SRUN) + set (np "-n") + set (mpiexec "srun") + else() + set (np "-np") + set (mpiexec "mpiexec") + endif() + + if(UNRES_CSA_FF STREQUAL "4P") - add_test(NAME UNRES_CSA_global COMMAND mpiexec ${boot_lam} -np 4 ${CMAKE_CURRENT_BINARY_DIR}/test_csa_4P.sh 1l2y_csa_4P ) - add_test(NAME UNRES_CSA_local COMMAND mpiexec ${boot_lam} -np 4 ${CMAKE_CURRENT_BINARY_DIR}/test_csa_4P.sh 1l2y_csa_local_4P ) + add_test(NAME UNRES_CSA_global COMMAND ${mpiexec} ${boot_lam} ${np} 4 ${CMAKE_CURRENT_BINARY_DIR}/test_csa_4P.sh 1l2y_csa_4P ) + add_test(NAME UNRES_CSA_local COMMAND ${mpiexec} ${boot_lam} ${np} 4 ${CMAKE_CURRENT_BINARY_DIR}/test_csa_4P.sh 1l2y_csa_local_4P ) endif(UNRES_CSA_FF STREQUAL "4P") if(UNRES_CSA_FF STREQUAL "E0LL2Y") - add_test(NAME UNRES_CSA_global_E0LL2Y COMMAND mpiexec ${boot_lam} -np 4 ${CMAKE_CURRENT_BINARY_DIR}/test_csa_E0LL2Y.sh 1l2y_csa ) - add_test(NAME UNRES_CSA_local_E0LL2Y COMMAND mpiexec ${boot_lam} -np 4 ${CMAKE_CURRENT_BINARY_DIR}/test_csa_E0LL2Y.sh 1l2y_csa_local ) + add_test(NAME UNRES_CSA_global_E0LL2Y COMMAND ${mpiexec} ${boot_lam} ${np} 4 ${CMAKE_CURRENT_BINARY_DIR}/test_csa_E0LL2Y.sh 1l2y_csa ) + add_test(NAME UNRES_CSA_local_E0LL2Y COMMAND ${mpiexec} ${boot_lam} ${np} 4 ${CMAKE_CURRENT_BINARY_DIR}/test_csa_E0LL2Y.sh 1l2y_csa_local ) endif(UNRES_CSA_FF STREQUAL "E0LL2Y") diff --git a/source/unres/src_MD-M/CMakeLists.txt b/source/unres/src_MD-M/CMakeLists.txt index ce09ea7..052b4aa 100644 --- a/source/unres/src_MD-M/CMakeLists.txt +++ b/source/unres/src_MD-M/CMakeLists.txt @@ -513,6 +513,14 @@ $UNRES_BIN set (boot_lam "") endif() + if (UNRES_SRUN) + set (np "-n") + set (mpiexec "srun") + else() + set (np "-np") + set (mpiexec "mpiexec") + endif() + # # File permissions workaround @@ -546,7 +554,7 @@ export ROTPARPDB=$DD/scgauss.parm export PATTERN=$DD/patterns.cart #----------------------------------------------------------------------------- echo CTEST_FULL_OUTPUT -mpiexec ${boot_lam} -np $3 $UNRES_BIN | grep -v traj1file +${mpiexec} ${boot_lam} ${np} $3 $UNRES_BIN | grep -v traj1file ./prota_unres_energy_check.sh $1 ${UNRES_BIN} ") @@ -592,16 +600,16 @@ else(NOT UNRES_WITH_MPI) if(UNRES_MD_FF STREQUAL "GAB") - add_test(NAME UNRES_M_MD_MPI_Ala10 COMMAND mpiexec ${boot_lam} ${CMAKE_CURRENT_BINARY_DIR}/test_single_ala.sh ) + add_test(NAME UNRES_M_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_M_ENE_prota COMMAND mpiexec ${boot_lam} -np 2 ${CMAKE_CURRENT_BINARY_DIR}/test_prota_E0LL2Y.sh prota_ENE 2 ) - add_test(NAME UNRES_M_ENE1_prota COMMAND mpiexec ${boot_lam} -np 1 ${CMAKE_CURRENT_BINARY_DIR}/test_prota_E0LL2Y.sh prota_ENE 1 ) - add_test(NAME UNRES_M_MIN_prota COMMAND mpiexec ${boot_lam} -np 2 ${CMAKE_CURRENT_BINARY_DIR}/test_prota_E0LL2Y.sh prota_MIN_CART 2 ) - add_test(NAME UNRES_M_MIN_INT COMMAND mpiexec ${boot_lam} -np 1 ${CMAKE_CURRENT_BINARY_DIR}/test_prota_E0LL2Y.sh 1l2y_MIN_INT 1 ) - add_test(NAME UNRES_M_REGULAR COMMAND mpiexec ${boot_lam} -np 1 ${CMAKE_CURRENT_BINARY_DIR}/test_prota_E0LL2Y.sh 1l2y_MIN_REGULAR_INT 1 ) - add_test(NAME UNRES_M_MD_microcanonical COMMAND mpiexec ${boot_lam} -np 2 ${CMAKE_CURRENT_BINARY_DIR}/test_prota_E0LL2Y.sh 1l2y_micro 2 ) + add_test(NAME UNRES_M_ENE_prota COMMAND ${mpiexec} ${boot_lam} ${np} 2 ${CMAKE_CURRENT_BINARY_DIR}/test_prota_E0LL2Y.sh prota_ENE 2 ) + add_test(NAME UNRES_M_ENE1_prota COMMAND ${mpiexec} ${boot_lam} ${np} 1 ${CMAKE_CURRENT_BINARY_DIR}/test_prota_E0LL2Y.sh prota_ENE 1 ) + add_test(NAME UNRES_M_MIN_prota COMMAND ${mpiexec} ${boot_lam} ${np} 2 ${CMAKE_CURRENT_BINARY_DIR}/test_prota_E0LL2Y.sh prota_MIN_CART 2 ) + add_test(NAME UNRES_M_MIN_INT COMMAND ${mpiexec} ${boot_lam} ${np} 1 ${CMAKE_CURRENT_BINARY_DIR}/test_prota_E0LL2Y.sh 1l2y_MIN_INT 1 ) + add_test(NAME UNRES_M_REGULAR COMMAND ${mpiexec} ${boot_lam} ${np} 1 ${CMAKE_CURRENT_BINARY_DIR}/test_prota_E0LL2Y.sh 1l2y_MIN_REGULAR_INT 1 ) + add_test(NAME UNRES_M_MD_microcanonical COMMAND ${mpiexec} ${boot_lam} ${np} 2 ${CMAKE_CURRENT_BINARY_DIR}/test_prota_E0LL2Y.sh 1l2y_micro 2 ) add_test(NAME UNRES_M_Langevin COMMAND sh ${CMAKE_CURRENT_BINARY_DIR}/test_mpi_E0LL2Y.sh 1L2Y_L 2 2 ) # no NH in src_MD-M code # add_test(NAME UNRES_M_NoseHoover COMMAND sh ${CMAKE_CURRENT_BINARY_DIR}/test_mpi_E0LL2Y.sh 1L2Y_NH 2 2 ) diff --git a/source/wham/src-M/CMakeLists.txt b/source/wham/src-M/CMakeLists.txt index 195e5df..7f6c295 100644 --- a/source/wham/src-M/CMakeLists.txt +++ b/source/wham/src-M/CMakeLists.txt @@ -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 ") diff --git a/source/wham/src/CMakeLists.txt b/source/wham/src/CMakeLists.txt index b58dda7..979e78a 100644 --- a/source/wham/src/CMakeLists.txt +++ b/source/wham/src/CMakeLists.txt @@ -252,6 +252,14 @@ install(TARGETS UNRES_WHAM_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 +287,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 ") -- 1.7.9.5