From dddc940bdf4a0ae236b7096245a436aead30b55d Mon Sep 17 00:00:00 2001 From: Larry Knox Date: Sun, 3 Feb 2019 21:33:16 -0600 Subject: Add batchscript options that work when running ctest directly. --- config/cmake/scripts/HPC/par-HDF5options.cmake | 5 ++++- config/cmake/scripts/HPC/ser-HDF5options.cmake | 2 ++ config/toolchain/crayle.cmake | 7 +++---- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/config/cmake/scripts/HPC/par-HDF5options.cmake b/config/cmake/scripts/HPC/par-HDF5options.cmake index 68d35dc..5386373 100644 --- a/config/cmake/scripts/HPC/par-HDF5options.cmake +++ b/config/cmake/scripts/HPC/par-HDF5options.cmake @@ -103,6 +103,9 @@ set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_PACKAGE_EXTLIBS:BOOL=ON") #options to run test scripts in batch commands set (LOCAL_BATCH_SCRIPT_COMMAND "sbatch") +set (LOCAL_BATCH_TEST "TRUE") +set (LOCAL_BATCH_SCRIPT_NAME "ctestS.sl") +set (LOCAL_BATCH_SCRIPT_PARALLEL_NAME "ctestP.sl") set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DLOCAL_BATCH_TEST:BOOL=ON") set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DLOCAL_BATCH_SCRIPT_NAME:STRING=ctestS.sl") set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DLOCAL_BATCH_SCRIPT_PARALLEL_NAME:STRING=ctestP.sl") @@ -114,7 +117,7 @@ set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DMPIEXEC_MAX_NUMPROCS:STRING=6") ############################################################################################# ### use a toolchain file -#set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DCMAKE_TOOLCHAIN_FILE:STRING=config/toolchain/craype.cmake") +#set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DCMAKE_TOOLCHAIN_FILE:STRING=config/toolchain/crayle.cmake") #set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DCMAKE_TOOLCHAIN_FILE:STRING=config/toolchain/intel.cmake") #set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DCMAKE_TOOLCHAIN_FILE:STRING=config/toolchain/GCC.cmake") diff --git a/config/cmake/scripts/HPC/ser-HDF5options.cmake b/config/cmake/scripts/HPC/ser-HDF5options.cmake index 80c8b9e..f935efc 100644 --- a/config/cmake/scripts/HPC/ser-HDF5options.cmake +++ b/config/cmake/scripts/HPC/ser-HDF5options.cmake @@ -102,6 +102,8 @@ set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_PACKAGE_EXTLIBS:BOOL=ON") #options to run test scripts in batch commands set (LOCAL_BATCH_SCRIPT_COMMAND "sbatch") +set (LOCAL_BATCH_TEST "TRUE") +set (LOCAL_BATCH_SCRIPT_NAME "ctestS.sl") set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DLOCAL_BATCH_TEST:BOOL=ON") set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DLOCAL_BATCH_SCRIPT_NAME:STRING=ctestS.sl") diff --git a/config/toolchain/crayle.cmake b/config/toolchain/crayle.cmake index 47d8afc..159f43a 100644 --- a/config/toolchain/crayle.cmake +++ b/config/toolchain/crayle.cmake @@ -15,7 +15,6 @@ set(HDF5_USE_PREGEN OFF) #set(HDF5_USE_PREGEN_DIR "/lscratch1/lknox/HDF5_1_10_4/CMake-hdf5-1.10.4") # option to generate H5Tinit.c by running H5detect on knl compute node during build -set(HDF5_BATCH_H5DETECT ON) -set(HDF5_BATCH_CMD "sbatch") -set(HDF5_BATCH_H5DETECT_SCRIPT "knl_H5detect.sl") -set(MPIEXEC_EXECUTABLE "srun") +#set(HDF5_BATCH_H5DETECT ON) +#set(HDF5_BATCH_CMD "sbatch") +#set(HDF5_BATCH_H5DETECT_SCRIPT "knl_H5detect.sl") -- cgit v0.12 From 6c2a4b728f3c8eadb18d4e10d41bdbd7d1c8f3e8 Mon Sep 17 00:00:00 2001 From: Larry Knox Date: Mon, 4 Feb 2019 08:46:57 -0600 Subject: Add LOCAL_BATCH_SCRIPT_ARG variable for submitting account information and other batch command variations with ctest command. --- bin/batch/knl_ctestP.sl.in.cmake | 2 +- bin/batch/knl_ctestS.sl.in.cmake | 2 +- config/cmake/scripts/CTestScript.cmake | 8 ++++---- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/bin/batch/knl_ctestP.sl.in.cmake b/bin/batch/knl_ctestP.sl.in.cmake index 8d786da..5c7c83f 100644 --- a/bin/batch/knl_ctestP.sl.in.cmake +++ b/bin/batch/knl_ctestP.sl.in.cmake @@ -1,6 +1,6 @@ #!/bin/bash -#SBATCH -C knl,quad,cache +#SBATCH -p knl -C quad,cache #SBATCH --nodes=1 #SBATCH -t 00:30:00 #SBATCH --mail-type=BEGIN,END,FAIL diff --git a/bin/batch/knl_ctestS.sl.in.cmake b/bin/batch/knl_ctestS.sl.in.cmake index b983228..0dae31f 100644 --- a/bin/batch/knl_ctestS.sl.in.cmake +++ b/bin/batch/knl_ctestS.sl.in.cmake @@ -1,6 +1,6 @@ #!/bin/bash -#SBATCH -C knl,quad,cache +#SBATCH -p knl -C quad,cache #SBATCH --nodes=1 #SBATCH -t 00:30:00 #SBATCH --mail-type=BEGIN,END,FAIL diff --git a/config/cmake/scripts/CTestScript.cmake b/config/cmake/scripts/CTestScript.cmake index c380a9d..0e2afc7 100644 --- a/config/cmake/scripts/CTestScript.cmake +++ b/config/cmake/scripts/CTestScript.cmake @@ -278,9 +278,9 @@ message (STATUS "Dashboard script configuration:\n${vars}\n") else () file(STRINGS ${CTEST_BINARY_DIRECTORY}/Testing/TAG TAG_CONTENTS REGEX "^2([0-9]+)[-]([0-9]+)$") if ("${LOCAL_BATCH_SCRIPT_COMMAND}" STREQUAL "raybsub") - execute_process (COMMAND ${CTEST_BINARY_DIRECTORY}/${LOCAL_BATCH_SCRIPT_COMMAND} ${CTEST_BINARY_DIRECTORY}/${LOCAL_BATCH_SCRIPT_NAME}) + execute_process (COMMAND ${CTEST_BINARY_DIRECTORY}/${LOCAL_BATCH_SCRIPT_COMMAND} ${LOCAL_BATCH_SCRIPT_ARGS} ${CTEST_BINARY_DIRECTORY}/${LOCAL_BATCH_SCRIPT_NAME}) else () - execute_process (COMMAND ${LOCAL_BATCH_SCRIPT_COMMAND} ${CTEST_BINARY_DIRECTORY}/${LOCAL_BATCH_SCRIPT_NAME}) + execute_process (COMMAND ${LOCAL_BATCH_SCRIPT_COMMAND} ${LOCAL_BATCH_SCRIPT_ARGS} ${CTEST_BINARY_DIRECTORY}/${LOCAL_BATCH_SCRIPT_NAME}) endif () message(STATUS "Check for existence of ${CTEST_BINARY_DIRECTORY}/Testing/${TAG_CONTENTS}/Test.xml") execute_process(COMMAND ls ${CTEST_BINARY_DIRECTORY}/Testing/${TAG_CONTENTS}/Test.xml RESULT_VARIABLE result OUTPUT_QUIET ERROR_QUIET) @@ -297,9 +297,9 @@ message (STATUS "Dashboard script configuration:\n${vars}\n") file (RENAME ${CTEST_BINARY_DIRECTORY}/Testing/Temporary/LastTest_${TAG_CONTENTS}.log ${CTEST_BINARY_DIRECTORY}/Testing/Temporary/LastTest_${TAG_CONTENTS}_Serial.log) unset(result CACHE) if ("${LOCAL_BATCH_SCRIPT_COMMAND}" STREQUAL "raybsub") - execute_process (COMMAND ${CTEST_BINARY_DIRECTORY}/${LOCAL_BATCH_SCRIPT_COMMAND} ${CTEST_BINARY_DIRECTORY}/${LOCAL_BATCH_SCRIPT_PARALLEL_NAME}) + execute_process (COMMAND ${CTEST_BINARY_DIRECTORY}/${LOCAL_BATCH_SCRIPT_COMMAND} ${LOCAL_BATCH_SCRIPT_ARGS} ${CTEST_BINARY_DIRECTORY}/${LOCAL_BATCH_SCRIPT_PARALLEL_NAME}) else () - execute_process (COMMAND ${LOCAL_BATCH_SCRIPT_COMMAND} ${CTEST_BINARY_DIRECTORY}/${LOCAL_BATCH_SCRIPT_PARALLEL_NAME}) + execute_process (COMMAND ${LOCAL_BATCH_SCRIPT_COMMAND} ${LOCAL_BATCH_SCRIPT_ARGS} ${CTEST_BINARY_DIRECTORY}/${LOCAL_BATCH_SCRIPT_PARALLEL_NAME}) endif () message(STATUS "Check for existence of ${CTEST_BINARY_DIRECTORY}/Testing/${TAG_CONTENTS}/Test.xml") execute_process(COMMAND ls ${CTEST_BINARY_DIRECTORY}/Testing/${TAG_CONTENTS}/Test.xml RESULT_VARIABLE result OUTPUT_QUIET ERROR_QUIET) -- cgit v0.12