summaryrefslogtreecommitdiffstats
path: root/bin/batch
diff options
context:
space:
mode:
Diffstat (limited to 'bin/batch')
-rwxr-xr-xbin/batch/ctest.qsub.in.cmake23
-rw-r--r--bin/batch/ctestP.lsf.in.cmake20
-rw-r--r--bin/batch/ctestP.sl.in.cmake15
-rw-r--r--bin/batch/ctestS.lsf.in.cmake17
-rw-r--r--bin/batch/ctestS.sl.in.cmake15
-rw-r--r--bin/batch/ctest_parallel.cmake.in12
-rw-r--r--bin/batch/ctest_serial.cmake.in12
-rw-r--r--bin/batch/knl_H5detect.sl.in.cmake20
-rw-r--r--bin/batch/knl_ctestP.sl.in.cmake16
-rw-r--r--bin/batch/knl_ctestS.sl.in.cmake16
-rw-r--r--bin/batch/ray_ctestP.lsf.in.cmake22
-rw-r--r--bin/batch/ray_ctestS.lsf.in.cmake17
-rwxr-xr-xbin/batch/raybsub7
13 files changed, 212 insertions, 0 deletions
diff --git a/bin/batch/ctest.qsub.in.cmake b/bin/batch/ctest.qsub.in.cmake
new file mode 100755
index 0000000..da3ae2f
--- /dev/null
+++ b/bin/batch/ctest.qsub.in.cmake
@@ -0,0 +1,23 @@
+#!/bin/bash -l
+if [ $# -gt 0 ]; then
+ SUMMARY_FILE=$1
+fi
+ACCOUNT_ID=@ACCOUNT_ID@
+
+echo "Run parallel test command. Test output will be in build/${SUMMARY_FILE}"
+CTEST_CMD=`which ctest`
+
+#SKIPTESTS <<KEYWORD:script inserts list of skips tests here -- don't remove>>
+
+cd @HDF5_BINARY_DIR@
+if [[ $SUMMARY_FILE == *"ctestS"* ]]; then
+ CMD="${CTEST_CMD} -S ctest_serial.cmake"
+ qsub -t 60 -n 1 -q debug-flat-quad -A ${ACCOUNT_ID} ${CMD} >& ${SUMMARY_FILE}
+ echo "Done running ctest serial command."
+ touch ctestS.done
+else
+ CMD="${CTEST_CMD} -S ctest_parallel.cmake"
+ qsub -t 60 -n 1 -q debug-flat-quad -A ${ACCOUNT_ID} ${CMD} >& ${SUMMARY_FILE}
+ echo "Done running ctest parallel command."
+ touch ctestP.done
+fi
diff --git a/bin/batch/ctestP.lsf.in.cmake b/bin/batch/ctestP.lsf.in.cmake
new file mode 100644
index 0000000..8b89c9c
--- /dev/null
+++ b/bin/batch/ctestP.lsf.in.cmake
@@ -0,0 +1,20 @@
+#!/bin/tcsh
+### LSF syntax
+#BSUB -nnodes 1 #number of nodes
+#BSUB -W 30 #walltime in minutes
+#BSUB -G guests #account
+#BSUB -e ctestPerrors.txt #stderr
+#BSUB -o ctestPoutput.txt #stdout
+#BSUB -J hdf5_ctestP #job
+##BSUB -q pbatch #queue to use
+#BSUB -q pdebug
+
+##date; hostname
+##echo -n 'JobID is '; echo $LSB_JOBID
+
+cd @HDF5_BINARY_DIR@
+echo "Run parallel test command. Test output will be in build/ctestP.out"
+ctest -S ctest_parallel.cmake >& ctestP.out
+
+echo "Done running ctest parallel command."
+touch ctestP.done
diff --git a/bin/batch/ctestP.sl.in.cmake b/bin/batch/ctestP.sl.in.cmake
new file mode 100644
index 0000000..599fee8
--- /dev/null
+++ b/bin/batch/ctestP.sl.in.cmake
@@ -0,0 +1,15 @@
+#!/bin/bash
+
+#SBATCH --nodes=1
+#SBATCH -t 00:30:00
+#SBATCH --mail-type=BEGIN,END,FAIL
+##SBATCH --mail-user=<username>@sandia.gov
+#SBATCH --export=ALL
+#SBATCH --job-name=h5_ctestP
+
+cd @HDF5_BINARY_DIR@
+echo "Run parallel test command. Test output will be in build/ctestP.out"
+ctest -S ctest_parallel.cmake >& ctestP.out
+
+echo "Done running ctest parallel command."
+touch ctestP.done
diff --git a/bin/batch/ctestS.lsf.in.cmake b/bin/batch/ctestS.lsf.in.cmake
new file mode 100644
index 0000000..73b17c0
--- /dev/null
+++ b/bin/batch/ctestS.lsf.in.cmake
@@ -0,0 +1,17 @@
+#!/bin/tcsh
+### LSF syntax
+#BSUB -nnodes 1 #number of nodes
+#BSUB -W 29 #walltime in minutes
+#BSUB -G guests #account
+#BSUB -e ctestSerrors.txt #stderr
+#BSUB -o ctestSoutput.txt #stdout
+#BSUB -J hdf5_ctestS #job
+##BSUB -q pbatch #queue to use
+#BSUB -q pdebug
+
+cd @HDF5_BINARY_DIR@
+echo "Run command. Test output will be in build/ctestS.out"
+ctest -S ctest_serial.cmake >& ctestS.out
+
+echo "Done running command."
+touch ctestS.done
diff --git a/bin/batch/ctestS.sl.in.cmake b/bin/batch/ctestS.sl.in.cmake
new file mode 100644
index 0000000..bf0d6ae
--- /dev/null
+++ b/bin/batch/ctestS.sl.in.cmake
@@ -0,0 +1,15 @@
+#!/bin/bash
+
+#SBATCH --nodes=1
+#SBATCH -t 00:30:00
+#SBATCH --mail-type=BEGIN,END,FAIL
+##SBATCH --mail-user=<username>@sandia.gov
+#SBATCH --export=ALL
+#SBATCH --job-name=h5_ctestS
+
+cd @HDF5_BINARY_DIR@
+echo "Run command. Test output will be in build/ctestS.out"
+ctest -S ctest_serial.cmake >& ctestS.out
+
+echo "Done running command."
+touch ctestS.done
diff --git a/bin/batch/ctest_parallel.cmake.in b/bin/batch/ctest_parallel.cmake.in
new file mode 100644
index 0000000..f35a772
--- /dev/null
+++ b/bin/batch/ctest_parallel.cmake.in
@@ -0,0 +1,12 @@
+if(NOT "$ENV{CI_SITE_NAME}" STREQUAL "")
+ set(CTEST_SITE "$ENV{CI_SITE_NAME}")
+endif()
+if(NOT "$ENV{CI_BUILD_NAME}" STREQUAL "")
+ set(CTEST_BUILD_NAME "$ENV{CI_BUILD_NAME}")
+endif()
+
+ctest_start ("$ENV{CI_MODEL}" "@HDF5_SOURCE_DIR@" "@HDF5_BINARY_DIR@" APPEND)
+ctest_test (BUILD "@HDF5_BINARY_DIR@" APPEND INCLUDE MPI_TEST_ RETURN_VALUE res)
+if (${res} LESS 0 OR ${res} GREATER 0)
+ file (APPEND ${CTEST_SCRIPT_DIRECTORY}/FailedCTest.txt "Failed Tests: ${res}\n")
+ endif ()
diff --git a/bin/batch/ctest_serial.cmake.in b/bin/batch/ctest_serial.cmake.in
new file mode 100644
index 0000000..e54421b
--- /dev/null
+++ b/bin/batch/ctest_serial.cmake.in
@@ -0,0 +1,12 @@
+if(NOT "$ENV{CI_SITE_NAME}" STREQUAL "")
+ set(CTEST_SITE "$ENV{CI_SITE_NAME}")
+endif()
+if(NOT "$ENV{CI_BUILD_NAME}" STREQUAL "")
+ set(CTEST_BUILD_NAME "$ENV{CI_BUILD_NAME}")
+endif()
+
+ctest_start ("$ENV{CI_MODEL}" "@HDF5_SOURCE_DIR@" "@HDF5_BINARY_DIR@" APPEND)
+ctest_test (BUILD "@HDF5_BINARY_DIR@" APPEND EXCLUDE MPI_TEST_ PARALLEL_LEVEL 32 RETURN_VALUE res)
+if (${res} LESS 0 OR ${res} GREATER 0)
+ file (APPEND ${CTEST_SCRIPT_DIRECTORY}/FailedCTest.txt "Failed Tests: ${res}\n")
+ endif ()
diff --git a/bin/batch/knl_H5detect.sl.in.cmake b/bin/batch/knl_H5detect.sl.in.cmake
new file mode 100644
index 0000000..39a3ef3
--- /dev/null
+++ b/bin/batch/knl_H5detect.sl.in.cmake
@@ -0,0 +1,20 @@
+#!/bin/bash
+
+#SBATCH -p knl -C quad
+#SBATCH --nodes=1
+#SBATCH -t 00:10:00
+#SBATCH --mail-type=BEGIN,END,FAIL
+#SBATCH --mail-user=<username>@sandia.gov
+#SBATCH --export=ALL
+#SBATCH --job-name=knl_h5detect
+
+
+# Inputs: Build directory, output file name, executable file name (username/email if available).
+PROGNAME=H5detect
+OUTPUT=H5Tinit.c
+
+CMD="@HDF5_BINARY_DIR@/bin/${PROGNAME} @HDF5_GENERATED_SOURCE_DIR@/${OUTPUT}"
+echo "Run $CMD"
+srun -n 1 $CMD
+echo "Done running $CMD"
+
diff --git a/bin/batch/knl_ctestP.sl.in.cmake b/bin/batch/knl_ctestP.sl.in.cmake
new file mode 100644
index 0000000..97bd2ad
--- /dev/null
+++ b/bin/batch/knl_ctestP.sl.in.cmake
@@ -0,0 +1,16 @@
+#!/bin/bash
+
+#SBATCH -p knl -C quad,cache
+#SBATCH --nodes=1
+#SBATCH -t 00:30:00
+#SBATCH --mail-type=BEGIN,END,FAIL
+##SBATCH --mail-user=<username>@sandia.gov
+#SBATCH --export=ALL
+#SBATCH --job-name=h5_ctestP
+
+cd @HDF5_BINARY_DIR@
+echo "Run parallel test command. Test output will be in build/ctestP.out"
+ctest -S ctest_parallel.cmake >& ctestP.out
+
+echo "Done running ctest parallel command."
+touch ctestP.done
diff --git a/bin/batch/knl_ctestS.sl.in.cmake b/bin/batch/knl_ctestS.sl.in.cmake
new file mode 100644
index 0000000..87c4a48
--- /dev/null
+++ b/bin/batch/knl_ctestS.sl.in.cmake
@@ -0,0 +1,16 @@
+#!/bin/bash
+
+#SBATCH -p knl -C quad,cache
+#SBATCH --nodes=1
+#SBATCH -t 00:30:00
+#SBATCH --mail-type=BEGIN,END,FAIL
+##SBATCH --mail-user=<username>@sandia.gov
+#SBATCH --export=ALL
+#SBATCH --job-name=h5_ctestS
+
+cd @HDF5_BINARY_DIR@
+echo "Run command. Test output will be in build/ctestS.out"
+ctest -S ctest_serial.cmake >& ctestS.out
+
+echo "Done running command."
+touch ctestS.done
diff --git a/bin/batch/ray_ctestP.lsf.in.cmake b/bin/batch/ray_ctestP.lsf.in.cmake
new file mode 100644
index 0000000..51425b5
--- /dev/null
+++ b/bin/batch/ray_ctestP.lsf.in.cmake
@@ -0,0 +1,22 @@
+#!/bin/tcsh
+### LSF syntax
+#BSUB -n 6 #number of nodes
+#BSUB -R "span[ptile=6]"
+#BSUB -W 30 #walltime in minutes
+#BSUB -G guests #account
+#BSUB -e ctestPerrors.txt #stderr
+#BSUB -o ctestPoutput.txt #stdout
+#BSUB -J hdf5_ctestP #job
+##BSUB -q pbatch #queue to use
+#BSUB -q pdebug
+
+##date; hostname
+##echo -n 'JobID is '; echo $LSB_JOBID
+
+cd @HDF5_BINARY_DIR@
+echo "Run parallel test command. Test output will be in build/ctestP.out"
+ctest -S ctest_parallel.cmake >& ctestP.out
+
+echo "Done running ctest parallel command."
+touch ctestP.done
+~
diff --git a/bin/batch/ray_ctestS.lsf.in.cmake b/bin/batch/ray_ctestS.lsf.in.cmake
new file mode 100644
index 0000000..7f585b4
--- /dev/null
+++ b/bin/batch/ray_ctestS.lsf.in.cmake
@@ -0,0 +1,17 @@
+#!/bin/tcsh
+### LSF syntax
+#BSUB -n 1 #number of nodes
+#BSUB -W 29 #walltime in minutes
+#BSUB -G guests #account
+#BSUB -e ctestSerrors.txt #stderr
+#BSUB -o ctestSoutput.txt #stdout
+#BSUB -J hdf5_ctestS #job
+##BSUB -q pbatch #queue to use
+#BSUB -q pdebug
+
+cd @HDF5_BINARY_DIR@
+echo "Run command. Test output will be in build/ctestS.out"
+ctest -S ctest_serial.cmake >& ctestS.out
+
+echo "Done running command."
+touch ctestS.done
diff --git a/bin/batch/raybsub b/bin/batch/raybsub
new file mode 100755
index 0000000..19dceef
--- /dev/null
+++ b/bin/batch/raybsub
@@ -0,0 +1,7 @@
+#!/bin/tcsh
+
+# ray.llnl.gov requires a '<' with bsub for submitting .lsf batch jobs.
+# CMake is reluctant to pass the '<', so we put it in this script and use
+# the script to submit the bsub command on ray.
+
+bsub < $1