From 126d1e6176a490b9d4c73b1c7a75d697e9c7162c Mon Sep 17 00:00:00 2001 From: Larry Knox Date: Fri, 28 Dec 2018 16:50:48 -0600 Subject: Add .lsf batch scripts and insert the build directory into the scripts during configuration. --- bin/batch/ctestP.lsf.in.cmake | 19 +++++++++++++++++++ bin/batch/ctestS.lsf.in.cmake | 18 ++++++++++++++++++ config/cmake/scripts/CTestScript.cmake | 1 + src/CMakeLists.txt | 13 +++++++++++++ 4 files changed, 51 insertions(+) create mode 100644 bin/batch/ctestP.lsf.in.cmake create mode 100644 bin/batch/ctestS.lsf.in.cmake diff --git a/bin/batch/ctestP.lsf.in.cmake b/bin/batch/ctestP.lsf.in.cmake new file mode 100644 index 0000000..c410a1d --- /dev/null +++ b/bin/batch/ctestP.lsf.in.cmake @@ -0,0 +1,19 @@ +#!/bin/tcsh +### LSF syntax +#BSUB -n 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 . -R 'TEST_PAR|PH5DIFF|PERFORM' -E t_cache_image -C Release -T test >& ctestP.out + +echo "Done running ctest parallel command." diff --git a/bin/batch/ctestS.lsf.in.cmake b/bin/batch/ctestS.lsf.in.cmake new file mode 100644 index 0000000..a6f4ff8 --- /dev/null +++ b/bin/batch/ctestS.lsf.in.cmake @@ -0,0 +1,18 @@ +#!/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 . -E 'TEST_PAR|H5DIFF|PERFORM' -C Release -j 32 -T test >& ctestS.out + +##$CMD >& ctestS.out +echo "Done running command." + diff --git a/config/cmake/scripts/CTestScript.cmake b/config/cmake/scripts/CTestScript.cmake index 9534b1e..f4dffb3 100755 --- a/config/cmake/scripts/CTestScript.cmake +++ b/config/cmake/scripts/CTestScript.cmake @@ -281,6 +281,7 @@ message (STATUS "Dashboard script configuration:\n${vars}\n") endif () message(STATUS "Found ${CTEST_BINARY_DIRECTORY}/Testing/${TAG_CONTENTS}/Test.xml for serial tests. Renaming to SerialTest.xml") file (RENAME ${CTEST_BINARY_DIRECTORY}/Testing/${TAG_CONTENTS}/Test.xml ${CTEST_BINARY_DIRECTORY}/Testing/${TAG_CONTENTS}/SerialTest.xml) + file (RENAME ${CTEST_BINARY_DIRECTORY}/Testing/Temporary/LastTest_${TAG_CONTENTS}.log ${CTEST_BINARY_DIRECTORY}/Testing/Temporary/LastTest_${TAG_CONTENTS}_Serial.log) unset(result CACHE) execute_process (COMMAND ${LOCAL_BATCH_SCRIPT_COMMAND} ${CTEST_SOURCE_DIRECTORY}/bin/batch/${LOCAL_BATCH_SCRIPT_PARALLEL_NAME}) message(STATUS "Check for existence of ${CTEST_BINARY_DIRECTORY}/Testing/${TAG_CONTENTS}/Test.xml") diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 40b64f5..17325b0 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -943,6 +943,19 @@ if (BUILD_SHARED_LIBS) file (MAKE_DIRECTORY "${HDF5_BINARY_DIR}/shared") endif () +# This should perhaps be some kind of foreach or for loop for all of the files in the bin/batch directory. +# For today I'll do it for the two that I want to try. +if (LOCAL_BATCH_TEST) + configure_file ( + ${HDF5_SOURCE_DIR}/bin/batch/ctestP.lsf.in.cmake + ${HDF5_SOURCE_DIR}/bin/batch/ctestP.lsf + ) + configure_file ( + ${HDF5_SOURCE_DIR}/bin/batch/ctestS.lsf.in.cmake + ${HDF5_SOURCE_DIR}/bin/batch/ctestS.lsf + ) +) + if (NOT EXISTS ${HDF5_GENERATED_SOURCE_DIR}/H5Tinit.c) add_executable (H5detect ${HDF5_SRC_DIR}/H5detect.c) target_include_directories(H5detect PRIVATE "${HDF5_SRC_DIR};${HDF5_BINARY_DIR};$<$:${MPI_C_INCLUDE_DIRS}>") -- cgit v0.12 From 715272eeb74f0b3e51c865e4139e1a295d156371 Mon Sep 17 00:00:00 2001 From: Larry Knox Date: Mon, 31 Dec 2018 06:23:13 -0600 Subject: Correct syntax error in CMakeLists.txt. --- src/CMakeLists.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 17325b0..61cc05a 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -948,13 +948,13 @@ endif () if (LOCAL_BATCH_TEST) configure_file ( ${HDF5_SOURCE_DIR}/bin/batch/ctestP.lsf.in.cmake - ${HDF5_SOURCE_DIR}/bin/batch/ctestP.lsf + ${HDF5_SOURCE_DIR}/bin/batch ESCAPE_QUOTES @ONLY ) configure_file ( ${HDF5_SOURCE_DIR}/bin/batch/ctestS.lsf.in.cmake - ${HDF5_SOURCE_DIR}/bin/batch/ctestS.lsf + ${HDF5_SOURCE_DIR}/bin/batch ESCAPE_QUOTES @ONLY ) -) +endif () if (NOT EXISTS ${HDF5_GENERATED_SOURCE_DIR}/H5Tinit.c) add_executable (H5detect ${HDF5_SRC_DIR}/H5detect.c) -- cgit v0.12 From 72124031ec497c0bccf5b9f89dc500a266e21dcf Mon Sep 17 00:00:00 2001 From: Larry Knox Date: Mon, 31 Dec 2018 09:20:27 -0600 Subject: Add libhdf5_hl_fortran symlinks for libhdf5hl_fortran files. Set ctest*.lsf.in.cmake scripts for sierra. Correct src/CMakelists.txt syntax error. --- bin/batch/ctestP.lsf.in.cmake | 2 +- bin/batch/ctestS.lsf.in.cmake | 2 +- hl/fortran/Makefile.am | 12 ++++++++++++ src/CMakeLists.txt | 22 ++++++++++++---------- 4 files changed, 26 insertions(+), 12 deletions(-) diff --git a/bin/batch/ctestP.lsf.in.cmake b/bin/batch/ctestP.lsf.in.cmake index c410a1d..2777f39 100644 --- a/bin/batch/ctestP.lsf.in.cmake +++ b/bin/batch/ctestP.lsf.in.cmake @@ -1,6 +1,6 @@ #!/bin/tcsh ### LSF syntax -#BSUB -n 1 #number of nodes +#BSUB -nnodes 1 #number of nodes #BSUB -W 30 #walltime in minutes #BSUB -G guests #account #BSUB -e ctestPerrors.txt #stderr diff --git a/bin/batch/ctestS.lsf.in.cmake b/bin/batch/ctestS.lsf.in.cmake index a6f4ff8..5692574 100644 --- a/bin/batch/ctestS.lsf.in.cmake +++ b/bin/batch/ctestS.lsf.in.cmake @@ -1,6 +1,6 @@ #!/bin/tcsh ### LSF syntax -#BSUB -n 1 #number of nodes +#BSUB -nnodes 1 #number of nodes #BSUB -W 29 #walltime in minutes #BSUB -G guests #account #BSUB -e ctestSerrors.txt #stderr diff --git a/hl/fortran/Makefile.am b/hl/fortran/Makefile.am index ad18a21..14456fe 100644 --- a/hl/fortran/Makefile.am +++ b/hl/fortran/Makefile.am @@ -26,6 +26,18 @@ include $(top_srcdir)/config/commence.am SUBDIRS=src test DIST_SUBDIRS=src test examples +# The name of the lib file doesn't follow the same pattern as the other hl lib +# files, namely libhdf5_hl_*. Add a symlink with the compliant name to the +# actual lib file. +install-exec-hook: + cd $(DESTDIR)$(libdir) && \ + if test -f libhdf5hl_fortran.a; then \ + $(LN_S) libhdf5hl_fortran.a libhdf5_hl_fortran.a; \ + fi; \ + if test -f libhdf5hl_fortran.so; then \ + $(LN_S) libhdf5hl_fortran.so libhdf5_hl_fortran.so; \ + fi; + # Install examples install-examples uninstall-examples: @(cd examples && $(MAKE) $(AM_MAKEFLAGS) $@) || exit 1; diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 61cc05a..96cf7ab 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -943,17 +943,19 @@ if (BUILD_SHARED_LIBS) file (MAKE_DIRECTORY "${HDF5_BINARY_DIR}/shared") endif () -# This should perhaps be some kind of foreach or for loop for all of the files in the bin/batch directory. -# For today I'll do it for the two that I want to try. if (LOCAL_BATCH_TEST) - configure_file ( - ${HDF5_SOURCE_DIR}/bin/batch/ctestP.lsf.in.cmake - ${HDF5_SOURCE_DIR}/bin/batch ESCAPE_QUOTES @ONLY - ) - configure_file ( - ${HDF5_SOURCE_DIR}/bin/batch/ctestS.lsf.in.cmake - ${HDF5_SOURCE_DIR}/bin/batch ESCAPE_QUOTES @ONLY - ) + if (LOCAL_BATCH_SCRIPT_NAME) + configure_file ( + ${HDF5_SOURCE_DIR}/bin/batch/${LOCAL_BATCH_SCRIPT_NAME}.in.cmake + ${HDF5_SOURCE_DIR}/bin/batch/${LOCAL_BATCH_SCRIPT_NAME} ESCAPE_QUOTES @ONLY + ) + endif () + if (LOCAL_BATCH_SCRIPT_PARALLEL_NAME) + configure_file ( + ${HDF5_SOURCE_DIR}/bin/batch/${LOCAL_BATCH_SCRIPT_PARALLEL_NAME}.in.cmake + ${HDF5_SOURCE_DIR}/bin/batch/${LOCAL_BATCH_SCRIPT_PARALLEL_NAME} ESCAPE_QUOTES @ONLY + ) + endif () endif () if (NOT EXISTS ${HDF5_GENERATED_SOURCE_DIR}/H5Tinit.c) -- cgit v0.12 From 25fe692c5c5c37a904a0d2ba3f447e60396c30da Mon Sep 17 00:00:00 2001 From: Larry Knox Date: Sat, 5 Jan 2019 07:49:19 -0600 Subject: Configure build directory in batch scripts. --- bin/batch/ctestP.sl.in.cmake | 16 ++++++++++++++++ bin/batch/ctestS.sl.in.cmake | 15 +++++++++++++++ bin/batch/knl_ctestP.sl | 18 ------------------ bin/batch/knl_ctestP.sl.in.cmake | 18 ++++++++++++++++++ bin/batch/knl_ctestS.sl | 17 ----------------- bin/batch/knl_ctestS.sl.in.cmake | 17 +++++++++++++++++ bin/batch/knl_ctestSP.sl | 28 ---------------------------- bin/batch/sbatch_ctestP.sl | 17 ----------------- bin/batch/sbatch_ctestS.sl | 16 ---------------- bin/batch/sbatch_ctestSP.sl | 25 ------------------------- config/cmake/scripts/CTestScript.cmake | 4 ++-- src/CMakeLists.txt | 4 ++-- 12 files changed, 70 insertions(+), 125 deletions(-) create mode 100644 bin/batch/ctestP.sl.in.cmake create mode 100644 bin/batch/ctestS.sl.in.cmake delete mode 100644 bin/batch/knl_ctestP.sl create mode 100644 bin/batch/knl_ctestP.sl.in.cmake delete mode 100644 bin/batch/knl_ctestS.sl create mode 100644 bin/batch/knl_ctestS.sl.in.cmake delete mode 100644 bin/batch/knl_ctestSP.sl delete mode 100644 bin/batch/sbatch_ctestP.sl delete mode 100644 bin/batch/sbatch_ctestS.sl delete mode 100644 bin/batch/sbatch_ctestSP.sl diff --git a/bin/batch/ctestP.sl.in.cmake b/bin/batch/ctestP.sl.in.cmake new file mode 100644 index 0000000..230a642 --- /dev/null +++ b/bin/batch/ctestP.sl.in.cmake @@ -0,0 +1,16 @@ +#!/bin/bash + +#SBATCH --nodes=1 +#SBATCH -t 00:30:00 +#SBATCH --mail-type=BEGIN,END,FAIL +##SBATCH --mail-user=@sandia.gov +#SBATCH --export=ALL +#SBATCH --job-name=h5_ctestS + +cd @HDF5_BINARY_DIR@ +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/bin/batch/ctestS.sl.in.cmake b/bin/batch/ctestS.sl.in.cmake new file mode 100644 index 0000000..9802e13 --- /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=@sandia.gov +#SBATCH --export=ALL +#SBATCH --job-name=h5_ctestS + +cd @HDF5_BINARY_DIR@ +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" diff --git a/bin/batch/knl_ctestP.sl b/bin/batch/knl_ctestP.sl deleted file mode 100644 index 3a03fe2..0000000 --- a/bin/batch/knl_ctestP.sl +++ /dev/null @@ -1,18 +0,0 @@ -#!/bin/bash - -#SBATCH -p knl -C quad,flat -#SBATCH --nodes=1 -#SBATCH -t 00:30:00 -#SBATCH --mail-type=BEGIN,END,FAIL -##SBATCH --mail-user=@sandia.gov -#SBATCH --export=ALL -#SBATCH --job-name=h5_ctestS - -cd build -#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/bin/batch/knl_ctestP.sl.in.cmake b/bin/batch/knl_ctestP.sl.in.cmake new file mode 100644 index 0000000..687804b --- /dev/null +++ b/bin/batch/knl_ctestP.sl.in.cmake @@ -0,0 +1,18 @@ +#!/bin/bash + +#SBATCH -C knl,quad,cache +#SBATCH --nodes=1 +#SBATCH -t 00:30:00 +#SBATCH --mail-type=BEGIN,END,FAIL +##SBATCH --mail-user=@sandia.gov +#SBATCH --export=ALL +#SBATCH --job-name=h5_ctestS + +cd @HDF5_BINARY_DIR@ +#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/bin/batch/knl_ctestS.sl b/bin/batch/knl_ctestS.sl deleted file mode 100644 index 5b77c5b..0000000 --- a/bin/batch/knl_ctestS.sl +++ /dev/null @@ -1,17 +0,0 @@ -#!/bin/bash - -#SBATCH -p knl -C quad,flat -#SBATCH --nodes=1 -#SBATCH -t 00:30:00 -#SBATCH --mail-type=BEGIN,END,FAIL -##SBATCH --mail-user=@sandia.gov -#SBATCH --export=ALL -#SBATCH --job-name=h5_ctestS - -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" - diff --git a/bin/batch/knl_ctestS.sl.in.cmake b/bin/batch/knl_ctestS.sl.in.cmake new file mode 100644 index 0000000..de1335c --- /dev/null +++ b/bin/batch/knl_ctestS.sl.in.cmake @@ -0,0 +1,17 @@ +#!/bin/bash + +#SBATCH -C knl,quad,cache +#SBATCH --nodes=1 +#SBATCH -t 00:30:00 +#SBATCH --mail-type=BEGIN,END,FAIL +##SBATCH --mail-user=@sandia.gov +#SBATCH --export=ALL +#SBATCH --job-name=h5_ctestS + +cd @HDF5_BINARY_DIR@ +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" + diff --git a/bin/batch/knl_ctestSP.sl b/bin/batch/knl_ctestSP.sl deleted file mode 100644 index 56da347..0000000 --- a/bin/batch/knl_ctestSP.sl +++ /dev/null @@ -1,28 +0,0 @@ -#!/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=@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/bin/batch/sbatch_ctestP.sl b/bin/batch/sbatch_ctestP.sl deleted file mode 100644 index e967dce..0000000 --- a/bin/batch/sbatch_ctestP.sl +++ /dev/null @@ -1,17 +0,0 @@ -#!/bin/bash - -#SBATCH --nodes=1 -#SBATCH -t 00:30:00 -#SBATCH --mail-type=BEGIN,END,FAIL -##SBATCH --mail-user=@sandia.gov -#SBATCH --export=ALL -#SBATCH --job-name=h5_ctestS - - -cd build -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/bin/batch/sbatch_ctestS.sl b/bin/batch/sbatch_ctestS.sl deleted file mode 100644 index a103356..0000000 --- a/bin/batch/sbatch_ctestS.sl +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/bash - -#SBATCH --nodes=1 -#SBATCH -t 00:30:00 -#SBATCH --mail-type=BEGIN,END,FAIL -##SBATCH --mail-user=@sandia.gov -#SBATCH --export=ALL -#SBATCH --job-name=h5_ctestS - - -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" diff --git a/bin/batch/sbatch_ctestSP.sl b/bin/batch/sbatch_ctestSP.sl deleted file mode 100644 index 5d79d9b..0000000 --- a/bin/batch/sbatch_ctestSP.sl +++ /dev/null @@ -1,25 +0,0 @@ -#!/bin/bash - -#SBATCH --nodes=1 -#SBATCH -t 01:00:00 -#SBATCH --mail-type=BEGIN,END,FAIL -##SBATCH --mail-user=@sandia.gov -#SBATCH --export=ALL -#SBATCH --job-name=h5_ctestS - - -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/cmake/scripts/CTestScript.cmake b/config/cmake/scripts/CTestScript.cmake index 3c866ff..bfe9c4e 100644 --- a/config/cmake/scripts/CTestScript.cmake +++ b/config/cmake/scripts/CTestScript.cmake @@ -268,7 +268,7 @@ message (STATUS "Dashboard script configuration:\n${vars}\n") ctest_test (BUILD "${CTEST_BINARY_DIRECTORY}" APPEND ${ctest_test_args} RETURN_VALUE res) else () file(STRINGS ${CTEST_BINARY_DIRECTORY}/Testing/TAG TAG_CONTENTS REGEX "^2([0-9]+)[-]([0-9]+)$") - execute_process (COMMAND ${LOCAL_BATCH_SCRIPT_COMMAND} ${CTEST_SOURCE_DIRECTORY}/bin/batch/${LOCAL_BATCH_SCRIPT_NAME}) + execute_process (COMMAND ${LOCAL_BATCH_SCRIPT_COMMAND} ${CTEST_BINARY_DIRECTORY}/${LOCAL_BATCH_SCRIPT_NAME}) 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) while(result) @@ -283,7 +283,7 @@ message (STATUS "Dashboard script configuration:\n${vars}\n") file (RENAME ${CTEST_BINARY_DIRECTORY}/Testing/${TAG_CONTENTS}/Test.xml ${CTEST_BINARY_DIRECTORY}/Testing/${TAG_CONTENTS}/SerialTest.xml) file (RENAME ${CTEST_BINARY_DIRECTORY}/Testing/Temporary/LastTest_${TAG_CONTENTS}.log ${CTEST_BINARY_DIRECTORY}/Testing/Temporary/LastTest_${TAG_CONTENTS}_Serial.log) unset(result CACHE) - execute_process (COMMAND ${LOCAL_BATCH_SCRIPT_COMMAND} ${CTEST_SOURCE_DIRECTORY}/bin/batch/${LOCAL_BATCH_SCRIPT_PARALLEL_NAME}) + execute_process (COMMAND ${LOCAL_BATCH_SCRIPT_COMMAND} ${CTEST_BINARY_DIRECTORY}/${LOCAL_BATCH_SCRIPT_PARALLEL_NAME}) 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) while(result) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 96cf7ab..ff7402b 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -947,13 +947,13 @@ if (LOCAL_BATCH_TEST) if (LOCAL_BATCH_SCRIPT_NAME) configure_file ( ${HDF5_SOURCE_DIR}/bin/batch/${LOCAL_BATCH_SCRIPT_NAME}.in.cmake - ${HDF5_SOURCE_DIR}/bin/batch/${LOCAL_BATCH_SCRIPT_NAME} ESCAPE_QUOTES @ONLY + ${HDF5_BINARY_DIR}/${LOCAL_BATCH_SCRIPT_NAME} ESCAPE_QUOTES @ONLY ) endif () if (LOCAL_BATCH_SCRIPT_PARALLEL_NAME) configure_file ( ${HDF5_SOURCE_DIR}/bin/batch/${LOCAL_BATCH_SCRIPT_PARALLEL_NAME}.in.cmake - ${HDF5_SOURCE_DIR}/bin/batch/${LOCAL_BATCH_SCRIPT_PARALLEL_NAME} ESCAPE_QUOTES @ONLY + ${HDF5_BINARY_DIR}/${LOCAL_BATCH_SCRIPT_PARALLEL_NAME} ESCAPE_QUOTES @ONLY ) endif () endif () -- cgit v0.12 From 61d3403d12364b5446a47291dc8f9cba6b7c7d00 Mon Sep 17 00:00:00 2001 From: Larry Knox Date: Sun, 6 Jan 2019 21:59:35 -0600 Subject: Remove install-exec-hook from hl/fortran/Makefile.am. Add check for existing links in hl/fortran/src/Makefile.am. --- hl/fortran/Makefile.am | 12 ------------ hl/fortran/src/Makefile.am | 6 ++++-- 2 files changed, 4 insertions(+), 14 deletions(-) diff --git a/hl/fortran/Makefile.am b/hl/fortran/Makefile.am index 14456fe..ad18a21 100644 --- a/hl/fortran/Makefile.am +++ b/hl/fortran/Makefile.am @@ -26,18 +26,6 @@ include $(top_srcdir)/config/commence.am SUBDIRS=src test DIST_SUBDIRS=src test examples -# The name of the lib file doesn't follow the same pattern as the other hl lib -# files, namely libhdf5_hl_*. Add a symlink with the compliant name to the -# actual lib file. -install-exec-hook: - cd $(DESTDIR)$(libdir) && \ - if test -f libhdf5hl_fortran.a; then \ - $(LN_S) libhdf5hl_fortran.a libhdf5_hl_fortran.a; \ - fi; \ - if test -f libhdf5hl_fortran.so; then \ - $(LN_S) libhdf5hl_fortran.so libhdf5_hl_fortran.so; \ - fi; - # Install examples install-examples uninstall-examples: @(cd examples && $(MAKE) $(AM_MAKEFLAGS) $@) || exit 1; diff --git a/hl/fortran/src/Makefile.am b/hl/fortran/src/Makefile.am index 200a2ce..37e074c 100644 --- a/hl/fortran/src/Makefile.am +++ b/hl/fortran/src/Makefile.am @@ -55,10 +55,12 @@ libhdf5hl_fortran_la_LIBADD=$(LIBH5_HL) $(LIBH5F) # actual lib file. install-exec-hook: cd $(DESTDIR)$(libdir) && \ - if test -f libhdf5hl_fortran.a; then \ + if test -f libhdf5hl_fortran.a -a \ + ! -f libhdf5_hl_fortran.a; then \ $(LN_S) libhdf5hl_fortran.a libhdf5_hl_fortran.a; \ fi; \ - if test -f libhdf5hl_fortran.so; then \ + if test -f libhdf5hl_fortran.so -a \ + ! -f libhdf5_hl_fortran.so; then \ $(LN_S) libhdf5hl_fortran.so libhdf5_hl_fortran.so; \ fi; -- cgit v0.12 From e27df5a5fe365480b0809ce523b0e9cd1096a43d Mon Sep 17 00:00:00 2001 From: Larry Knox Date: Mon, 7 Jan 2019 20:57:18 -0600 Subject: Add variables to set up module switch between configure and build for cross compiling on CrayXC40. --- config/cmake/scripts/CTestScript.cmake | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/config/cmake/scripts/CTestScript.cmake b/config/cmake/scripts/CTestScript.cmake index bfe9c4e..eb466d2 100644 --- a/config/cmake/scripts/CTestScript.cmake +++ b/config/cmake/scripts/CTestScript.cmake @@ -254,6 +254,15 @@ message (STATUS "Dashboard script configuration:\n${vars}\n") file (APPEND ${CTEST_SCRIPT_DIRECTORY}/FailedCTest.txt "Failed Configure: ${res}\n") endif () + # On Cray XC40, configuring fails in the Fortran section when using the craype-mic-knl module. + # When the configure phase is done with the craype-haswell module and the build phase is done + # with the craype-mic-knl module, configure succeeds and tests pass on the knl compute nodes + # for Intel, Cray, GCC and Clang compilers. If the variables aren't set or if not + # cross compiling, the module switch will not occur. + if (CMAKE_CROSSCOMPILING AND COMPILENODE_HWCOMPILE_MODULE AND COMPUTENODE_HWCOMPILE_MODULE) + execute_process (COMMAND module switch ${COMPILENODE_HWCOMPILE_MODULE} ${COMPUTENODE_HWCOMPILE_MODULE}) + endif () + ctest_build (BUILD "${CTEST_BINARY_DIRECTORY}" APPEND RETURN_VALUE res NUMBER_ERRORS errval) if (LOCAL_SUBMIT) ctest_submit (PARTS Build) -- cgit v0.12