Merge pull request #1309 in HDFFV/hdf5 from ~LRKNOX/hdf5_lrk:develop to develop

* commit 'b24259ed8cdb273273f82c2b3f3a2dcac60b32ba':
  Add files and changes to cross compile with CrayLinuxEnvironment and run ctest tests with a batch job on knl compute nodes.
This commit is contained in:
Larry Knox 2018-10-29 14:57:00 -05:00
commit 81c0357645
4 changed files with 71 additions and 3 deletions

View File

@ -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"

28
bin/batch/knl_ctestSP.sl Normal file
View File

@ -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"

View File

@ -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")

View File

@ -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}
)