summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2018-11-22 05:13:04 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2018-11-22 05:13:04 (GMT)
commitf9b625ef5d8a341bbe0e8d77e567a981806216ec (patch)
treeb15b637c7538530cb506144f6a63b10a56f922a1
parent3055e499d527d9847c7f71f6a1596e69101183b3 (diff)
parent9c7161e105aaade595c4f382e76ec3b95990ae91 (diff)
downloadhdf5-f9b625ef5d8a341bbe0e8d77e567a981806216ec.zip
hdf5-f9b625ef5d8a341bbe0e8d77e567a981806216ec.tar.gz
hdf5-f9b625ef5d8a341bbe0e8d77e567a981806216ec.tar.bz2
Merge branch 'develop' of https://bitbucket.hdfgroup.org/scm/hdffv/hdf5 into stackable_vol
-rw-r--r--MANIFEST5
-rw-r--r--bin/batch/knl_ctestP.sl18
-rw-r--r--bin/batch/knl_ctestS.sl17
-rw-r--r--bin/batch/sbatch_ctestP.sl17
-rw-r--r--bin/batch/sbatch_ctestS.sl16
-rw-r--r--bin/batch/sbatch_ctestSP.sl3
-rwxr-xr-xconfig/cmake/scripts/CTestScript.cmake122
-rwxr-xr-xconfig/cmake/scripts/HDF5options.cmake48
-rw-r--r--config/cmake/wait_H5Tinit.cmake11
-rw-r--r--src/CMakeLists.txt45
10 files changed, 209 insertions, 93 deletions
diff --git a/MANIFEST b/MANIFEST
index 00f16fc..144b165 100644
--- a/MANIFEST
+++ b/MANIFEST
@@ -92,8 +92,12 @@
./bin/timekeeper _DO_NOT_DISTRIBUTE_
./bin/trace
./bin/yodconfigure
+./bin/batch/knl_ctestP.sl
+./bin/batch/knl_ctestS.sl
./bin/batch/knl_ctestSP.sl
./bin/batch/knl_H5detect.sl.in.cmake
+./bin/batch/sbatch_ctestS.sl
+./bin/batch/sbatch_ctestP.sl
./bin/batch/sbatch_ctestSP.sl
./bin/pkgscrpts/h5rmflags _DO_NOT_DISTRIBUTE_
./bin/pkgscrpts/makeHDF5BinaryTarfiles.pl _DO_NOT_DISTRIBUTE_
@@ -3193,6 +3197,7 @@
./config/cmake/UseJavaSymlinks.cmake
./config/cmake/userblockTest.cmake
./config/cmake/vfdTest.cmake
+./config/cmake/wait_H5Tinit.cmake
./config/cmake_ext_mod/ConfigureChecks.cmake
./config/cmake_ext_mod/CTestCustom.cmake
diff --git a/bin/batch/knl_ctestP.sl b/bin/batch/knl_ctestP.sl
new file mode 100644
index 0000000..3a03fe2
--- /dev/null
+++ b/bin/batch/knl_ctestP.sl
@@ -0,0 +1,18 @@
+#!/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=<username>@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_ctestS.sl b/bin/batch/knl_ctestS.sl
new file mode 100644
index 0000000..5b77c5b
--- /dev/null
+++ b/bin/batch/knl_ctestS.sl
@@ -0,0 +1,17 @@
+#!/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=<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"
+
diff --git a/bin/batch/sbatch_ctestP.sl b/bin/batch/sbatch_ctestP.sl
new file mode 100644
index 0000000..e967dce
--- /dev/null
+++ b/bin/batch/sbatch_ctestP.sl
@@ -0,0 +1,17 @@
+#!/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 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
new file mode 100644
index 0000000..a103356
--- /dev/null
+++ b/bin/batch/sbatch_ctestS.sl
@@ -0,0 +1,16 @@
+#!/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 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
index 56da347..5d79d9b 100644
--- a/bin/batch/sbatch_ctestSP.sl
+++ b/bin/batch/sbatch_ctestSP.sl
@@ -1,6 +1,5 @@
#!/bin/bash
-#SBATCH -p knl -C quad,flat
#SBATCH --nodes=1
#SBATCH -t 01:00:00
#SBATCH --mail-type=BEGIN,END,FAIL
@@ -8,8 +7,6 @@
#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"
diff --git a/config/cmake/scripts/CTestScript.cmake b/config/cmake/scripts/CTestScript.cmake
index 43cd48d..9534b1e 100755
--- a/config/cmake/scripts/CTestScript.cmake
+++ b/config/cmake/scripts/CTestScript.cmake
@@ -36,10 +36,6 @@ if (NOT SITE_OS_NAME)
message (STATUS "Dashboard script uname output: ${osname}-${osrel}-${cpu}\n")
set (CTEST_BUILD_NAME "${osname}-${osrel}-${cpu}")
- if (SITE_BUILDNAME_SUFFIX)
- set (CTEST_BUILD_NAME "${SITE_BUILDNAME_SUFFIX}-${CTEST_BUILD_NAME}")
- endif ()
- set (BUILD_OPTIONS "${ADD_BUILD_OPTIONS}")
else ()
## machine name provided
## --------------------------
@@ -48,11 +44,11 @@ else ()
else ()
set (CTEST_BUILD_NAME "${SITE_OS_NAME}-${SITE_OS_VERSION}-${SITE_COMPILER_NAME}")
endif ()
- if (SITE_BUILDNAME_SUFFIX)
- set (CTEST_BUILD_NAME "${CTEST_BUILD_NAME}-${SITE_BUILDNAME_SUFFIX}")
- endif ()
- set (BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DSITE:STRING=${CTEST_SITE} -DBUILDNAME:STRING=${CTEST_BUILD_NAME}")
endif ()
+if (SITE_BUILDNAME_SUFFIX)
+ set (CTEST_BUILD_NAME "${SITE_BUILDNAME_SUFFIX}-${CTEST_BUILD_NAME}")
+endif ()
+set (BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DSITE:STRING=${CTEST_SITE} -DBUILDNAME:STRING=${CTEST_BUILD_NAME}")
#-----------------------------------------------------------------------------
# MAC machines need special option
@@ -158,7 +154,12 @@ endif ()
# Use multiple CPU cores to build
include (ProcessorCount)
ProcessorCount (N)
-if (NOT N EQUAL 0)
+if (NOT N EQUAL 0)
+ if (MAX_PROC_COUNT)
+ if (N GREATER MAX_PROC_COUNT)
+ set (N ${MAX_PROC_COUNT})
+ endif ()
+ endif ()
if (NOT WIN32)
set (CTEST_BUILD_FLAGS -j${N})
endif ()
@@ -189,10 +190,10 @@ endforeach ()
#-----------------------------------------------------------------------------
# Initialize the CTEST commands
#------------------------------
-if(CMAKE_GENERATOR_TOOLSET)
- set(CTEST_CONFIGURE_TOOLSET "-T${CMAKE_GENERATOR_TOOLSET}")
+if (CMAKE_GENERATOR_TOOLSET)
+ set (CTEST_CONFIGURE_TOOLSET "-T${CMAKE_GENERATOR_TOOLSET}")
else ()
- set(CTEST_CONFIGURE_TOOLSET "")
+ set (CTEST_CONFIGURE_TOOLSET "")
endif()
if (LOCAL_MEMCHECK_TEST)
find_program (CTEST_MEMORYCHECK_COMMAND NAMES valgrind)
@@ -266,41 +267,64 @@ message (STATUS "Dashboard script configuration:\n${vars}\n")
if (NOT LOCAL_BATCH_TEST)
ctest_test (BUILD "${CTEST_BINARY_DIRECTORY}" APPEND ${ctest_test_args} RETURN_VALUE res)
else ()
- execute_process (COMMAND ${LOCAL_BATCH_SCRIPT_COMMAND} ${LOCAL_BATCH_SCRIPT_NAME})
+ 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})
+ 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)
+ ctest_sleep(60)
+ execute_process(COMMAND ls ${CTEST_BINARY_DIRECTORY}/Testing/${TAG_CONTENTS}/Test.xml RESULT_VARIABLE result OUTPUT_QUIET ERROR_QUIET)
+ endwhile(result)
+ if (LOCAL_BATCH_SCRIPT_PARALLEL_NAME)
+ if (LOCAL_SUBMIT)
+ ctest_submit (PARTS Test)
+ 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)
+ 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")
+ execute_process(COMMAND ls ${CTEST_BINARY_DIRECTORY}/Testing/${TAG_CONTENTS}/Test.xml RESULT_VARIABLE result OUTPUT_QUIET ERROR_QUIET)
+ while(result)
+ ctest_sleep(60)
+ execute_process(COMMAND ls ${CTEST_BINARY_DIRECTORY}/Testing/${TAG_CONTENTS}/Test.xml RESULT_VARIABLE result OUTPUT_QUIET ERROR_QUIET)
+ endwhile(result)
+ message(STATUS "Found ${CTEST_BINARY_DIRECTORY}/Testing/${TAG_CONTENTS}/Test.xml for parallel tests.")
+ endif()
endif ()
- if (LOCAL_SUBMIT)
- ctest_submit (PARTS Test)
- endif ()
- if (${res} LESS 0 OR ${res} GREATER 0)
- file (APPEND ${CTEST_SCRIPT_DIRECTORY}/FailedCTest.txt "Failed Tests: ${res}\n")
- endif ()
- else ()
- ctest_memcheck (BUILD "${CTEST_BINARY_DIRECTORY}" APPEND ${ctest_test_args})
- if (LOCAL_SUBMIT)
- ctest_submit (PARTS MemCheck)
- endif ()
- endif ()
- if (LOCAL_COVERAGE_TEST)
- ctest_coverage (BUILD "${CTEST_BINARY_DIRECTORY}" APPEND)
- if (LOCAL_SUBMIT)
- ctest_submit (PARTS Coverage)
- endif ()
- endif ()
- endif ()
-
- if (NOT LOCAL_MEMCHECK_TEST AND NOT LOCAL_NO_PACKAGE AND NOT LOCAL_SKIP_BUILD)
- ##-----------------------------------------------
- ## Package the product
- ##-----------------------------------------------
- execute_process (COMMAND cpack -C ${CTEST_CONFIGURATION_TYPE} -V
- WORKING_DIRECTORY ${CTEST_BINARY_DIRECTORY}
- RESULT_VARIABLE cpackResult
- OUTPUT_VARIABLE cpackLog
- ERROR_VARIABLE cpackLog.err
- )
- file (WRITE ${CTEST_BINARY_DIRECTORY}/cpack.log "${cpackLog.err}" "${cpackLog}")
- if (cpackResult GREATER 0)
- file (APPEND ${CTEST_SCRIPT_DIRECTORY}/FailedCTest.txt "Failed packaging: ${cpackResult}:${cpackLog.err} \n")
- endif ()
- endif ()
-#-----------------------------------------------------------------------------
+ if (LOCAL_SUBMIT)
+ ctest_submit (PARTS Test)
+ endif ()
+ if (${res} LESS 0 OR ${res} GREATER 0)
+ file (APPEND ${CTEST_SCRIPT_DIRECTORY}/FailedCTest.txt "Failed Tests: ${res}\n")
+ endif ()
+ else ()
+ ctest_memcheck (BUILD "${CTEST_BINARY_DIRECTORY}" APPEND ${ctest_test_args})
+ if (LOCAL_SUBMIT)
+ ctest_submit (PARTS MemCheck)
+ endif ()
+ endif ()
+ if (LOCAL_COVERAGE_TEST)
+ ctest_coverage (BUILD "${CTEST_BINARY_DIRECTORY}" APPEND)
+ if (LOCAL_SUBMIT)
+ ctest_submit (PARTS Coverage)
+ endif ()
+ endif ()
+ endif ()
+
+ if (NOT LOCAL_MEMCHECK_TEST AND NOT LOCAL_NO_PACKAGE AND NOT LOCAL_SKIP_BUILD)
+ ##-----------------------------------------------
+ ## Package the product
+ ##-----------------------------------------------
+ execute_process (COMMAND cpack -C ${CTEST_CONFIGURATION_TYPE} -V
+ WORKING_DIRECTORY ${CTEST_BINARY_DIRECTORY}
+ RESULT_VARIABLE cpackResult
+ OUTPUT_VARIABLE cpackLog
+ ERROR_VARIABLE cpackLog.err
+ )
+ file (WRITE ${CTEST_BINARY_DIRECTORY}/cpack.log "${cpackLog.err}" "${cpackLog}")
+ if (cpackResult GREATER 0)
+ file (APPEND ${CTEST_SCRIPT_DIRECTORY}/FailedCTest.txt "Failed packaging: ${cpackResult}:${cpackLog.err} \n")
+ endif ()
+ endif ()
+#-----------------------------------------------------------------------------
diff --git a/config/cmake/scripts/HDF5options.cmake b/config/cmake/scripts/HDF5options.cmake
index 629d277..6d1a57a 100755
--- a/config/cmake/scripts/HDF5options.cmake
+++ b/config/cmake/scripts/HDF5options.cmake
@@ -17,8 +17,12 @@
### uncomment/comment and change the following lines for other configuration options
#############################################################################################
+#### maximum parallel processor count for build and test ####
+#set (MAX_PROC_COUNT 8)
+
+#############################################################################################
#### alternate toolsets ####
-#set(CMAKE_GENERATOR_TOOLSET "Intel C++ Compiler 17.0")
+#set (CMAKE_GENERATOR_TOOLSET "Intel C++ Compiler 17.0")
#############################################################################################
#### Only build static libraries ####
@@ -50,54 +54,54 @@ set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DCMAKE_INSTALL_PREFIX:PATH=${INSTA
#### ext libraries ####
### ext libs from tgz
-set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_ALLOW_EXTERNAL_SUPPORT:STRING=TGZ -DTGZPATH:PATH=${CTEST_SCRIPT_DIRECTORY}")
+set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_ALLOW_EXTERNAL_SUPPORT:STRING=TGZ -DTGZPATH:PATH=${CTEST_SCRIPT_DIRECTORY}")
### ext libs from git
-#set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_ALLOW_EXTERNAL_SUPPORT:STRING=GIT")
+#set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_ALLOW_EXTERNAL_SUPPORT:STRING=GIT")
### ext libs on system
-#set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DZLIB_LIBRARY:FILEPATH=some_location/lib/zlib.lib -DZLIB_INCLUDE_DIR:PATH=some_location/include")
-#set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DSZIP_LIBRARY:FILEPATH=some_location/lib/szlib.lib -DSZIP_INCLUDE_DIR:PATH=some_location/include")
+#set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DZLIB_LIBRARY:FILEPATH=some_location/lib/zlib.lib -DZLIB_INCLUDE_DIR:PATH=some_location/include")
+#set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DSZIP_LIBRARY:FILEPATH=some_location/lib/szlib.lib -DSZIP_INCLUDE_DIR:PATH=some_location/include")
### disable ext zlib building
-#set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_ENABLE_Z_LIB_SUPPORT:BOOL=OFF")
+#set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_ENABLE_Z_LIB_SUPPORT:BOOL=OFF")
### disable ext szip building
-#set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_ENABLE_SZIP_SUPPORT:BOOL=OFF")
-#set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_ENABLE_SZIP_ENCODING:BOOL=OFF")
+#set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_ENABLE_SZIP_SUPPORT:BOOL=OFF")
+#set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_ENABLE_SZIP_ENCODING:BOOL=OFF")
#### package examples ####
-#set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_PACK_EXAMPLES:BOOL=ON -DHDF5_EXAMPLES_COMPRESSED:STRING=HDF5Examples-1.10.9-Source.tar.gz -DHDF5_EXAMPLES_COMPRESSED_DIR:PATH=${CTEST_SCRIPT_DIRECTORY}")
+#set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_PACK_EXAMPLES:BOOL=ON -DHDF5_EXAMPLES_COMPRESSED:STRING=HDF5Examples-1.10.9-Source.tar.gz -DHDF5_EXAMPLES_COMPRESSED_DIR:PATH=${CTEST_SCRIPT_DIRECTORY}")
#############################################################################################
### enable parallel builds
-#set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_ENABLE_PARALLEL:BOOL=ON")
-#set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_BUILD_CPP_LIB:BOOL=OFF")
-#set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_BUILD_JAVA:BOOL=OFF")
-#set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_ENABLE_THREADSAFE:BOOL=OFF")
+#set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_ENABLE_PARALLEL:BOOL=ON")
+#set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_BUILD_CPP_LIB:BOOL=OFF")
+#set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_BUILD_JAVA:BOOL=OFF")
+#set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_ENABLE_THREADSAFE:BOOL=OFF")
#############################################################################################
### enable thread-safety builds
-#set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_ENABLE_THREADSAFE:BOOL=ON")
-#set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_ENABLE_PARALLEL:BOOL=OFF")
-#set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_BUILD_CPP_LIB:BOOL=OFF")
-#set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_BUILD_FORTRAN:BOOL=OFF")
-#set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_BUILD_HL_LIB:BOOL=OFF")
+#set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_ENABLE_THREADSAFE:BOOL=ON")
+#set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_ENABLE_PARALLEL:BOOL=OFF")
+#set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_BUILD_CPP_LIB:BOOL=OFF")
+#set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_BUILD_FORTRAN:BOOL=OFF")
+#set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_BUILD_HL_LIB:BOOL=OFF")
#############################################################################################
### disable test program builds
-#set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DBUILD_TESTING:BOOL=OFF")
+#set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DBUILD_TESTING:BOOL=OFF")
#############################################################################################
### disable packaging
-#set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_NO_PACKAGES:BOOL=ON")
+#set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_NO_PACKAGES:BOOL=ON")
### Create install package with external libraries (szip, zlib)
-set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_PACKAGE_EXTLIBS:BOOL=ON")
+set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_PACKAGE_EXTLIBS:BOOL=ON")
#############################################################################################
### use a toolchain file
-#set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DCMAKE_TOOLCHAIN_FILE:STRING=config/toolchain/intel.cmake")
+#set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DCMAKE_TOOLCHAIN_FILE:STRING=config/toolchain/intel.cmake")
#############################################################################################
diff --git a/config/cmake/wait_H5Tinit.cmake b/config/cmake/wait_H5Tinit.cmake
new file mode 100644
index 0000000..c0b4d06
--- /dev/null
+++ b/config/cmake/wait_H5Tinit.cmake
@@ -0,0 +1,11 @@
+cmake_minimum_required (VERSION 3.10)
+
+message(STATUS "Check for existence of ${HDF5_GENERATED_SOURCE_DIR}/H5Tinit.c")
+execute_process(COMMAND ls ${HDF5_GENERATED_SOURCE_DIR}/H5Tinit.c RESULT_VARIABLE H5TI_result OUTPUT_QUIET ERROR_QUIET)
+while(H5TI_result)
+ ctest_sleep(30)
+ message(STATUS "Checking again for existence of ${HDF5_GENERATED_SOURCE_DIR}/H5Tinit.c")
+ execute_process(COMMAND ls ${HDF5_GENERATED_SOURCE_DIR}/H5Tinit.c RESULT_VARIABLE H5TI_result OUTPUT_QUIET ERROR_QUIET)
+endwhile(H5TI_result)
+file (TOUCH "${HDF5_BINARY_DIR}/H5Tinit_created")
+message(STATUS "Found ${HDF5_GENERATED_SOURCE_DIR}/H5Tinit.c")
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 341fa7a..f1193b8 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -948,39 +948,46 @@ if (NOT EXISTS ${HDF5_GENERATED_SOURCE_DIR}/H5Tinit.c)
${HDF5_BINARY_DIR}/${HDF5_BATCH_H5DETECT_SCRIPT} ESCAPE_QUOTES @ONLY
)
add_custom_command (
- OUTPUT ${HDF5_GENERATED_SOURCE_DIR}/H5Tinit.tmp
+ OUTPUT ${HDF5_GENERATED_SOURCE_DIR}/H5Tinit.c
COMMAND ${HDF5_BATCH_CMD}
ARGS ${HDF5_BINARY_DIR}/${HDF5_BATCH_H5DETECT_SCRIPT}
+ COMMAND ${CMAKE_COMMAND}
+ ARGS -E echo "Executed batch command to create H5Tinit.c"
DEPENDS H5detect
WORKING_DIRECTORY ${HDF5_GENERATED_SOURCE_DIR}
)
+ add_custom_target (gen_H5Tinit
+ COMMAND ${CMAKE_COMMAND} -P ${HDF5_SOURCE_DIR}/config/cmake/wait_H5Tinit.cmake
+ )
+ if (BUILD_SHARED_LIBS)
+ add_custom_command (
+ OUTPUT ${HDF5_GENERATED_SOURCE_DIR}/shared/H5Tinit.c
+ COMMAND ${CMAKE_COMMAND}
+ ARGS -E copy_if_different "${HDF5_GENERATED_SOURCE_DIR}/H5Tinit.c" "${HDF5_GENERATED_SOURCE_DIR}/shared/H5Tinit.c"
+ DEPENDS gen_H5Tinit ${HDF5_GENERATED_SOURCE_DIR}/H5Tinit_created
+ )
+ set_source_files_properties (${HDF5_GENERATED_SOURCE_DIR}/shared/H5Tinit.c PROPERTIES GENERATED TRUE)
+ endif ()
else ()
add_custom_command (
- OUTPUT ${HDF5_GENERATED_SOURCE_DIR}/H5Tinit.tmp
+ OUTPUT ${HDF5_GENERATED_SOURCE_DIR}/H5Tinit.c
COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR}$<TARGET_FILE:H5detect>
- ARGS ${HDF5_GENERATED_SOURCE_DIR}/H5Tinit.tmp
+ ARGS ${HDF5_GENERATED_SOURCE_DIR}/H5Tinit.c
DEPENDS H5detect
WORKING_DIRECTORY ${HDF5_GENERATED_SOURCE_DIR}
)
+ if (BUILD_SHARED_LIBS)
+ add_custom_command (
+ OUTPUT ${HDF5_GENERATED_SOURCE_DIR}/shared/H5Tinit.c
+ COMMAND ${CMAKE_COMMAND}
+ ARGS -E copy_if_different "${HDF5_GENERATED_SOURCE_DIR}/H5Tinit.c" "${HDF5_GENERATED_SOURCE_DIR}/shared/H5Tinit.c"
+ DEPENDS ${HDF5_GENERATED_SOURCE_DIR}/H5Tinit.c
+ )
+ set_source_files_properties (${HDF5_GENERATED_SOURCE_DIR}/shared/H5Tinit.c PROPERTIES GENERATED TRUE)
+ endif ()
endif ()
- add_custom_target (gen_H5Tinit ALL DEPENDS ${HDF5_GENERATED_SOURCE_DIR}/H5Tinit.tmp)
- add_custom_command (
- OUTPUT ${HDF5_GENERATED_SOURCE_DIR}/H5Tinit.c
- COMMAND ${CMAKE_COMMAND}
- ARGS -E copy_if_different "${HDF5_GENERATED_SOURCE_DIR}/H5Tinit.tmp" "${HDF5_GENERATED_SOURCE_DIR}/H5Tinit.c"
- DEPENDS gen_H5Tinit ${HDF5_GENERATED_SOURCE_DIR}/H5Tinit.tmp
- )
set_source_files_properties (${HDF5_GENERATED_SOURCE_DIR}/H5Tinit.c PROPERTIES GENERATED TRUE)
endif ()
-if (BUILD_SHARED_LIBS)
- add_custom_command (
- OUTPUT ${HDF5_GENERATED_SOURCE_DIR}/shared/H5Tinit.c
- COMMAND ${CMAKE_COMMAND}
- ARGS -E copy_if_different "${HDF5_GENERATED_SOURCE_DIR}/H5Tinit.c" "${HDF5_GENERATED_SOURCE_DIR}/shared/H5Tinit.c"
- DEPENDS ${HDF5_GENERATED_SOURCE_DIR}/H5Tinit.c
- )
- set_source_files_properties (${HDF5_GENERATED_SOURCE_DIR}/shared/H5Tinit.c PROPERTIES GENERATED TRUE)
-endif ()
add_executable (H5make_libsettings ${HDF5_SRC_DIR}/H5make_libsettings.c)
target_include_directories(H5make_libsettings PRIVATE "${HDF5_SRC_DIR};${HDF5_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>")