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

* commit 'e27df5a5fe365480b0809ce523b0e9cd1096a43d':
  Add variables to set up module switch between configure and build for cross compiling on CrayXC40.
  Remove install-exec-hook from hl/fortran/Makefile.am. Add check for existing links in hl/fortran/src/Makefile.am.
  Configure build directory in batch scripts.
  Add libhdf5_hl_fortran symlinks for libhdf5hl_fortran files. Set ctest*.lsf.in.cmake scripts for sierra. Correct src/CMakelists.txt syntax error.
  Correct syntax error in CMakeLists.txt.
  Add .lsf batch scripts and insert the build directory into the scripts during configuration.
This commit is contained in:
Larry Knox 2019-01-07 21:01:06 -06:00
commit 74a41f92a4
11 changed files with 74 additions and 65 deletions

View File

@ -0,0 +1,19 @@
#!/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 . -R 'TEST_PAR|PH5DIFF|PERFORM' -E t_cache_image -C Release -T test >& ctestP.out
echo "Done running ctest parallel command."

View File

@ -7,8 +7,7 @@
#SBATCH --export=ALL
#SBATCH --job-name=h5_ctestS
cd build
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"

View File

@ -0,0 +1,18 @@
#!/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 . -E 'TEST_PAR|H5DIFF|PERFORM' -C Release -j 32 -T test >& ctestS.out
##$CMD >& ctestS.out
echo "Done running command."

View File

@ -7,8 +7,7 @@
#SBATCH --export=ALL
#SBATCH --job-name=h5_ctestS
cd build
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"

View File

@ -1,6 +1,6 @@
#!/bin/bash
#SBATCH -p knl -C quad,flat
#SBATCH -C knl,quad,cache
#SBATCH --nodes=1
#SBATCH -t 00:30:00
#SBATCH --mail-type=BEGIN,END,FAIL
@ -8,7 +8,7 @@
#SBATCH --export=ALL
#SBATCH --job-name=h5_ctestS
cd build
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"

View File

@ -1,6 +1,6 @@
#!/bin/bash
#SBATCH -p knl -C quad,flat
#SBATCH -C knl,quad,cache
#SBATCH --nodes=1
#SBATCH -t 00:30:00
#SBATCH --mail-type=BEGIN,END,FAIL
@ -8,7 +8,7 @@
#SBATCH --export=ALL
#SBATCH --job-name=h5_ctestS
cd build
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"

View File

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

@ -1,25 +0,0 @@
#!/bin/bash
#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
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

@ -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)
@ -268,7 +277,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)
@ -281,8 +290,9 @@ 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})
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)

View File

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

View File

@ -943,6 +943,21 @@ if (BUILD_SHARED_LIBS)
file (MAKE_DIRECTORY "${HDF5_BINARY_DIR}/shared")
endif ()
if (LOCAL_BATCH_TEST)
if (LOCAL_BATCH_SCRIPT_NAME)
configure_file (
${HDF5_SOURCE_DIR}/bin/batch/${LOCAL_BATCH_SCRIPT_NAME}.in.cmake
${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_BINARY_DIR}/${LOCAL_BATCH_SCRIPT_PARALLEL_NAME} ESCAPE_QUOTES @ONLY
)
endif ()
endif ()
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};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>")