summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--bin/batch/knl_H5detect.sl.in.cmake20
-rw-r--r--bin/batch/knl_ctestSP.sl28
-rw-r--r--config/toolchain/crayle.cmake20
-rw-r--r--src/CMakeLists.txt6
4 files changed, 71 insertions, 3 deletions
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_ctestSP.sl b/bin/batch/knl_ctestSP.sl
new file mode 100644
index 0000000..56da347
--- /dev/null
+++ b/bin/batch/knl_ctestSP.sl
@@ -0,0 +1,28 @@
+#!/bin/bash
+
+#SBATCH -p knl -C quad,flat
+#SBATCH --nodes=1
+#SBATCH -t 01:00:00
+#SBATCH --mail-type=BEGIN,END,FAIL
+##SBATCH --mail-user=<username>@sandia.gov
+#SBATCH --export=ALL
+#SBATCH --job-name=h5_ctestS
+
+module load cmake
+module load craype-hugepages4M
+
+cd build
+CMD="ctest . -E TEST_PAR|H5DIFF|PERFORM -C Release -j 32 -T test"
+
+echo "Run $CMD. Test output will be in build/ctestS.out"
+$CMD >& ctestS.out
+echo "Done running $CMD"
+
+
+#run parallel tests except t_cache_image test
+CMD="ctest . -R TEST_PAR|PH5DIFF|PERFORM -E t_cache_image -C Release -T test"
+
+echo "Run $CMD. Test output will be in build/ctestP.out"
+$CMD >& ctestP.out
+echo "Done running $CMD"
+
diff --git a/config/toolchain/crayle.cmake b/config/toolchain/crayle.cmake
new file mode 100644
index 0000000..a83147b
--- /dev/null
+++ b/config/toolchain/crayle.cmake
@@ -0,0 +1,20 @@
+# Uncomment the following to use cross-compiling
+set(CMAKE_SYSTEM_NAME Linux)
+set(CMAKE_COMPILER_VENDOR "CrayLinuxEnvironment")
+
+set(CMAKE_C_COMPILER cc)
+set(CMAKE_Fortran_COMPILER ftn)
+
+# the following is used if cross-compiling
+set(CMAKE_CROSSCOMPILING_EMULATOR "")
+
+# option to use pre-generated H5Tinit.c file
+set(HDF5_USE_PREGEN OFF)
+# directory where H5Tinit.c file will be found
+#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")
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 311f8b4..a1bab5c 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -943,13 +943,13 @@ if (NOT EXISTS ${HDF5_GENERATED_SOURCE_DIR}/H5Tinit.c)
if (HDF5_BATCH_H5DETECT)
configure_file (
- ${HDF5_SOURCE_DIR}/bin/batch/${HDF5_DETECT_BATCH_SCRIPT}.in
- ${HDF5_BINARY_DIR}/${HDF5_DETECT_BATCH_SCRIPT} ESCAPE_QUOTES @ONLY
+ ${HDF5_SOURCE_DIR}/bin/batch/${HDF5_BATCH_H5DETECT_SCRIPT}.in.cmake
+ ${HDF5_BINARY_DIR}/${HDF5_BATCH_H5DETECT_SCRIPT} ESCAPE_QUOTES @ONLY
)
add_custom_command (
OUTPUT ${HDF5_GENERATED_SOURCE_DIR}/H5Tinit.c
COMMAND ${HDF5_BATCH_CMD}
- ARGS ${HDF5_BATCH_H5DETECT_SCRIPT}
+ ARGS ${HDF5_BINARY_DIR}/${HDF5_BATCH_H5DETECT_SCRIPT}
DEPENDS H5detect
WORKING_DIRECTORY ${HDF5_GENERATED_SOURCE_DIR}
)