summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--CMakeInstallation.cmake32
-rw-r--r--CMakeLists.txt30
-rw-r--r--MANIFEST3
-rwxr-xr-xbin/release6
-rwxr-xr-xbin/trace4
-rw-r--r--c++/CMakeLists.txt2
-rw-r--r--c++/examples/CMakeLists.txt2
-rw-r--r--c++/src/CMakeLists.txt2
-rw-r--r--c++/test/CMakeLists.txt2
-rw-r--r--config/cmake/CTestCustom.cmake4
-rw-r--r--config/cmake/CTestScript.cmake2
-rw-r--r--config/cmake/ConfigureChecks.cmake4
-rw-r--r--config/cmake/HDF5UseFortran.cmake214
-rw-r--r--config/cmake/HDF5_Examples.cmake.in4
-rw-r--r--config/cmake/HDFCompilerFlags.cmake4
-rw-r--r--config/cmake/README.txt.cmake.in5
-rw-r--r--config/cmake/UseJava.cmake32
-rw-r--r--config/cmake/UseJavaClassFilelist.cmake2
-rw-r--r--config/cmake/fileCompareTest.cmake104
-rw-r--r--config/cmake/jrunTest.cmake24
-rw-r--r--config/cmake/scripts/CTestScript.cmake10
-rw-r--r--config/cmake/scripts/HDF5config.cmake15
-rw-r--r--config/cmake/scripts/HDF5options.cmake2
-rw-r--r--config/cmake/userblockTest.cmake12
-rw-r--r--config/cmake/wait_H5Tinit.cmake2
-rw-r--r--config/cmake_ext_mod/CTestCustom.cmake2
-rw-r--r--config/cmake_ext_mod/FindSZIP.cmake2
-rw-r--r--config/cmake_ext_mod/HDFMacros.cmake36
-rw-r--r--config/cmake_ext_mod/HDFUseFortran.cmake179
-rw-r--r--config/cmake_ext_mod/grepTest.cmake6
-rw-r--r--config/cmake_ext_mod/runTest.cmake14
-rw-r--r--config/gnu-cxxflags2
-rw-r--r--config/gnu-flags2
-rw-r--r--config/sanitizer/sanitizers.cmake27
-rw-r--r--doc/code-conventions.md57
-rw-r--r--examples/CMakeLists.txt2
-rw-r--r--fortran/CMakeLists.txt2
-rw-r--r--fortran/examples/CMakeLists.txt2
-rw-r--r--fortran/src/CMakeLists.txt42
-rw-r--r--fortran/src/H5Fff.F902
-rw-r--r--fortran/src/H5Pf.c40
-rw-r--r--fortran/src/H5Pff.F9095
-rw-r--r--fortran/src/H5_f.c8
-rw-r--r--fortran/src/H5_ff.F9010
-rw-r--r--fortran/src/H5f90global.F9012
-rw-r--r--fortran/src/H5f90proto.h1
-rw-r--r--fortran/src/hdf5_fortrandll.def.in1
-rw-r--r--fortran/test/CMakeLists.txt2
-rw-r--r--fortran/test/tH5P_F03.F9042
-rw-r--r--fortran/testpar/CMakeLists.txt2
-rw-r--r--hl/CMakeLists.txt2
-rw-r--r--hl/c++/CMakeLists.txt2
-rw-r--r--hl/c++/examples/CMakeLists.txt2
-rw-r--r--hl/c++/src/CMakeLists.txt2
-rw-r--r--hl/c++/test/CMakeLists.txt2
-rw-r--r--hl/examples/CMakeLists.txt2
-rw-r--r--hl/fortran/CMakeLists.txt2
-rw-r--r--hl/fortran/examples/CMakeLists.txt2
-rw-r--r--hl/fortran/src/CMakeLists.txt2
-rw-r--r--hl/fortran/test/CMakeLists.txt2
-rw-r--r--hl/src/CMakeLists.txt2
-rw-r--r--hl/test/CMakeLists.txt2
-rw-r--r--hl/test/test_file_image.c2
-rw-r--r--hl/tools/CMakeLists.txt2
-rw-r--r--hl/tools/gif2h5/CMakeLists.txt2
-rw-r--r--hl/tools/h5watch/CMakeLists.txt2
-rw-r--r--java/CMakeLists.txt2
-rw-r--r--java/examples/CMakeLists.txt2
-rw-r--r--java/examples/datasets/CMakeLists.txt2
-rw-r--r--java/examples/datatypes/CMakeLists.txt2
-rw-r--r--java/examples/groups/CMakeLists.txt2
-rw-r--r--java/examples/intro/CMakeLists.txt2
-rw-r--r--java/src/CMakeLists.txt2
-rw-r--r--java/src/hdf/CMakeLists.txt2
-rw-r--r--java/src/hdf/hdf5lib/CMakeLists.txt2
-rw-r--r--java/src/hdf/hdf5lib/H5.java4
-rw-r--r--java/src/hdf/overview.html2
-rw-r--r--java/src/jni/CMakeLists.txt2
-rw-r--r--java/src/jni/h5pFAPLImp.c56
-rw-r--r--java/src/jni/h5sImp.c3
-rw-r--r--java/src/jni/h5sImp.h3
-rw-r--r--java/test/CMakeLists.txt2
-rw-r--r--m4/aclocal_fc.f9025
-rw-r--r--release_docs/INSTALL10
-rw-r--r--release_docs/INSTALL_CMake.txt62
-rw-r--r--release_docs/INSTALL_Cygwin.txt178
-rw-r--r--release_docs/README_HPC156
-rw-r--r--release_docs/RELEASE.txt61
-rw-r--r--release_docs/USING_CMake_Examples.txt4
-rw-r--r--release_docs/USING_HDF5_CMake.txt8
-rw-r--r--release_docs/USING_HDF5_VS.txt4
-rw-r--r--src/CMakeLists.txt2
-rw-r--r--src/H5Aint.c6
-rw-r--r--src/H5B2leaf.c2
-rw-r--r--src/H5D.c2
-rw-r--r--src/H5Dchunk.c51
-rw-r--r--src/H5Dint.c4
-rw-r--r--src/H5FDs3comms.c4
-rw-r--r--src/H5Fmount.c2
-rw-r--r--src/H5Fprivate.h2
-rw-r--r--src/H5Gint.c2
-rw-r--r--src/H5Gobj.c2
-rw-r--r--src/H5Gtraverse.c2
-rw-r--r--src/H5I.c3
-rw-r--r--src/H5L.c4
-rw-r--r--src/H5Ochunk.c2
-rw-r--r--src/H5Odbg.c4
-rw-r--r--src/H5Oint.c101
-rw-r--r--src/H5Oprivate.h2
-rw-r--r--src/H5Pfapl.c3
-rw-r--r--src/H5T.c444
-rw-r--r--src/H5TS.c9
-rw-r--r--src/H5Tcommit.c6
-rw-r--r--src/H5Tcompound.c87
-rw-r--r--src/H5Tnative.c2
-rw-r--r--src/H5Tprivate.h6
-rw-r--r--src/H5VLconnector.h1
-rw-r--r--src/H5VLnative.h1
-rw-r--r--src/H5VLnative_attr.c3
-rw-r--r--src/H5VLnative_dataset.c48
-rw-r--r--src/H5VLnative_group.c5
-rw-r--r--src/H5Z.c3
-rw-r--r--src/H5Znbit.c4
-rw-r--r--src/H5private.h58
-rw-r--r--src/H5public.h40
-rw-r--r--src/H5trace.c6
-rw-r--r--test/CMakeLists.txt2
-rw-r--r--test/cache.c12
-rw-r--r--test/dtransform.c12
-rw-r--r--test/earray.c18
-rw-r--r--test/farray.c18
-rw-r--r--test/fheap.c194
-rw-r--r--test/flush2.c14
-rw-r--r--test/freespace.c44
-rw-r--r--test/gen_new_super.c4
-rw-r--r--test/gen_nullspace.c4
-rw-r--r--test/gen_plist.c2
-rw-r--r--test/gen_specmetaread.c5
-rw-r--r--test/getname.c28
-rw-r--r--test/h5test.h2
-rw-r--r--test/hyperslab.c14
-rw-r--r--test/mf.c116
-rw-r--r--test/ohdr.c8
-rw-r--r--test/page_buffer.c12
-rw-r--r--test/set_extent.c3
-rw-r--r--test/thread_id.c191
-rw-r--r--test/ttsafe_cancel.c2
-rw-r--r--testpar/CMakeLists.txt2
-rw-r--r--testpar/t_init_term.c2
-rw-r--r--testpar/t_mpi.c4
-rw-r--r--testpar/t_pflush2.c4
-rw-r--r--testpar/t_prestart.c2
-rw-r--r--testpar/t_pshutdown.c2
-rw-r--r--tools/CMakeLists.txt2
-rw-r--r--tools/lib/CMakeLists.txt2
-rw-r--r--tools/lib/h5tools_dump.c28
-rw-r--r--tools/libtest/CMakeLists.txt2
-rw-r--r--tools/src/CMakeLists.txt2
-rw-r--r--tools/src/h5copy/CMakeLists.txt2
-rw-r--r--tools/src/h5diff/CMakeLists.txt2
-rw-r--r--tools/src/h5dump/CMakeLists.txt2
-rw-r--r--tools/src/h5format_convert/CMakeLists.txt2
-rw-r--r--tools/src/h5import/CMakeLists.txt2
-rw-r--r--tools/src/h5jam/CMakeLists.txt2
-rw-r--r--tools/src/h5ls/CMakeLists.txt2
-rw-r--r--tools/src/h5repack/CMakeLists.txt2
-rw-r--r--tools/src/h5repack/h5repack_refs.c9
-rw-r--r--tools/src/h5stat/CMakeLists.txt2
-rw-r--r--tools/src/misc/CMakeLists.txt2
-rw-r--r--tools/test/CMakeLists.txt2
-rw-r--r--tools/test/h5copy/CMakeLists.txt2
-rw-r--r--tools/test/h5diff/CMakeLists.txt2
-rw-r--r--tools/test/h5dump/CMakeLists.txt2
-rw-r--r--tools/test/h5dump/CMakeTests.cmake54
-rw-r--r--tools/test/h5dump/h5dumpgentest.c5
-rw-r--r--tools/test/h5format_convert/CMakeLists.txt2
-rw-r--r--tools/test/h5import/CMakeLists.txt2
-rw-r--r--tools/test/h5jam/CMakeLists.txt2
-rw-r--r--tools/test/h5ls/CMakeLists.txt2
-rw-r--r--tools/test/h5repack/CMakeLists.txt2
-rw-r--r--tools/test/h5repack/CMakeTests.cmake60
-rw-r--r--tools/test/h5stat/CMakeLists.txt2
-rw-r--r--tools/test/misc/CMakeLists.txt2
-rw-r--r--tools/test/misc/h5clear_gentest.c2
-rw-r--r--tools/test/misc/vds/CMakeLists.txt2
-rw-r--r--tools/test/perform/CMakeLists.txt6
186 files changed, 2299 insertions, 1304 deletions
diff --git a/CMakeInstallation.cmake b/CMakeInstallation.cmake
index dc229d2..12d8273 100644
--- a/CMakeInstallation.cmake
+++ b/CMakeInstallation.cmake
@@ -41,13 +41,11 @@ if (NOT HDF5_EXTERNALLY_CONFIGURED)
#-----------------------------------------------------------------------------
# Export all exported targets to the build tree for use by parent project
#-----------------------------------------------------------------------------
- if (NOT HDF5_EXTERNALLY_CONFIGURED)
- export (
- TARGETS ${HDF5_LIBRARIES_TO_EXPORT} ${HDF5_LIB_DEPENDENCIES} ${HDF5_UTILS_TO_EXPORT}
- FILE ${HDF5_PACKAGE}${HDF_PACKAGE_EXT}-targets.cmake
- NAMESPACE ${HDF_PACKAGE_NAMESPACE}
- )
- endif ()
+ export (
+ TARGETS ${HDF5_LIBRARIES_TO_EXPORT} ${HDF5_LIB_DEPENDENCIES} ${HDF5_UTILS_TO_EXPORT}
+ FILE ${HDF5_PACKAGE}${HDF_PACKAGE_EXT}-targets.cmake
+ NAMESPACE ${HDF_PACKAGE_NAMESPACE}
+ )
endif ()
#-----------------------------------------------------------------------------
@@ -104,16 +102,15 @@ endif ()
# Configure the hdf5-config-version .cmake file for the install directory
#-----------------------------------------------------------------------------
if (NOT HDF5_EXTERNALLY_CONFIGURED)
- # 3.11 or greater
- #write_basic_package_version_file (
- # ${HDF5_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/${HDF5_PACKAGE}${HDF_PACKAGE_EXT}-config-version.cmake
- # VERSION ${HDF5_PACKAGE_VERSION}
- # COMPATIBILITY SameMinorVersion
- #)
- configure_file (
- ${HDF_RESOURCES_DIR}/hdf5-config-version.cmake.in
- ${HDF5_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/${HDF5_PACKAGE}${HDF_PACKAGE_EXT}-config-version.cmake @ONLY
+ write_basic_package_version_file (
+ "${HDF5_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/${HDF5_PACKAGE}${HDF_PACKAGE_EXT}-config-version.cmake"
+ VERSION ${HDF5_PACKAGE_VERSION}
+ COMPATIBILITY SameMinorVersion
)
+ #configure_file (
+ # ${HDF_RESOURCES_DIR}/hdf5-config-version.cmake.in
+ # ${HDF5_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/${HDF5_PACKAGE}${HDF_PACKAGE_EXT}-config-version.cmake @ONLY
+ #)
install (
FILES ${HDF5_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/${HDF5_PACKAGE}${HDF_PACKAGE_EXT}-config-version.cmake
DESTINATION ${HDF5_INSTALL_CMAKE_DIR}/hdf5
@@ -201,8 +198,7 @@ endif ()
#-----------------------------------------------------------------------------
if (NOT HDF5_EXTERNALLY_CONFIGURED)
install (
- FILES
- ${HDF5_SOURCE_DIR}/COPYING
+ FILES ${HDF5_SOURCE_DIR}/COPYING
DESTINATION ${HDF5_INSTALL_DATA_DIR}
COMPONENT hdfdocuments
)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index dbbf55f..2bad805 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,10 +1,14 @@
-cmake_minimum_required (VERSION 3.10)
+cmake_minimum_required (VERSION 3.12)
project (HDF5 C)
if (POLICY CMP0074)
cmake_policy (SET CMP0074 NEW)
endif ()
+if (POLICY CMP0083)
+ cmake_policy (SET CMP0083 NEW)
+endif ()
+
#-----------------------------------------------------------------------------
# Instructions for use : Normal Build
#
@@ -34,9 +38,14 @@ endif ()
# CMake version 3.14 added option --ignore-eol to compare files
# cmake -E compare_files --ignore-eol file1 file2
-#if(CMAKE_VERSION VERSION_LESS "3.14.0" AND WIN32)
-# MESSAGE(FATAL_ERROR "Windows builds requires a minimum of CMake 3.14")
-#endif()
+set (CMAKE_IGNORE_EOL "--ignore-eol")
+if (CMAKE_VERSION VERSION_LESS "3.14.0")
+ set (CMAKE_IGNORE_EOL "")
+ if (WIN32)
+ message (FATAL_ERROR "Windows builds requires a minimum of CMake 3.14")
+ endif()
+else ()
+endif ()
#-----------------------------------------------------------------------------
# Instructions for use : Sub-Project Build
@@ -394,9 +403,6 @@ HDF_DIR_PATHS(${HDF5_PACKAGE_NAME})
include (${HDF_RESOURCES_EXT_DIR}/HDFLibMacros.cmake)
include (${HDF_RESOURCES_DIR}/HDF5Macros.cmake)
-if (HDF5_ENABLE_SANITIZERS)
- include (${HDF5_SOURCE_DIR}/config/sanitizer/sanitizers.cmake)
-endif ()
#-----------------------------------------------------------------------------
# Targets built within this project are exported at Install time for use
@@ -558,9 +564,7 @@ endif ()
set (EXE_EXT "")
if (WIN32 OR MINGW)
set (EXE_EXT ".exe")
- add_definitions (-D_BIND_TO_CURRENT_VCLIBS_VERSION=1)
- add_definitions (-D_CRT_SECURE_NO_WARNINGS)
- add_definitions (-D_CONSOLE)
+ add_compile_definitions (_BIND_TO_CURRENT_VCLIBS_VERSION=1 _CRT_SECURE_NO_WARNINGS _CONSOLE)
endif ()
if (MSVC)
@@ -960,12 +964,6 @@ if (EXISTS "${HDF5_SOURCE_DIR}/fortran" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/for
include (${HDF_RESOURCES_EXT_DIR}/HDFUseFortran.cmake)
message (STATUS "Fortran compiler ID is ${CMAKE_Fortran_COMPILER_ID}")
- # Building with PGI requires CMake 3.3 or greater because previous versions
- # of CMake add the wrong compiler flag for the PGI Fortran compiler.
- if (CMAKE_Fortran_COMPILER_ID MATCHES "PGI" AND CMAKE_VERSION VERSION_LESS "3.3")
- message (FATAL_ERROR " **** PGI FORTRAN REQUIRES CMAKE VERSION 3.3 OR GREATER **** ")
- endif ()
-
include (${HDF_RESOURCES_DIR}/HDF5UseFortran.cmake)
set (LINK_Fortran_LIBS ${LINK_LIBS})
diff --git a/MANIFEST b/MANIFEST
index 35d21ce..33fab2f 100644
--- a/MANIFEST
+++ b/MANIFEST
@@ -150,6 +150,8 @@
./config/site-specific/BlankForm
+./doc/code-conventions.md
+
./examples/Attributes.txt
./examples/Makefile.am
./examples/h5_chunk_read.c
@@ -3348,6 +3350,7 @@
./config/cmake/ConfigureChecks.cmake
./config/cmake/CPack.Info.plist.in
./config/cmake/CTestCustom.cmake
+./config/cmake/fileCompareTest.cmake
./config/cmake/FindHDFS.cmake
./config/cmake/H5cxx_config.h.in
./config/cmake/H5pubconf.h.in
diff --git a/bin/release b/bin/release
index a9cf3f0..1568e02 100755
--- a/bin/release
+++ b/bin/release
@@ -233,7 +233,7 @@ tar2cmakezip()
# step 3: add SZIP.tar.gz, ZLib.tar.gz and cmake files
cp /mnt/scr1/pre-release/hdf5/CMake/SZip.tar.gz $cmziptmpsubdir
cp /mnt/scr1/pre-release/hdf5/CMake/ZLib.tar.gz $cmziptmpsubdir
- cp /mnt/scr1/pre-release/hdf5/CMake/HDF5Examples-1.14.0-Source.zip $cmziptmpsubdir
+ cp /mnt/scr1/pre-release/hdf5/CMake/HDF5Examples-1.14.1-Source.zip $cmziptmpsubdir
cp $cmziptmpsubdir/$version/config/cmake/scripts/CTestScript.cmake $cmziptmpsubdir
cp $cmziptmpsubdir/$version/config/cmake/scripts/HDF5config.cmake $cmziptmpsubdir
cp $cmziptmpsubdir/$version/config/cmake/scripts/HDF5options.cmake $cmziptmpsubdir
@@ -328,7 +328,7 @@ tar2cmaketgz()
# step 3: add SZIP.tar.gz, ZLib.tar.gz and cmake files
cp /mnt/scr1/pre-release/hdf5/CMake/SZip.tar.gz $cmgztmpsubdir
cp /mnt/scr1/pre-release/hdf5/CMake/ZLib.tar.gz $cmgztmpsubdir
- cp /mnt/scr1/pre-release/hdf5/CMake/HDF5Examples-1.14.0-Source.tar.gz $cmgztmpsubdir
+ cp /mnt/scr1/pre-release/hdf5/CMake/HDF5Examples-1.14.1-Source.tar.gz $cmgztmpsubdir
cp $cmgztmpsubdir/$version/config/cmake/scripts/CTestScript.cmake $cmgztmpsubdir
cp $cmgztmpsubdir/$version/config/cmake/scripts/HDF5config.cmake $cmgztmpsubdir
cp $cmgztmpsubdir/$version/config/cmake/scripts/HDF5options.cmake $cmgztmpsubdir
@@ -411,7 +411,7 @@ tar2hpccmaketgz()
# step 3: add SZIP.tar.gz, ZLib.tar.gz and cmake files
cp /mnt/scr1/pre-release/hdf5/CMake/SZip.tar.gz $cmgztmpsubdir
cp /mnt/scr1/pre-release/hdf5/CMake/ZLib.tar.gz $cmgztmpsubdir
- cp /mnt/scr1/pre-release/hdf5/CMake/HDF5Examples-1.14.0-Source.tar.gz $cmgztmpsubdir
+ cp /mnt/scr1/pre-release/hdf5/CMake/HDF5Examples-1.14.1-Source.tar.gz $cmgztmpsubdir
cp $cmgztmpsubdir/$version/config/cmake/scripts/CTestScript.cmake $cmgztmpsubdir
cp $cmgztmpsubdir/$version/config/cmake/scripts/HDF5config.cmake $cmgztmpsubdir
diff --git a/bin/trace b/bin/trace
index 0256da6..de6a83f 100755
--- a/bin/trace
+++ b/bin/trace
@@ -239,7 +239,11 @@ sub argstring ($$$) {
# certain type qualifiers, and indirection.
$atype =~ s/^\bconst\b//;
$atype =~ s/\bH5_ATTR_UNUSED\b//g;
+ $atype =~ s/\bH5_ATTR_DEPRECATED_USED\b//g;
$atype =~ s/\bH5_ATTR_NDEBUG_UNUSED\b//g;
+ $atype =~ s/\bH5_ATTR_DEBUG_API_USED\b//g;
+ $atype =~ s/\bH5_ATTR_PARALLEL_UNUSED\b//g;
+ $atype =~ s/\bH5_ATTR_PARALLEL_USED\b//g;
$atype =~ s/\s+/ /g;
$ptr = length $1 if $atype =~ s/(\*+)//;
$atype =~ s/^\s+//;
diff --git a/c++/CMakeLists.txt b/c++/CMakeLists.txt
index 80bd810..036735e 100644
--- a/c++/CMakeLists.txt
+++ b/c++/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required (VERSION 3.10)
+cmake_minimum_required (VERSION 3.12)
project (HDF5_CPP CXX)
add_subdirectory (src)
diff --git a/c++/examples/CMakeLists.txt b/c++/examples/CMakeLists.txt
index 89d62f1..890d22d 100644
--- a/c++/examples/CMakeLists.txt
+++ b/c++/examples/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required (VERSION 3.10)
+cmake_minimum_required (VERSION 3.12)
project (HDF5_CPP_EXAMPLES CXX)
# --------------------------------------------------------------------
diff --git a/c++/src/CMakeLists.txt b/c++/src/CMakeLists.txt
index 2a92ed2..39f0f3a 100644
--- a/c++/src/CMakeLists.txt
+++ b/c++/src/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required (VERSION 3.10)
+cmake_minimum_required (VERSION 3.12)
project (HDF5_CPP_SRC CXX)
#-----------------------------------------------------------------------------
diff --git a/c++/test/CMakeLists.txt b/c++/test/CMakeLists.txt
index 5e7134d..29534a7 100644
--- a/c++/test/CMakeLists.txt
+++ b/c++/test/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required (VERSION 3.10)
+cmake_minimum_required (VERSION 3.12)
project (HDF5_CPP_TEST CXX)
# --------------------------------------------------------------------
diff --git a/config/cmake/CTestCustom.cmake b/config/cmake/CTestCustom.cmake
index fa4c66e..7f71e8d 100644
--- a/config/cmake/CTestCustom.cmake
+++ b/config/cmake/CTestCustom.cmake
@@ -142,8 +142,8 @@ set (CTEST_CUSTOM_MEMCHECK_IGNORE
H5REPACK-bug1814-clear-objects
H5REPACK-HDFFV-5932-clear-objects
H5REPACK-HDFFV-7840-clear-objects
- H5REPACK_META-meta_long_N-clear-objects
- H5REPACK_META-meta_short_N-clear-objects
+ H5REPACK_META-meta_long-clear-objects
+ H5REPACK_META-meta_short-clear-objects
H5REPACK_STAT-GS_AGGR-clear-objects
H5REPACK_STAT-S_AGGR-clear-objects
H5REPACK_STAT-SP_NONE-clear-objects
diff --git a/config/cmake/CTestScript.cmake b/config/cmake/CTestScript.cmake
index e914c4d..5478862 100644
--- a/config/cmake/CTestScript.cmake
+++ b/config/cmake/CTestScript.cmake
@@ -9,7 +9,7 @@
# If you do not have access to either file, you may request a copy from
# help@hdfgroup.org.
#
-cmake_minimum_required (VERSION 3.10)
+cmake_minimum_required (VERSION 3.12)
########################################################
# For any comments please contact cdashhelp@hdfgroup.org
#
diff --git a/config/cmake/ConfigureChecks.cmake b/config/cmake/ConfigureChecks.cmake
index ab1fa89..11bf39c 100644
--- a/config/cmake/ConfigureChecks.cmake
+++ b/config/cmake/ConfigureChecks.cmake
@@ -160,10 +160,6 @@ endif ()
#-----------------------------------------------------------------------------
option (HDF5_ENABLE_ROS3_VFD "Build the ROS3 Virtual File Driver" OFF)
if (HDF5_ENABLE_ROS3_VFD)
- # CMake version 3.13 fixed FindCURL module
- if(CMAKE_VERSION VERSION_LESS "3.13.0" AND WIN32)
- MESSAGE(FATAL_ERROR "Windows builds for this option requires a minimum of CMake 3.13")
- endif ()
find_package(CURL REQUIRED)
find_package(OpenSSL REQUIRED)
if (${CURL_FOUND} AND ${OPENSSL_FOUND})
diff --git a/config/cmake/HDF5UseFortran.cmake b/config/cmake/HDF5UseFortran.cmake
index 2d3d371..c5d8200 100644
--- a/config/cmake/HDF5UseFortran.cmake
+++ b/config/cmake/HDF5UseFortran.cmake
@@ -19,6 +19,24 @@ enable_language (Fortran)
set (HDF_PREFIX "H5")
include (CheckFortranFunctionExists)
+if (NOT CMAKE_VERSION VERSION_LESS "3.14.0")
+ include (CheckFortranSourceRuns)
+ include (CheckFortranSourceCompiles)
+endif ()
+
+# Read source line beginning at the line matching Input:"START" and ending at the line matching Input:"END"
+macro (READ_SOURCE SOURCE_START SOURCE_END RETURN_VAR)
+ file (READ "${HDF5_SOURCE_DIR}/m4/aclocal_fc.f90" SOURCE_MASTER)
+ string (REGEX MATCH "${SOURCE_START}[\\\t\\\n\\\r[].+]*${SOURCE_END}" SOURCE_CODE ${SOURCE_MASTER})
+ set (RETURN_VAR "${SOURCE_CODE}")
+endmacro ()
+
+set (RUN_OUTPUT_PATH_DEFAULT ${CMAKE_BINARY_DIR})
+if (NOT CMAKE_VERSION VERSION_LESS "3.14.0")
+ if (HDF5_REQUIRED_LIBRARIES)
+ set (CMAKE_REQUIRED_LIBRARIES "${HDF5_REQUIRED_LIBRARIES}")
+ endif ()
+else ()
# The provided CMake Fortran macros don't provide a general compile/run function
# so this one is used.
#-----------------------------------------------------------------------------
@@ -55,22 +73,16 @@ macro (FORTRAN_RUN FUNCTION_NAME SOURCE_CODE RUN_RESULT_VAR1 COMPILE_RESULT_VAR1
set(${RETURN_VAR} ${COMPILE_RESULT_VAR})
endif ()
endmacro ()
-
-# Read source line beginning at the line matching Input:"START" and ending at the line matching Input:"END"
-macro (READ_SOURCE SOURCE_START SOURCE_END RETURN_VAR)
- file (READ "${HDF5_SOURCE_DIR}/m4/aclocal_fc.f90" SOURCE_MASTER)
- string (REGEX MATCH "${SOURCE_START}[\\\t\\\n\\\r[].+]*${SOURCE_END}" SOURCE_CODE ${SOURCE_MASTER})
- set (RETURN_VAR "${SOURCE_CODE}")
-endmacro ()
-
+endif ()
#-----------------------------------------------------------------------------
# Check to see C_LONG_DOUBLE is available
READ_SOURCE("PROGRAM PROG_FC_HAVE_C_LONG_DOUBLE" "END PROGRAM PROG_FC_HAVE_C_LONG_DOUBLE" SOURCE_CODE)
-CHECK_FORTRAN_FEATURE(c_long_double
- "${SOURCE_CODE}"
- FORTRAN_HAVE_C_LONG_DOUBLE
-)
+if (NOT CMAKE_VERSION VERSION_LESS "3.14.0")
+ check_fortran_source_compiles (${SOURCE_CODE} FORTRAN_HAVE_C_LONG_DOUBLE SRC_EXT f90)
+else ()
+ CHECK_FORTRAN_FEATURE(c_long_double "${SOURCE_CODE}" FORTRAN_HAVE_C_LONG_DOUBLE)
+endif ()
if (${FORTRAN_HAVE_C_LONG_DOUBLE})
set (${HDF_PREFIX}_FORTRAN_HAVE_C_LONG_DOUBLE 1)
@@ -81,10 +93,11 @@ endif ()
# Check to see C_LONG_DOUBLE is different from C_DOUBLE
READ_SOURCE("MODULE type_mod" "END PROGRAM PROG_FC_C_LONG_DOUBLE_EQ_C_DOUBLE" SOURCE_CODE)
-CHECK_FORTRAN_FEATURE(c_long_double
- "${SOURCE_CODE}"
- FORTRAN_C_LONG_DOUBLE_IS_UNIQUE
-)
+if (NOT CMAKE_VERSION VERSION_LESS "3.14.0")
+ check_fortran_source_compiles (${SOURCE_CODE} FORTRAN_C_LONG_DOUBLE_IS_UNIQUE SRC_EXT f90)
+else ()
+ CHECK_FORTRAN_FEATURE(c_long_double "${SOURCE_CODE}" FORTRAN_C_LONG_DOUBLE_IS_UNIQUE)
+endif ()
if (${FORTRAN_C_LONG_DOUBLE_IS_UNIQUE})
set (${HDF_PREFIX}_FORTRAN_C_LONG_DOUBLE_IS_UNIQUE 1)
else ()
@@ -108,13 +121,80 @@ endif ()
# Determine the available KINDs for REALs and INTEGERs
#-----------------------------------------------------------------------------
-READ_SOURCE ("PROGRAM FC_AVAIL_KINDS" "END PROGRAM FC_AVAIL_KINDS" SOURCE_CODE)
+#READ_SOURCE ("PROGRAM FC_AVAIL_KINDS" "END PROGRAM FC_AVAIL_KINDS" SOURCE_CODE)
+set (PROG_SRC_CODE
+ "
+ PROGRAM FC_AVAIL_KINDS
+ IMPLICIT NONE
+ INTEGER :: ik, jk, k, max_decimal_prec
+ INTEGER :: num_rkinds = 1, num_ikinds = 1
+ INTEGER, DIMENSION(1:10) :: list_ikinds = -1
+ INTEGER, DIMENSION(1:10) :: list_rkinds = -1
+
+ OPEN(8, FILE='pac_fconftest.out', FORM='formatted')
+
+ ! Find integer KINDs
+ list_ikinds(num_ikinds)=SELECTED_INT_KIND(1)
+ DO ik = 2, 36
+ k = SELECTED_INT_KIND(ik)
+ IF(k.LT.0) EXIT
+ IF(k.GT.list_ikinds(num_ikinds))THEN
+ num_ikinds = num_ikinds + 1
+ list_ikinds(num_ikinds) = k
+ ENDIF
+ ENDDO
+
+ DO k = 1, num_ikinds
+ WRITE(8,'(I0)', ADVANCE='NO') list_ikinds(k)
+ IF(k.NE.num_ikinds)THEN
+ WRITE(8,'(A)',ADVANCE='NO') ','
+ ELSE
+ WRITE(8,'()')
+ ENDIF
+ ENDDO
+
+ ! Find real KINDs
+ list_rkinds(num_rkinds)=SELECTED_REAL_KIND(1)
+ max_decimal_prec = 1
+
+ prec: DO ik = 2, 36
+ exp: DO jk = 1, 17000
+ k = SELECTED_REAL_KIND(ik,jk)
+ IF(k.LT.0) EXIT exp
+ IF(k.GT.list_rkinds(num_rkinds))THEN
+ num_rkinds = num_rkinds + 1
+ list_rkinds(num_rkinds) = k
+ ENDIF
+ max_decimal_prec = ik
+ ENDDO exp
+ ENDDO prec
+
+ DO k = 1, num_rkinds
+ WRITE(8,'(I0)', ADVANCE='NO') list_rkinds(k)
+ IF(k.NE.num_rkinds)THEN
+ WRITE(8,'(A)',ADVANCE='NO') ','
+ ELSE
+ WRITE(8,'()')
+ ENDIF
+ ENDDO
+
+ WRITE(8,'(I0)') max_decimal_prec
+ WRITE(8,'(I0)') num_ikinds
+ WRITE(8,'(I0)') num_rkinds
+ END PROGRAM FC_AVAIL_KINDS
+ "
+)
+if (NOT CMAKE_VERSION VERSION_LESS "3.14.0")
+ check_fortran_source_runs (${PROG_SRC_CODE} FC_AVAIL_KINDS_RESULT SRC_EXT f90)
+else ()
FORTRAN_RUN ("REAL and INTEGER KINDs"
- "${SOURCE_CODE}"
+ "${PROG_SRC_CODE}"
XX
YY
- PROG_RESULT
+ FC_AVAIL_KINDS_RESULT
)
+endif ()
+
# dnl The output from the above program will be:
# dnl -- LINE 1 -- valid integer kinds (comma seperated list)
# dnl -- LINE 2 -- valid real kinds (comma seperated list)
@@ -122,7 +202,7 @@ FORTRAN_RUN ("REAL and INTEGER KINDs"
# dnl -- LINE 4 -- number of valid integer kinds
# dnl -- LINE 5 -- number of valid real kinds
-file (READ "${CMAKE_BINARY_DIR}/pac_fconftest.out" PROG_OUTPUT)
+file (READ "${RUN_OUTPUT_PATH_DEFAULT}/pac_fconftest.out" PROG_OUTPUT)
# Convert the string to a list of strings by replacing the carriage return with a semicolon
string (REGEX REPLACE "\n" ";" PROG_OUTPUT "${PROG_OUTPUT}")
@@ -165,25 +245,25 @@ message (STATUS "....MAX DECIMAL PRECISION ${${HDF_PREFIX}_PAC_FC_MAX_REAL_PRECI
# **********
string (REGEX REPLACE "," ";" VAR "${pac_validIntKinds}")
-foreach (KIND ${VAR} )
- set (PROG_SRC
- "
- PROGRAM main
- USE ISO_C_BINDING
- IMPLICIT NONE
- INTEGER (KIND=${KIND}) a
- OPEN(8,FILE='pac_validIntKinds.out',FORM='formatted')
- WRITE(8,'(I0)') ${FC_SIZEOF_A}
- CLOSE(8)
- END
- "
- )
- FORTRAN_RUN("INTEGER KIND SIZEOF" ${PROG_SRC}
- XX
- YY
- PROG_RESULT1
+foreach (KIND ${VAR})
+ set (PROG_SRC_${KIND}
+ "
+ PROGRAM main
+ USE ISO_C_BINDING
+ IMPLICIT NONE
+ INTEGER (KIND=${KIND}) a
+ OPEN(8,FILE='pac_validIntKinds.out',FORM='formatted')
+ WRITE(8,'(I0)') ${FC_SIZEOF_A}
+ CLOSE(8)
+ END
+ "
)
- file (READ "${CMAKE_BINARY_DIR}/pac_validIntKinds.out" PROG_OUTPUT1)
+ if (NOT CMAKE_VERSION VERSION_LESS "3.14.0")
+ check_fortran_source_runs (${PROG_SRC_${KIND}} VALIDINTKINDS_RESULT_${KIND} SRC_EXT f90)
+ else ()
+ FORTRAN_RUN("INTEGER KIND SIZEOF" ${PROG_SRC_${KIND}} XX YY VALIDINTKINDS_RESULT_${KIND})
+ endif ()
+ file (READ "${RUN_OUTPUT_PATH_DEFAULT}/pac_validIntKinds.out" PROG_OUTPUT1)
string (REGEX REPLACE "\n" "" PROG_OUTPUT1 "${PROG_OUTPUT1}")
set (pack_int_sizeof "${pack_int_sizeof} ${PROG_OUTPUT1},")
endforeach ()
@@ -213,24 +293,24 @@ math (EXPR _LEN "${LEN_VAR}-1")
list (GET VAR ${_LEN} max_real_fortran_kind)
foreach (KIND ${VAR} )
- set (PROG_SRC
- "
- PROGRAM main
- USE ISO_C_BINDING
- IMPLICIT NONE
- REAL (KIND=${KIND}) a
- OPEN(8,FILE='pac_validRealKinds.out',FORM='formatted')
- WRITE(8,'(I0)') ${FC_SIZEOF_A}
- CLOSE(8)
- END
- "
- )
- FORTRAN_RUN ("REAL KIND SIZEOF" ${PROG_SRC}
- XX
- YY
- PROG_RESULT1
+ set (PROG_SRC2_${KIND}
+ "
+ PROGRAM main
+ USE ISO_C_BINDING
+ IMPLICIT NONE
+ REAL (KIND=${KIND}) a
+ OPEN(8,FILE='pac_validRealKinds.out',FORM='formatted')
+ WRITE(8,'(I0)') ${FC_SIZEOF_A}
+ CLOSE(8)
+ END
+ "
)
- file (READ "${CMAKE_BINARY_DIR}/pac_validRealKinds.out" PROG_OUTPUT1)
+ if (NOT CMAKE_VERSION VERSION_LESS "3.14.0")
+ check_fortran_source_runs (${PROG_SRC2_${KIND}} VALIDREALKINDS_RESULT_${KIND} SRC_EXT f90)
+ else ()
+ FORTRAN_RUN ("REAL KIND SIZEOF" ${PROG_SRC2_${KIND}} XX YY VALIDREALKINDS_RESULT_${KIND})
+ endif ()
+ file (READ "${RUN_OUTPUT_PATH_DEFAULT}/pac_validRealKinds.out" PROG_OUTPUT1)
string (REGEX REPLACE "\n" "" PROG_OUTPUT1 "${PROG_OUTPUT1}")
set (pack_real_sizeof "${pack_real_sizeof} ${PROG_OUTPUT1},")
endforeach ()
@@ -261,7 +341,7 @@ list (GET VAR ${_LEN} max_real_fortran_sizeof)
#-----------------------------------------------------------------------------
# Find sizeof of native kinds
#-----------------------------------------------------------------------------
-FORTRAN_RUN ("SIZEOF NATIVE KINDs"
+set (PROG_SRC3
"
PROGRAM main
USE ISO_C_BINDING
@@ -279,11 +359,13 @@ FORTRAN_RUN ("SIZEOF NATIVE KINDs"
CLOSE(8)
END
"
- XX
- YY
- PROG_RESULT
- )
- file (READ "${CMAKE_BINARY_DIR}/pac_sizeof_native_kinds.out" PROG_OUTPUT)
+)
+if (NOT CMAKE_VERSION VERSION_LESS "3.14.0")
+ check_fortran_source_runs (${PROG_SRC3} PAC_SIZEOF_NATIVE_KINDS_RESULT SRC_EXT f90)
+else ()
+ FORTRAN_RUN ("SIZEOF NATIVE KINDs" ${PROG_SRC3} XX YY PAC_SIZEOF_NATIVE_KINDS_RESULT)
+endif ()
+file (READ "${RUN_OUTPUT_PATH_DEFAULT}/pac_sizeof_native_kinds.out" PROG_OUTPUT)
# dnl The output from the above program will be:
# dnl -- LINE 1 -- sizeof INTEGER
# dnl -- LINE 2 -- kind of INTEGER
@@ -352,6 +434,9 @@ set (${HDF_PREFIX}_H5CONFIG_F_RKIND_SIZEOF "INTEGER, DIMENSION(1:num_rkinds) ::
ENABLE_LANGUAGE (C)
+if (NOT CMAKE_VERSION VERSION_LESS "3.14.0")
+include (CheckCSourceRuns)
+else ()
#-----------------------------------------------------------------------------
# The provided CMake C macros don't provide a general compile/run function
# so this one is used.
@@ -402,6 +487,7 @@ macro (C_RUN FUNCTION_NAME SOURCE_CODE RETURN_VAR)
message (FATAL_ERROR "Compilation of C ${FUNCTION_NAME} - Failed")
endif ()
endmacro ()
+endif ()
set (PROG_SRC
"
@@ -432,7 +518,11 @@ set (PROG_SRC
"
)
-C_RUN ("maximum decimal precision for C" ${PROG_SRC} PROG_OUTPUT)
+if (NOT CMAKE_VERSION VERSION_LESS "3.14.0")
+ check_c_source_runs (${PROG_SRC} PROG_OUTPUT)
+else ()
+ C_RUN ("maximum decimal precision for C" ${PROG_SRC} PROG_OUTPUT)
+endif ()
# dnl The output from the above program will be:
# dnl -- LINE 1 -- long double decimal precision
diff --git a/config/cmake/HDF5_Examples.cmake.in b/config/cmake/HDF5_Examples.cmake.in
index 4755ec8..273f32a 100644
--- a/config/cmake/HDF5_Examples.cmake.in
+++ b/config/cmake/HDF5_Examples.cmake.in
@@ -9,7 +9,7 @@
# If you do not have access to either file, you may request a copy from
# help@hdfgroup.org.
#
-cmake_minimum_required (VERSION 3.10)
+cmake_minimum_required (VERSION 3.12)
###############################################################################################################
# This script will build and run the examples from a folder
# Execute from a command line:
@@ -77,7 +77,7 @@ set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DSITE:STRING=${CTEST_SITE} -DBUILDN
#TAR_SOURCE - name of tarfile
#if(NOT DEFINED TAR_SOURCE)
-# set(CTEST_USE_TAR_SOURCE "HDF5Examples-1.14.0-Source")
+# set(CTEST_USE_TAR_SOURCE "HDF5Examples-1.14.1-Source")
#endif()
###############################################################################################################
diff --git a/config/cmake/HDFCompilerFlags.cmake b/config/cmake/HDFCompilerFlags.cmake
index ea85736..17b0854 100644
--- a/config/cmake/HDFCompilerFlags.cmake
+++ b/config/cmake/HDFCompilerFlags.cmake
@@ -30,8 +30,10 @@ macro (ADD_H5_FLAGS h5_flag_var infile)
#message (STATUS "h5_flag_var=${${h5_flag_var}}")
endmacro ()
-message (STATUS "Warnings Configuration:")
set (CMAKE_C_FLAGS "${CMAKE_C99_STANDARD_COMPILE_OPTION} ${CMAKE_C_FLAGS}")
+set (CMAKE_C_FLAGS "${CMAKE_C_SANITIZER_FLAGS} ${CMAKE_C_FLAGS}")
+set (CMAKE_CXX_FLAGS "${CMAKE_CXX_SANITIZER_FLAGS} ${CMAKE_CXX_FLAGS}")
+message (STATUS "Warnings Configuration: default: ${CMAKE_C_FLAGS} : ${CMAKE_CXX_FLAGS}")
#-----------------------------------------------------------------------------
# Compiler specific flags : Shouldn't there be compiler tests for these
#-----------------------------------------------------------------------------
diff --git a/config/cmake/README.txt.cmake.in b/config/cmake/README.txt.cmake.in
index b29d50b..3afebc2 100644
--- a/config/cmake/README.txt.cmake.in
+++ b/config/cmake/README.txt.cmake.in
@@ -9,7 +9,7 @@ It was built with the following options:
-- @LIB_TYPE@ C/C++/Fortran libraries
-- SZIP (encoder enabled) and ZLIB
-- @LIB_TYPE@ HDF5 tools
- -- Java
+ -- Java @Java_VERSION@
The contents of this directory are:
@@ -28,7 +28,8 @@ After Installation
The examples folder, HDF5Examples, located in the
HDF5 install folder, can be built and tested with CMake and the supplied
HDF5_Examples.cmake file. The HDF5_Examples.cmake expects HDF5 to have
-been installed in the default location with above compilers. Also, the CMake
+been installed in the default location with above compilers (see the
+libhdf5.settings file in the lib install folder). Also, the CMake
utility should be installed.
To test the installation with the examples;
diff --git a/config/cmake/UseJava.cmake b/config/cmake/UseJava.cmake
index 8efee11..375004e 100644
--- a/config/cmake/UseJava.cmake
+++ b/config/cmake/UseJava.cmake
@@ -536,7 +536,7 @@ function(add_jar _TARGET_NAME)
if (_JAVA_SOURCE_FILE MATCHES "^@(.+)$")
get_filename_component(_JAVA_FULL ${CMAKE_MATCH_1} ABSOLUTE)
- list(APPEND _JAVA_COMPILE_FILELISTS ${_JAVA_FULL})
+ list (APPEND _JAVA_COMPILE_FILELISTS ${_JAVA_FULL})
elseif (_JAVA_EXT MATCHES ".java")
file(RELATIVE_PATH _JAVA_REL_BINARY_PATH ${CMAKE_CURRENT_BINARY_DIR} ${_JAVA_FULL})
@@ -550,7 +550,7 @@ function(add_jar _TARGET_NAME)
endif ()
get_filename_component(_JAVA_REL_PATH ${_JAVA_REL_PATH} PATH)
- list(APPEND _JAVA_COMPILE_FILES ${_JAVA_SOURCE_FILE})
+ list (APPEND _JAVA_COMPILE_FILES ${_JAVA_SOURCE_FILE})
set(_JAVA_CLASS_FILE "${CMAKE_JAVA_CLASS_OUTPUT_PATH}/${_JAVA_REL_PATH}/${_JAVA_FILE}.class")
set(_JAVA_CLASS_FILES ${_JAVA_CLASS_FILES} ${_JAVA_CLASS_FILE})
@@ -561,15 +561,15 @@ function(add_jar _TARGET_NAME)
# Ignored for backward compatibility
elseif (_JAVA_EXT STREQUAL "")
- list(APPEND CMAKE_JAVA_INCLUDE_PATH ${JAVA_JAR_TARGET_${_JAVA_SOURCE_FILE}} ${JAVA_JAR_TARGET_${_JAVA_SOURCE_FILE}_CLASSPATH})
- list(APPEND _JAVA_DEPENDS ${JAVA_JAR_TARGET_${_JAVA_SOURCE_FILE}})
+ list (APPEND CMAKE_JAVA_INCLUDE_PATH ${JAVA_JAR_TARGET_${_JAVA_SOURCE_FILE}} ${JAVA_JAR_TARGET_${_JAVA_SOURCE_FILE}_CLASSPATH})
+ list (APPEND _JAVA_DEPENDS ${JAVA_JAR_TARGET_${_JAVA_SOURCE_FILE}})
else ()
__java_copy_file(${CMAKE_CURRENT_SOURCE_DIR}/${_JAVA_SOURCE_FILE}
${CMAKE_JAVA_CLASS_OUTPUT_PATH}/${_JAVA_SOURCE_FILE}
"Copying ${_JAVA_SOURCE_FILE} to the build directory")
- list(APPEND _JAVA_RESOURCE_FILES ${CMAKE_JAVA_CLASS_OUTPUT_PATH}/${_JAVA_SOURCE_FILE})
- list(APPEND _JAVA_RESOURCE_FILES_RELATIVE ${_JAVA_SOURCE_FILE})
+ list (APPEND _JAVA_RESOURCE_FILES ${CMAKE_JAVA_CLASS_OUTPUT_PATH}/${_JAVA_SOURCE_FILE})
+ list (APPEND _JAVA_RESOURCE_FILES_RELATIVE ${_JAVA_SOURCE_FILE})
endif ()
endforeach()
@@ -578,17 +578,17 @@ function(add_jar _TARGET_NAME)
get_target_property(_JAVA_JAR_PATH ${_JAVA_INCLUDE_JAR} JAR_FILE)
if (_JAVA_JAR_PATH)
string(APPEND CMAKE_JAVA_INCLUDE_PATH_FINAL "${CMAKE_JAVA_INCLUDE_FLAG_SEP}${_JAVA_JAR_PATH}")
- list(APPEND CMAKE_JAVA_INCLUDE_PATH ${_JAVA_JAR_PATH})
- list(APPEND _JAVA_DEPENDS ${_JAVA_INCLUDE_JAR})
- list(APPEND _JAVA_COMPILE_DEPENDS ${_JAVA_JAR_PATH})
+ list (APPEND CMAKE_JAVA_INCLUDE_PATH ${_JAVA_JAR_PATH})
+ list (APPEND _JAVA_DEPENDS ${_JAVA_INCLUDE_JAR})
+ list (APPEND _JAVA_COMPILE_DEPENDS ${_JAVA_JAR_PATH})
else ()
message(SEND_ERROR "add_jar: INCLUDE_JARS target ${_JAVA_INCLUDE_JAR} is not a jar")
endif ()
else ()
string(APPEND CMAKE_JAVA_INCLUDE_PATH_FINAL "${CMAKE_JAVA_INCLUDE_FLAG_SEP}${_JAVA_INCLUDE_JAR}")
- list(APPEND CMAKE_JAVA_INCLUDE_PATH "${_JAVA_INCLUDE_JAR}")
- list(APPEND _JAVA_DEPENDS "${_JAVA_INCLUDE_JAR}")
- list(APPEND _JAVA_COMPILE_DEPENDS "${_JAVA_INCLUDE_JAR}")
+ list (APPEND CMAKE_JAVA_INCLUDE_PATH "${_JAVA_INCLUDE_JAR}")
+ list (APPEND _JAVA_DEPENDS "${_JAVA_INCLUDE_JAR}")
+ list (APPEND _JAVA_COMPILE_DEPENDS "${_JAVA_INCLUDE_JAR}")
endif ()
endforeach()
@@ -985,7 +985,7 @@ function(create_javadoc _target)
elseif (arg STREQUAL "VERSION")
set(_state "version")
else ()
- list(APPEND _javadoc_packages ${arg})
+ list (APPEND _javadoc_packages ${arg})
endif ()
elseif (_state STREQUAL "files")
if (arg STREQUAL "PACKAGES")
@@ -1009,7 +1009,7 @@ function(create_javadoc _target)
elseif (arg STREQUAL "VERSION")
set(_state "version")
else ()
- list(APPEND _javadoc_files ${arg})
+ list (APPEND _javadoc_files ${arg})
endif ()
elseif (_state STREQUAL "sourcepath")
if (arg STREQUAL "PACKAGES")
@@ -1033,7 +1033,7 @@ function(create_javadoc _target)
elseif (arg STREQUAL "VERSION")
set(_state "version")
else ()
- list(APPEND _javadoc_sourcepath ${arg})
+ list (APPEND _javadoc_sourcepath ${arg})
endif ()
elseif (_state STREQUAL "classpath")
if (arg STREQUAL "PACKAGES")
@@ -1057,7 +1057,7 @@ function(create_javadoc _target)
elseif (arg STREQUAL "VERSION")
set(_state "version")
else ()
- list(APPEND _javadoc_classpath ${arg})
+ list (APPEND _javadoc_classpath ${arg})
endif ()
elseif (_state STREQUAL "installpath")
if (arg STREQUAL "PACKAGES")
diff --git a/config/cmake/UseJavaClassFilelist.cmake b/config/cmake/UseJavaClassFilelist.cmake
index b98276f..8348e4c 100644
--- a/config/cmake/UseJavaClassFilelist.cmake
+++ b/config/cmake/UseJavaClassFilelist.cmake
@@ -23,7 +23,7 @@ if (CMAKE_JAVA_CLASS_OUTPUT_PATH)
file(GLOB_RECURSE _JAVA_GLOBBED_TMP_FILES "${CMAKE_JAVA_CLASS_OUTPUT_PATH}/${JAR_CLASS_PREFIX}/*.class")
if (_JAVA_GLOBBED_TMP_FILES)
- list(APPEND _JAVA_GLOBBED_FILES ${_JAVA_GLOBBED_TMP_FILES})
+ list (APPEND _JAVA_GLOBBED_FILES ${_JAVA_GLOBBED_TMP_FILES})
endif ()
endforeach()
else()
diff --git a/config/cmake/fileCompareTest.cmake b/config/cmake/fileCompareTest.cmake
new file mode 100644
index 0000000..d913da0
--- /dev/null
+++ b/config/cmake/fileCompareTest.cmake
@@ -0,0 +1,104 @@
+#
+# Copyright by The HDF Group.
+# All rights reserved.
+#
+# This file is part of HDF5. The full HDF5 copyright notice, including
+# terms governing use, modification, and redistribution, is contained in
+# the COPYING file, which can be found at the root of the source code
+# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
+# If you do not have access to either file, you may request a copy from
+# help@hdfgroup.org.
+#
+# fileCompareTest.cmake compares two files.
+
+# arguments checking
+if (NOT TEST_FOLDER)
+ message (FATAL_ERROR "Require TEST_FOLDER to be defined")
+endif ()
+if (NOT TEST_ONEFILE)
+ message (FATAL_ERROR "Require TEST_ONEFILE the first file to be defined")
+endif ()
+if (NOT TEST_TWOFILE)
+ message (FATAL_ERROR "Require TEST_TWOFILE the second file to be defined")
+endif ()
+if (NOT TEST_FUNCTION)
+ message (FATAL_ERROR "Require TEST_FUNCTION (LT,LTEQ,EQ,GTEQ,GT) to be defined")
+endif ()
+#if (NOT TEST_EXPECT)
+# message (STATUS "Require TEST_EXPECT to be defined")
+#endif ()
+
+set (TEST_ONE_SIZE 0)
+set (TEST_TWO_SIZE 0)
+set (TEST_ONE_STRING 0)
+set (TEST_TWO_STRING 0)
+set (TEST_ONE_STRING_LEN 0)
+set (TEST_TWO_STRING_LEN 0)
+
+if (TEST_STRINGS STREQUAL "YES")
+ # find the length of the first file
+ #s1=`cat $ufile | wc -c | sed -e 's/ //g'`
+ file (STRINGS ${TEST_FOLDER}/${TEST_ONEFILE} TEST_ONE_STRING)
+ string (LENGTH ${TEST_ONE_STRING} TEST_ONE_STRING_LEN)
+
+ # Get the size of the second file.
+ file (STRINGS ${TEST_FOLDER}/${TEST_TWOFILE} TEST_TWO_STRING)
+ string (LENGTH ${TEST_TWO_STRING} TEST_TWO_STRING_LEN)
+
+ math (EXPR TEST_STRING_SIZE "${TEST_ONE_STRING_LEN} - ${TEST_TWO_STRING_LEN}" )
+
+ # now compare the outputs
+ execute_process (
+ COMMAND ${CMAKE_COMMAND} -E compare_files ${CMAKE_IGNORE_EOL} ${TEST_FOLDER}/${TEST_ONEFILE} ${TEST_FOLDER}/${TEST_TWOFILE}
+ RESULT_VARIABLE TEST_RESULT
+ )
+
+ message (STATUS "COMPARE Result: ${TEST_RESULT}: ${TEST_STRING_SIZE}=${TEST_U_STRING_LEN}-${TEST_O_STRING_LEN}")
+ # if the return value is !=${TEST_EXPECT} bail out
+ if (NOT TEST_RESULT EQUAL TEST_EXPECT)
+ message (FATAL_ERROR "Failed: The output of ${TEST_FOLDER}/${TEST_ONEFILE} did not match ${TEST_FOLDER}/${TEST_TWOFILE}.\n${TEST_ERROR}")
+ endif ()
+else ()
+ if (CMAKE_VERSION VERSION_LESS "3.14.0")
+ message (FATAL_ERROR "CANNOT get file size, file command SIZE not supported")
+ else ()
+ file (SIZE ${TEST_FOLDER}/${TEST_ONEFILE} TEST_ONE_SIZE)
+ file (SIZE ${TEST_FOLDER}/${TEST_TWOFILE} TEST_TWO_SIZE)
+ if (TEST_FUNCTION MATCHES "LT")
+ if (TEST_ONE_SIZE LESS TEST_TWO_SIZE)
+ message (STATUS "Passed: The size of ${TEST_FOLDER}/${TEST_ONEFILE} was less ${TEST_FOLDER}/${TEST_TWOFILE}")
+ else ()
+ message (FATAL_ERROR "The size of ${TEST_FOLDER}/${TEST_ONEFILE} was NOT less ${TEST_FOLDER}/${TEST_TWOFILE}")
+ endif ()
+ elseif (TEST_FUNCTION MATCHES "LTEQ")
+ if (TEST_ONE_SIZE LESS_EQUAL TEST_TWO_SIZE)
+ message (STATUS "Passed: The size of ${TEST_FOLDER}/${TEST_ONEFILE} was less or equal ${TEST_FOLDER}/${TEST_TWOFILE}")
+ else ()
+ message (FATAL_ERROR "The size of ${TEST_FOLDER}/${TEST_ONEFILE} was NOT less or equal ${TEST_FOLDER}/${TEST_TWOFILE}")
+ endif ()
+ elseif (TEST_FUNCTION MATCHES "EQ")
+ if (TEST_ONE_SIZE LESS_EQUAL TEST_TWO_SIZE)
+ message (STATUS "Passed: The size of ${TEST_FOLDER}/${TEST_ONEFILE} was equal ${TEST_FOLDER}/${TEST_TWOFILE}")
+ else ()
+ message (FATAL_ERROR "The size of ${TEST_FOLDER}/${TEST_ONEFILE} was NOT equal ${TEST_FOLDER}/${TEST_TWOFILE}")
+ endif ()
+ elseif (TEST_FUNCTION MATCHES "GTEQ")
+ if (TEST_ONE_SIZE LESS_EQUAL TEST_TWO_SIZE)
+ message (STATUS "Passed: The size of ${TEST_FOLDER}/${TEST_ONEFILE} was greater or equal ${TEST_FOLDER}/${TEST_TWOFILE}")
+ else ()
+ message (FATAL_ERROR "The size of ${TEST_FOLDER}/${TEST_ONEFILE} was NOT greater or equal ${TEST_FOLDER}/${TEST_TWOFILE}")
+ endif ()
+ elseif (TEST_FUNCTION MATCHES "GT")
+ if (TEST_ONE_SIZE LESS_EQUAL TEST_TWO_SIZE)
+ message (STATUS "Passed: The size of ${TEST_FOLDER}/${TEST_ONEFILE} was greater ${TEST_FOLDER}/${TEST_TWOFILE}")
+ else ()
+ message (FATAL_ERROR "The size of ${TEST_FOLDER}/${TEST_ONEFILE} was NOT greater ${TEST_FOLDER}/${TEST_TWOFILE}")
+ endif ()
+ else ()
+ message (FATAL_ERROR "Failed: Incorrect test size compare command provided.\n${TEST_ERROR}")
+ endif ()
+ endif ()
+endif ()
+
+# everything went fine...
+
diff --git a/config/cmake/jrunTest.cmake b/config/cmake/jrunTest.cmake
index 0315536..41570eb 100644
--- a/config/cmake/jrunTest.cmake
+++ b/config/cmake/jrunTest.cmake
@@ -75,7 +75,7 @@ message (STATUS "COMMAND Result: ${TEST_RESULT}")
# if the .err file exists and ERRROR_APPEND is enabled
if (EXISTS "${TEST_FOLDER}/${TEST_OUTPUT}.err")
file (READ ${TEST_FOLDER}/${TEST_OUTPUT}.err TEST_STREAM)
- list(LENGTH TEST_STREAM test_len)
+ list (LENGTH TEST_STREAM test_len)
if (test_len GREATER 0)
if (TEST_MASK_FILE)
STRING(REGEX REPLACE "CurrentDir is [^\n]+\n" "CurrentDir is (dir name)\n" TEST_STREAM "${TEST_STREAM}")
@@ -129,7 +129,7 @@ set (TEST_COMPARE_RESULT 0)
if (NOT TEST_SKIP_COMPARE)
if (EXISTS "${TEST_FOLDER}/${TEST_REFERENCE}")
file (READ ${TEST_FOLDER}/${TEST_REFERENCE} TEST_STREAM)
- list(LENGTH TEST_STREAM test_len)
+ list (LENGTH TEST_STREAM test_len)
if (test_len GREATER 0)
if (WIN32 OR MINGW)
configure_file(${TEST_FOLDER}/${TEST_REFERENCE} ${TEST_FOLDER}/${TEST_REFERENCE}.tmp NEWLINE_STYLE CRLF)
@@ -143,7 +143,7 @@ if (NOT TEST_SKIP_COMPARE)
if (NOT TEST_SORT_COMPARE)
# now compare the output with the reference
execute_process (
- COMMAND ${CMAKE_COMMAND} -E compare_files ${TEST_FOLDER}/${TEST_OUTPUT} ${TEST_FOLDER}/${TEST_REFERENCE}
+ COMMAND ${CMAKE_COMMAND} -E compare_files ${CMAKE_IGNORE_EOL} ${TEST_FOLDER}/${TEST_OUTPUT} ${TEST_FOLDER}/${TEST_REFERENCE}
RESULT_VARIABLE TEST_COMPARE_RESULT
)
else ()
@@ -200,7 +200,7 @@ if (NOT TEST_SKIP_COMPARE)
set (TEST_ERRREF_RESULT 0)
if (TEST_ERRREF)
file (READ ${TEST_FOLDER}/${TEST_ERRREF} TEST_STREAM)
- list(LENGTH TEST_STREAM test_len)
+ list (LENGTH TEST_STREAM test_len)
if (test_len GREATER 0)
if (WIN32 OR MINGW)
configure_file(${TEST_FOLDER}/${TEST_ERRREF} ${TEST_FOLDER}/${TEST_ERRREF}.tmp NEWLINE_STYLE CRLF)
@@ -213,7 +213,7 @@ if (NOT TEST_SKIP_COMPARE)
# now compare the error output with the error reference
execute_process (
- COMMAND ${CMAKE_COMMAND} -E compare_files ${TEST_FOLDER}/${TEST_OUTPUT}.err ${TEST_FOLDER}/${TEST_ERRREF}
+ COMMAND ${CMAKE_COMMAND} -E compare_files ${CMAKE_IGNORE_EOL} ${TEST_FOLDER}/${TEST_OUTPUT}.err ${TEST_FOLDER}/${TEST_ERRREF}
RESULT_VARIABLE TEST_ERRREF_RESULT
)
if (TEST_ERRREF_RESULT)
@@ -262,7 +262,7 @@ set (TEST_GREP_RESULT 0)
if (TEST_GREP_COMPARE)
# now grep the output with the reference
file (READ ${TEST_FOLDER}/${TEST_OUTPUT} TEST_STREAM)
- list(LENGTH TEST_STREAM test_len)
+ list (LENGTH TEST_STREAM test_len)
if (test_len GREATER 0)
# TEST_REFERENCE should always be matched
string (REGEX MATCH "${TEST_REFERENCE}" TEST_MATCH ${TEST_STREAM})
@@ -284,11 +284,13 @@ endif ()
# dump the output unless nodisplay option is set
if (TEST_SKIP_COMPARE AND NOT TEST_NO_DISPLAY)
- file (READ ${TEST_FOLDER}/${TEST_OUTPUT} TEST_STREAM)
- execute_process (
- COMMAND ${CMAKE_COMMAND} -E echo ${TEST_STREAM}
- RESULT_VARIABLE TEST_RESULT
- )
+ if (EXISTS "${TEST_FOLDER}/${TEST_OUTPUT}")
+ file (READ ${TEST_FOLDER}/${TEST_OUTPUT} TEST_STREAM)
+ execute_process (
+ COMMAND ${CMAKE_COMMAND} -E echo ${TEST_STREAM}
+ RESULT_VARIABLE TEST_RESULT
+ )
+ endif ()
endif ()
# everything went fine...
diff --git a/config/cmake/scripts/CTestScript.cmake b/config/cmake/scripts/CTestScript.cmake
index 3c85d48..e3659f6 100644
--- a/config/cmake/scripts/CTestScript.cmake
+++ b/config/cmake/scripts/CTestScript.cmake
@@ -9,7 +9,7 @@
# If you do not have access to either file, you may request a copy from
# help@hdfgroup.org.
#
-cmake_minimum_required (VERSION 3.10)
+cmake_minimum_required (VERSION 3.12)
########################################################
# This dashboard is maintained by The HDF Group
# For any comments please contact cdashhelp@hdfgroup.org
@@ -253,6 +253,14 @@ endforeach ()
message (STATUS "Dashboard script configuration:\n${vars}\n")
#-----------------------------------------------------------------------------
+
+###################################################################
+######### Following is for submission to CDash ############
+###################################################################
+if (NOT DEFINED MODEL)
+ set (MODEL "Experimental")
+endif ()
+
#-----------------------------------------------------------------------------
## NORMAL process
## -- LOCAL_UPDATE updates the source folder from svn
diff --git a/config/cmake/scripts/HDF5config.cmake b/config/cmake/scripts/HDF5config.cmake
index 6096860..7b7560f 100644
--- a/config/cmake/scripts/HDF5config.cmake
+++ b/config/cmake/scripts/HDF5config.cmake
@@ -15,7 +15,7 @@
### ctest -S HDF5config.cmake,BUILD_GENERATOR=VS201764 -C Release -VV -O hdf5.log ###
#############################################################################################
-cmake_minimum_required (VERSION 3.10)
+cmake_minimum_required (VERSION 3.12)
############################################################################
# Usage:
# ctest -S HDF5config.cmake,OPTION=VALUE -C Release -VV -O test.log
@@ -42,9 +42,9 @@ set (CTEST_SOURCE_VERSEXT "")
##############################################################################
# handle input parameters to script.
#BUILD_GENERATOR - which CMake generator to use, required
-#INSTALLDIR - HDF5-1.13.0 root folder
+#INSTALLDIR - HDF5-1.13.x root folder
#CTEST_CONFIGURATION_TYPE - Release, Debug, RelWithDebInfo
-#CTEST_SOURCE_NAME - name of source folder; HDF5-1.13.0
+#CTEST_SOURCE_NAME - name of source folder; HDF5-1.13.x
#MODEL - CDash group name
#HPC - run alternate configurations for HPC machines; sbatch, bsub, raybsub, qsub
#MPI - enable MPI
@@ -189,15 +189,6 @@ endif ()
###################################################################
###################################################################
-######### Following is for submission to CDash ############
-###################################################################
-if (NOT DEFINED MODEL)
- set (MODEL "Experimental")
-endif ()
-
-###################################################################
-
-###################################################################
##### Following controls CDash submission #####
#set (LOCAL_SUBMIT "TRUE")
##### Following controls test process #####
diff --git a/config/cmake/scripts/HDF5options.cmake b/config/cmake/scripts/HDF5options.cmake
index d1c14e9..f132234 100644
--- a/config/cmake/scripts/HDF5options.cmake
+++ b/config/cmake/scripts/HDF5options.cmake
@@ -67,7 +67,7 @@ set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_ALLOW_EXTERNAL_SUPPORT:STRIN
#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.14.0-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.14.1-Source.tar.gz -DHDF5_EXAMPLES_COMPRESSED_DIR:PATH=${CTEST_SCRIPT_DIRECTORY}")
#############################################################################################
### enable parallel builds
diff --git a/config/cmake/userblockTest.cmake b/config/cmake/userblockTest.cmake
index c9fc36f..c02669d 100644
--- a/config/cmake/userblockTest.cmake
+++ b/config/cmake/userblockTest.cmake
@@ -54,7 +54,7 @@ if (TEST_CHECKUB STREQUAL "YES")
# 'tellub' calls H5Fget_user_block to get the size
# of the user block
#s2=`$JAM_BIN/tellub $origfile`
- EXECUTE_PROCESS (
+ execute_process (
COMMAND ${TEST_EMULATOR} ${TEST_PROGRAM} ${TEST_OFILE}
WORKING_DIRECTORY ${TEST_FOLDER}
RESULT_VARIABLE TEST_RESULT
@@ -72,7 +72,7 @@ if (TEST_CHECKUB STREQUAL "YES")
if (TEST_O_STRING_LEN)
#$JAM_BIN/getub -c $s2 $origfile > $cmpfile
- EXECUTE_PROCESS (
+ execute_process (
COMMAND ${TEST_EMULATOR} ${TEST_GET_PROGRAM} -c ${TEST_O_STRING_LEN} ${TEST_OFILE}
WORKING_DIRECTORY ${TEST_FOLDER}
RESULT_VARIABLE TEST_RESULT
@@ -90,7 +90,7 @@ if (TEST_CHECKUB STREQUAL "YES")
endif ()
#$JAM_BIN/getub -c $size $hfile > $tfile
- EXECUTE_PROCESS (
+ execute_process (
COMMAND ${TEST_EMULATOR} ${TEST_GET_PROGRAM} -c ${TEST_STRING_SIZE} ${TEST_HFILE}
WORKING_DIRECTORY ${TEST_FOLDER}
RESULT_VARIABLE TEST_RESULT
@@ -101,8 +101,8 @@ if (TEST_CHECKUB STREQUAL "YES")
)
# now compare the outputs
- EXECUTE_PROCESS (
- COMMAND ${CMAKE_COMMAND} -E compare_files ${TEST_HFILE}-ub.cmp ${TEST_HFILE}.cmp
+ execute_process (
+ COMMAND ${CMAKE_COMMAND} -E compare_files ${CMAKE_IGNORE_EOL} ${TEST_HFILE}-ub.cmp ${TEST_HFILE}.cmp
RESULT_VARIABLE TEST_RESULT
)
@@ -114,7 +114,7 @@ if (TEST_CHECKUB STREQUAL "YES")
else ()
# call 'ubsize' to get the size of the user block
#ubsize=`$JAM_BIN/tellub $hfile`
- EXECUTE_PROCESS (
+ execute_process (
COMMAND ${TEST_EMULATOR} ${TEST_PROGRAM} ${TEST_HFILE}
WORKING_DIRECTORY ${TEST_FOLDER}
RESULT_VARIABLE TEST_H_STRING_LEN
diff --git a/config/cmake/wait_H5Tinit.cmake b/config/cmake/wait_H5Tinit.cmake
index c0b4d06..b778765 100644
--- a/config/cmake/wait_H5Tinit.cmake
+++ b/config/cmake/wait_H5Tinit.cmake
@@ -1,4 +1,4 @@
-cmake_minimum_required (VERSION 3.10)
+cmake_minimum_required (VERSION 3.12)
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)
diff --git a/config/cmake_ext_mod/CTestCustom.cmake b/config/cmake_ext_mod/CTestCustom.cmake
index 4e292a7..2d72e8d 100644
--- a/config/cmake_ext_mod/CTestCustom.cmake
+++ b/config/cmake_ext_mod/CTestCustom.cmake
@@ -5,7 +5,7 @@ set (CTEST_CUSTOM_WARNING_EXCEPTION
".*note.*expected.*void.*but argument is of type.*volatile.*"
".*src.SZIP.*:[ \t]*warning.*"
".*src.ZLIB.*:[ \t]*warning.*"
- ".*jpeg.src.*:[ \t]*warning.*"
+ ".*src.JPEG.*:[ \t]*warning.*"
".*POSIX name for this item is deprecated.*"
".*disabling jobserver mode.*"
".*warning.*implicit declaration of function.*"
diff --git a/config/cmake_ext_mod/FindSZIP.cmake b/config/cmake_ext_mod/FindSZIP.cmake
index 2303d6d..8f882b4 100644
--- a/config/cmake_ext_mod/FindSZIP.cmake
+++ b/config/cmake_ext_mod/FindSZIP.cmake
@@ -51,7 +51,7 @@ find_path(SZIP_INCLUDE_DIR szlib.h)
set(szip_names ${SZIP_NAMES} sz szip szip-static libsz libszip libszip-static)
foreach(name ${szip_names})
- list(APPEND szip_names_debug "${name}d")
+ list (APPEND szip_names_debug "${name}d")
endforeach()
if(NOT SZIP_LIBRARY)
diff --git a/config/cmake_ext_mod/HDFMacros.cmake b/config/cmake_ext_mod/HDFMacros.cmake
index d1d9a6c..fee6def 100644
--- a/config/cmake_ext_mod/HDFMacros.cmake
+++ b/config/cmake_ext_mod/HDFMacros.cmake
@@ -82,10 +82,8 @@ macro (INSTALL_TARGET_PDB libtarget targetdestination targetcomponent)
set (targetfilename $<TARGET_FILE_DIR:${libtarget}>/${target_name}.pdb)
endif ()
install (
- FILES
- ${targetfilename}
- DESTINATION
- ${targetdestination}
+ FILES ${targetfilename}
+ DESTINATION ${targetdestination}
CONFIGURATIONS Debug RelWithDebInfo
COMPONENT ${targetcomponent}
OPTIONAL
@@ -97,10 +95,8 @@ endmacro ()
macro (INSTALL_PROGRAM_PDB progtarget targetdestination targetcomponent)
if (WIN32 AND MSVC)
install (
- FILES
- $<TARGET_PDB_FILE:${progtarget}>
- DESTINATION
- ${targetdestination}
+ FILES $<TARGET_PDB_FILE:${progtarget}>
+ DESTINATION ${targetdestination}
CONFIGURATIONS Debug RelWithDebInfo
COMPONENT ${targetcomponent}
OPTIONAL
@@ -123,18 +119,12 @@ macro (HDF_SET_LIB_OPTIONS libtarget libname libtype)
endif ()
endif ()
- set_target_properties (${libtarget}
- PROPERTIES
- OUTPUT_NAME
- ${LIB_RELEASE_NAME}
-# OUTPUT_NAME_DEBUG
-# ${LIB_DEBUG_NAME}
- OUTPUT_NAME_RELEASE
- ${LIB_RELEASE_NAME}
- OUTPUT_NAME_MINSIZEREL
- ${LIB_RELEASE_NAME}
- OUTPUT_NAME_RELWITHDEBINFO
- ${LIB_RELEASE_NAME}
+ set_target_properties (${libtarget} PROPERTIES
+ OUTPUT_NAME ${LIB_RELEASE_NAME}
+# OUTPUT_NAME_DEBUG ${LIB_DEBUG_NAME}
+ OUTPUT_NAME_RELEASE ${LIB_RELEASE_NAME}
+ OUTPUT_NAME_MINSIZEREL ${LIB_RELEASE_NAME}
+ OUTPUT_NAME_RELWITHDEBINFO ${LIB_RELEASE_NAME}
)
#get_property (target_name TARGET ${libtarget} PROPERTY OUTPUT_NAME)
#get_property (target_name_debug TARGET ${libtarget} PROPERTY OUTPUT_NAME_DEBUG)
@@ -143,8 +133,7 @@ macro (HDF_SET_LIB_OPTIONS libtarget libname libtype)
if (${libtype} MATCHES "STATIC")
if (WIN32)
- set_target_properties (${libtarget}
- PROPERTIES
+ set_target_properties (${libtarget} PROPERTIES
COMPILE_PDB_NAME_DEBUG ${LIB_DEBUG_NAME}
COMPILE_PDB_NAME_RELEASE ${LIB_RELEASE_NAME}
COMPILE_PDB_NAME_MINSIZEREL ${LIB_RELEASE_NAME}
@@ -156,8 +145,7 @@ macro (HDF_SET_LIB_OPTIONS libtarget libname libtype)
#----- Use MSVC Naming conventions for Shared Libraries
if (MINGW AND ${libtype} MATCHES "SHARED")
- set_target_properties (${libtarget}
- PROPERTIES
+ set_target_properties (${libtarget} PROPERTIES
IMPORT_SUFFIX ".lib"
IMPORT_PREFIX ""
PREFIX ""
diff --git a/config/cmake_ext_mod/HDFUseFortran.cmake b/config/cmake_ext_mod/HDFUseFortran.cmake
index 1cce918..0a6a092 100644
--- a/config/cmake_ext_mod/HDFUseFortran.cmake
+++ b/config/cmake_ext_mod/HDFUseFortran.cmake
@@ -16,6 +16,11 @@
enable_language (Fortran)
set (HDF_PREFIX "H5")
+if (NOT CMAKE_VERSION VERSION_LESS "3.14.0")
+ include (CheckFortranSourceRuns)
+ include (CheckFortranSourceCompiles)
+endif ()
+
#-------------------------------------------------------------------------------
# Fix Fortran flags if we are compiling staticly on Windows using
# Windows_MT.cmake from config/cmake/UserMacros
@@ -42,71 +47,15 @@ file (STRINGS ${CMAKE_BINARY_DIR}/FCMangle.h CONTENTS REGEX "H5_FC_GLOBAL_\\(.*,
string (REGEX MATCH "H5_FC_GLOBAL_\\(.*,.*\\) +(.*)" RESULT ${CONTENTS})
set (H5_FC_FUNC_ "H5_FC_FUNC_(name,NAME) ${CMAKE_MATCH_1}")
-#-----------------------------------------------------------------------------
-# The provided CMake Fortran macros don't provide a general check function
-# so this one is used for a sizeof test.
-#-----------------------------------------------------------------------------
-macro (CHECK_FORTRAN_FEATURE FUNCTION CODE VARIABLE)
- message (STATUS "Testing Fortran ${FUNCTION}")
- if (HDF5_REQUIRED_LIBRARIES)
- set (CHECK_FUNCTION_EXISTS_ADD_LIBRARIES
- "-DLINK_LIBRARIES:STRING=${HDF5_REQUIRED_LIBRARIES}")
- else ()
- set (CHECK_FUNCTION_EXISTS_ADD_LIBRARIES)
- endif ()
- file (WRITE
- ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/testFortranCompiler.f90
- "${CODE}"
- )
- TRY_COMPILE (RESULT_VAR
- ${CMAKE_BINARY_DIR}
- ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/testFortranCompiler.f90
- CMAKE_FLAGS "${CHECK_FUNCTION_EXISTS_ADD_LIBRARIES}"
- OUTPUT_VARIABLE OUTPUT
- )
-
-# message (STATUS "* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ")
-# message (STATUS "Test result ${OUTPUT}")
-# message (STATUS "* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ")
-
- if (${RESULT_VAR})
- set (${VARIABLE} 1 CACHE INTERNAL "Have Fortran function ${FUNCTION}")
- message (STATUS "Testing Fortran ${FUNCTION} - OK")
- file (APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
- "Determining if the Fortran ${FUNCTION} exists passed with the following output:\n"
- "${OUTPUT}\n\n"
- )
- else ()
- message (STATUS "Testing Fortran ${FUNCTION} - Fail")
- set (${VARIABLE} 0 CACHE INTERNAL "Have Fortran function ${FUNCTION}")
- file (APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
- "Determining if the Fortran ${FUNCTION} exists failed with the following output:\n"
- "${OUTPUT}\n\n")
- endif ()
-endmacro ()
-
-#-----------------------------------------------------------------------------
-# Configure Checks which require Fortran compilation must go in here
-# not in the main ConfigureChecks.cmake files, because if the user has
-# no Fortran compiler, problems arise.
-#
-# Be careful with leading spaces here, do not remove them.
-#-----------------------------------------------------------------------------
-
-# Check for Non-standard extension intrinsic function SIZEOF
-set (${HDF_PREFIX}_FORTRAN_HAVE_SIZEOF FALSE)
-CHECK_FORTRAN_FEATURE(sizeof
+#test code source
+set (SIZEOF_CODE
"
PROGRAM main
i = sizeof(x)
END PROGRAM
"
- ${HDF_PREFIX}_FORTRAN_HAVE_SIZEOF
)
-
-# Check for F2008 standard intrinsic function C_SIZEOF
-set (${HDF_PREFIX}_FORTRAN_HAVE_C_SIZEOF FALSE)
-CHECK_FORTRAN_FEATURE(c_sizeof
+set (C_SIZEOF_CODE
"
PROGRAM main
USE ISO_C_BINDING
@@ -115,11 +64,8 @@ CHECK_FORTRAN_FEATURE(c_sizeof
result = c_sizeof(a)
END PROGRAM
"
- ${HDF_PREFIX}_FORTRAN_HAVE_C_SIZEOF
)
-
-# Check for F2008 standard intrinsic function STORAGE_SIZE
-CHECK_FORTRAN_FEATURE(storage_size
+set (STORAGE_SIZE_CODE
"
PROGRAM main
INTEGER :: a
@@ -127,22 +73,15 @@ CHECK_FORTRAN_FEATURE(storage_size
result = storage_size(a)
END PROGRAM
"
- ${HDF_PREFIX}_FORTRAN_HAVE_STORAGE_SIZE
)
-
-# Check for F2008 standard intrinsic module "ISO_FORTRAN_ENV"
-set (${HDF_PREFIX}_HAVE_ISO_FORTRAN_ENV FALSE)
-CHECK_FORTRAN_FEATURE(ISO_FORTRAN_ENV
+set (ISO_FORTRAN_ENV_CODE
"
PROGRAM main
USE, INTRINSIC :: ISO_FORTRAN_ENV
END PROGRAM
"
- ${HDF_PREFIX}_HAVE_ISO_FORTRAN_ENV
)
-
-set (${HDF_PREFIX}_FORTRAN_DEFAULT_REAL_NOT_DOUBLE FALSE)
-CHECK_FORTRAN_FEATURE(RealIsNotDouble
+set (REALISNOTDOUBLE_CODE
"
MODULE type_mod
INTERFACE h5t
@@ -165,14 +104,8 @@ CHECK_FORTRAN_FEATURE(RealIsNotDouble
CALL h5t(d)
END PROGRAM main
"
- ${HDF_PREFIX}_FORTRAN_DEFAULT_REAL_NOT_DOUBLE
)
-
-#-----------------------------------------------------------------------------
-# Checks if the ISO_C_BINDING module meets all the requirements
-#-----------------------------------------------------------------------------
-set (${HDF_PREFIX}_FORTRAN_HAVE_ISO_C_BINDING FALSE)
-CHECK_FORTRAN_FEATURE(iso_c_binding
+set (ISO_C_BINDING_CODE
"
PROGRAM main
USE iso_c_binding
@@ -184,9 +117,95 @@ CHECK_FORTRAN_FEATURE(iso_c_binding
ptr = C_LOC(ichr(1:1))
END PROGRAM
"
- ${HDF_PREFIX}_FORTRAN_HAVE_ISO_C_BINDING
)
+if (NOT CMAKE_VERSION VERSION_LESS "3.14.0")
+ if (HDF5_REQUIRED_LIBRARIES)
+ set (CMAKE_REQUIRED_LIBRARIES "${HDF5_REQUIRED_LIBRARIES}")
+ endif ()
+ check_fortran_source_compiles (${SIZEOF_CODE} ${HDF_PREFIX}_FORTRAN_HAVE_SIZEOF SRC_EXT f90)
+ check_fortran_source_compiles (${C_SIZEOF_CODE} ${HDF_PREFIX}_FORTRAN_HAVE_C_SIZEOF SRC_EXT f90)
+ check_fortran_source_compiles (${STORAGE_SIZE_CODE} ${HDF_PREFIX}_FORTRAN_HAVE_STORAGE_SIZE SRC_EXT f90)
+ check_fortran_source_compiles (${ISO_FORTRAN_ENV_CODE} ${HDF_PREFIX}_HAVE_ISO_FORTRAN_ENV SRC_EXT f90)
+ check_fortran_source_compiles (${REALISNOTDOUBLE_CODE} ${HDF_PREFIX}_FORTRAN_DEFAULT_REAL_NOT_DOUBLE SRC_EXT f90)
+ check_fortran_source_compiles (${ISO_C_BINDING_CODE} ${HDF_PREFIX}_FORTRAN_HAVE_ISO_C_BINDING SRC_EXT f90)
+else ()
+ #-----------------------------------------------------------------------------
+ # The provided CMake Fortran macros don't provide a general check function
+ # so this one is used for a sizeof test.
+ #-----------------------------------------------------------------------------
+ macro (CHECK_FORTRAN_FEATURE FUNCTION CODE VARIABLE)
+ message (STATUS "Testing Fortran ${FUNCTION}")
+ if (HDF5_REQUIRED_LIBRARIES)
+ set (CHECK_FUNCTION_EXISTS_ADD_LIBRARIES
+ "-DLINK_LIBRARIES:STRING=${HDF5_REQUIRED_LIBRARIES}")
+ else ()
+ set (CHECK_FUNCTION_EXISTS_ADD_LIBRARIES)
+ endif ()
+ file (WRITE
+ ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/testFortranCompiler.f90
+ "${CODE}"
+ )
+ TRY_COMPILE (RESULT_VAR
+ ${CMAKE_BINARY_DIR}
+ ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/testFortranCompiler.f90
+ CMAKE_FLAGS "${CHECK_FUNCTION_EXISTS_ADD_LIBRARIES}"
+ OUTPUT_VARIABLE OUTPUT
+ )
+
+ # message (STATUS "* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ")
+ # message (STATUS "Test result ${OUTPUT}")
+ # message (STATUS "* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ")
+
+ if (${RESULT_VAR})
+ set (${VARIABLE} 1 CACHE INTERNAL "Have Fortran function ${FUNCTION}")
+ message (STATUS "Testing Fortran ${FUNCTION} - OK")
+ file (APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
+ "Determining if the Fortran ${FUNCTION} exists passed with the following output:\n"
+ "${OUTPUT}\n\n"
+ )
+ else ()
+ message (STATUS "Testing Fortran ${FUNCTION} - Fail")
+ set (${VARIABLE} 0 CACHE INTERNAL "Have Fortran function ${FUNCTION}")
+ file (APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
+ "Determining if the Fortran ${FUNCTION} exists failed with the following output:\n"
+ "${OUTPUT}\n\n")
+ endif ()
+ endmacro ()
+
+ #-----------------------------------------------------------------------------
+ # Configure Checks which require Fortran compilation must go in here
+ # not in the main ConfigureChecks.cmake files, because if the user has
+ # no Fortran compiler, problems arise.
+ #
+ # Be careful with leading spaces here, do not remove them.
+ #-----------------------------------------------------------------------------
+
+ # Check for Non-standard extension intrinsic function SIZEOF
+ set (${HDF_PREFIX}_FORTRAN_HAVE_SIZEOF FALSE)
+ CHECK_FORTRAN_FEATURE(sizeof_code ${SIZEOF_CODE} ${HDF_PREFIX}_FORTRAN_HAVE_SIZEOF)
+
+ # Check for F2008 standard intrinsic function C_SIZEOF
+ set (${HDF_PREFIX}_FORTRAN_HAVE_C_SIZEOF FALSE)
+ CHECK_FORTRAN_FEATURE(c_sizeof_code ${C_SIZEOF_CODE} ${HDF_PREFIX}_FORTRAN_HAVE_C_SIZEOF)
+
+ # Check for F2008 standard intrinsic function STORAGE_SIZE
+ CHECK_FORTRAN_FEATURE(storage_size_code ${STORAGE_SIZE_CODE} ${HDF_PREFIX}_FORTRAN_HAVE_STORAGE_SIZE)
+
+ # Check for F2008 standard intrinsic module "ISO_FORTRAN_ENV"
+ set (${HDF_PREFIX}_HAVE_ISO_FORTRAN_ENV FALSE)
+ CHECK_FORTRAN_FEATURE(iso_fortran_env_code ${ISO_FORTRAN_ENV_CODE} ${HDF_PREFIX}_HAVE_ISO_FORTRAN_ENV)
+
+ set (${HDF_PREFIX}_FORTRAN_DEFAULT_REAL_NOT_DOUBLE FALSE)
+ CHECK_FORTRAN_FEATURE(realisnotdouble_code ${REALISNOTDOUBLE_CODE} ${HDF_PREFIX}_FORTRAN_DEFAULT_REAL_NOT_DOUBLE)
+
+ #-----------------------------------------------------------------------------
+ # Checks if the ISO_C_BINDING module meets all the requirements
+ #-----------------------------------------------------------------------------
+ set (${HDF_PREFIX}_FORTRAN_HAVE_ISO_C_BINDING FALSE)
+ CHECK_FORTRAN_FEATURE(iso_c_binding_code ${ISO_C_BINDING_CODE} ${HDF_PREFIX}_FORTRAN_HAVE_ISO_C_BINDING)
+endif ()
+
#-----------------------------------------------------------------------------
# Add debug information (intel Fortran : JB)
#-----------------------------------------------------------------------------
diff --git a/config/cmake_ext_mod/grepTest.cmake b/config/cmake_ext_mod/grepTest.cmake
index c65c951..b011ae8 100644
--- a/config/cmake_ext_mod/grepTest.cmake
+++ b/config/cmake_ext_mod/grepTest.cmake
@@ -87,7 +87,7 @@ if (TEST_ERRREF)
# if the .err file exists grep the error output with the error reference before comparing stdout
if (EXISTS "${TEST_FOLDER}/${TEST_OUTPUT}.err")
file (READ ${TEST_FOLDER}/${TEST_OUTPUT}.err TEST_ERR_STREAM)
- list(LENGTH TEST_ERR_STREAM test_len)
+ list (LENGTH TEST_ERR_STREAM test_len)
if (test_len GREATER 0)
# TEST_ERRREF should always be matched
string (REGEX MATCH "${TEST_ERRREF}" TEST_MATCH ${TEST_ERR_STREAM})
@@ -103,7 +103,7 @@ if (TEST_ERRREF)
if (NOT TEST_SKIP_COMPARE)
if (EXISTS "${TEST_FOLDER}/${TEST_REFERENCE}")
file (READ ${TEST_FOLDER}/${TEST_REFERENCE} TEST_STREAM)
- list(LENGTH TEST_STREAM test_len)
+ list (LENGTH TEST_STREAM test_len)
if (test_len GREATER 0)
if (WIN32 OR MINGW)
configure_file(${TEST_FOLDER}/${TEST_REFERENCE} ${TEST_FOLDER}/${TEST_REFERENCE}.tmp NEWLINE_STYLE CRLF)
@@ -116,7 +116,7 @@ if (TEST_ERRREF)
if (NOT TEST_SORT_COMPARE)
# now compare the output with the reference
execute_process (
- COMMAND ${CMAKE_COMMAND} -E compare_files ${TEST_FOLDER}/${TEST_OUTPUT} ${TEST_FOLDER}/${TEST_REFERENCE}
+ COMMAND ${CMAKE_COMMAND} -E compare_files ${CMAKE_IGNORE_EOL} ${TEST_FOLDER}/${TEST_OUTPUT} ${TEST_FOLDER}/${TEST_REFERENCE}
RESULT_VARIABLE TEST_COMPARE_RESULT
)
else ()
diff --git a/config/cmake_ext_mod/runTest.cmake b/config/cmake_ext_mod/runTest.cmake
index 6440c81..2b8b6b0 100644
--- a/config/cmake_ext_mod/runTest.cmake
+++ b/config/cmake_ext_mod/runTest.cmake
@@ -90,7 +90,7 @@ message (STATUS "COMMAND Result: ${TEST_RESULT}")
# if the .err file exists and ERRROR_APPEND is enabled
if (EXISTS "${TEST_FOLDER}/${TEST_OUTPUT}.err")
file (READ ${TEST_FOLDER}/${TEST_OUTPUT}.err TEST_STREAM)
- list(LENGTH TEST_STREAM test_len)
+ list (LENGTH TEST_STREAM test_len)
if (test_len GREATER 0)
if (TEST_MASK_FILE)
STRING(REGEX REPLACE "CurrentDir is [^\n]+\n" "CurrentDir is (dir name)\n" TEST_STREAM "${TEST_STREAM}")
@@ -163,7 +163,7 @@ endif ()
# if the output file needs Modified text removed
if (TEST_MASK_MOD)
file (READ ${TEST_FOLDER}/${TEST_OUTPUT} TEST_STREAM)
- string (REGEX REPLACE "Modified:[^\n]+\n" "Modified: XXXX-XX-XX XX:XX:XX XXX\n" TEST_STREAM "${TEST_STREAM}")
+ string (REGEX REPLACE "Modified:[^\n]+\n" "Modified: XXXX-XX-XX XX:XX:XX XXX\n" TEST_STREAM "${TEST_STREAM}")
file (WRITE ${TEST_FOLDER}/${TEST_OUTPUT} "${TEST_STREAM}")
endif ()
@@ -210,7 +210,7 @@ set (TEST_COMPARE_RESULT 0)
if (NOT TEST_SKIP_COMPARE)
if (EXISTS "${TEST_FOLDER}/${TEST_REFERENCE}")
file (READ ${TEST_FOLDER}/${TEST_REFERENCE} TEST_STREAM)
- list(LENGTH TEST_STREAM test_len)
+ list (LENGTH TEST_STREAM test_len)
if (test_len GREATER 0)
if (WIN32 OR MINGW)
configure_file(${TEST_FOLDER}/${TEST_REFERENCE} ${TEST_FOLDER}/${TEST_REFERENCE}.tmp NEWLINE_STYLE CRLF)
@@ -224,7 +224,7 @@ if (NOT TEST_SKIP_COMPARE)
if (NOT TEST_SORT_COMPARE)
# now compare the output with the reference
execute_process (
- COMMAND ${CMAKE_COMMAND} -E compare_files ${TEST_FOLDER}/${TEST_OUTPUT} ${TEST_FOLDER}/${TEST_REFERENCE}
+ COMMAND ${CMAKE_COMMAND} -E compare_files ${CMAKE_IGNORE_EOL} ${TEST_FOLDER}/${TEST_OUTPUT} ${TEST_FOLDER}/${TEST_REFERENCE}
RESULT_VARIABLE TEST_COMPARE_RESULT
)
else ()
@@ -281,7 +281,7 @@ if (NOT TEST_SKIP_COMPARE)
set (TEST_ERRREF_RESULT 0)
if (TEST_ERRREF)
file (READ ${TEST_FOLDER}/${TEST_ERRREF} TEST_STREAM)
- list(LENGTH TEST_STREAM test_len)
+ list (LENGTH TEST_STREAM test_len)
if (test_len GREATER 0)
if (WIN32 OR MINGW)
configure_file(${TEST_FOLDER}/${TEST_ERRREF} ${TEST_FOLDER}/${TEST_ERRREF}.tmp NEWLINE_STYLE CRLF)
@@ -294,7 +294,7 @@ if (NOT TEST_SKIP_COMPARE)
# now compare the error output with the error reference
execute_process (
- COMMAND ${CMAKE_COMMAND} -E compare_files ${TEST_FOLDER}/${TEST_OUTPUT}.err ${TEST_FOLDER}/${TEST_ERRREF}
+ COMMAND ${CMAKE_COMMAND} -E compare_files ${CMAKE_IGNORE_EOL} ${TEST_FOLDER}/${TEST_OUTPUT}.err ${TEST_FOLDER}/${TEST_ERRREF}
RESULT_VARIABLE TEST_ERRREF_RESULT
)
if (TEST_ERRREF_RESULT)
@@ -343,7 +343,7 @@ set (TEST_GREP_RESULT 0)
if (TEST_GREP_COMPARE)
# now grep the output with the reference
file (READ ${TEST_FOLDER}/${TEST_OUTPUT} TEST_STREAM)
- list(LENGTH TEST_STREAM test_len)
+ list (LENGTH TEST_STREAM test_len)
if (test_len GREATER 0)
# TEST_REFERENCE should always be matched
string (REGEX MATCH "${TEST_REFERENCE}" TEST_MATCH ${TEST_STREAM})
diff --git a/config/gnu-cxxflags b/config/gnu-cxxflags
index e0f2999..f8a6d8c 100644
--- a/config/gnu-cxxflags
+++ b/config/gnu-cxxflags
@@ -32,7 +32,7 @@ if test X = "X$cxx_flags_set"; then
# containing 'icc version'. The cc_version for icc is correctly determined
# and flags added in the intel-flags script.
cxx_version="`$CXX $CXXFLAGS $H5_CXXFLAGS -v 2>&1 | grep -v 'PathScale' |\
- grep -v 'icc version' |\
+ grep -v '^icc.*version' |\
grep 'gcc version' | sed 's/.*gcc version \([-a-z0-9\.]*\).*/\1/'`"
cxx_vendor=`echo $cxx_version |sed 's/\([a-z]*\).*/\1/'`
cxx_version=`echo $cxx_version |sed 's/[-a-z]//g'`
diff --git a/config/gnu-flags b/config/gnu-flags
index 3ca74c1..11aaa71 100644
--- a/config/gnu-flags
+++ b/config/gnu-flags
@@ -47,7 +47,7 @@ if test "X-" = "X-$cc_flags_set"; then
# containing 'icc version'. The cc_version for icc is correctly determined
# and flags added in the intel-flags script.
cc_version="`$CC $CFLAGS $H5_CFLAGS -v 2>&1 | grep -v 'PathScale' |\
- grep -v 'icc version' |\
+ grep -v '^icc.*version' |\
grep 'gcc version' | sed 's/.*gcc version \([-a-z0-9\.]*\).*/\1/'`"
cc_vendor=`echo $cc_version |sed 's/\([a-z]*\).*/\1/'`
cc_version=`echo $cc_version |sed 's/[-a-z]//g'`
diff --git a/config/sanitizer/sanitizers.cmake b/config/sanitizer/sanitizers.cmake
index 2625ec3..ecee2de 100644
--- a/config/sanitizer/sanitizers.cmake
+++ b/config/sanitizer/sanitizers.cmake
@@ -28,52 +28,53 @@ function(append value)
endforeach(variable)
endfunction()
-if(USE_SANITIZER AND "${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang")
+message(STATUS "USE_SANITIZER=${USE_SANITIZER}, CMAKE_C_COMPILER_ID=${CMAKE_C_COMPILER_ID}")
+if(USE_SANITIZER AND "${CMAKE_C_COMPILER_ID}" MATCHES "Clang")
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
- append("-fno-omit-frame-pointer" CMAKE_C_FLAGS CMAKE_CXX_FLAGS)
+ append("-fno-omit-frame-pointer" CMAKE_C_SANITIZER_FLAGS CMAKE_CXX_SANITIZER_FLAGS)
+ message(STATUS "Building with sanitize, base flags=${CMAKE_C_SANITIZER_FLAGS}")
if(UNIX)
if(uppercase_CMAKE_BUILD_TYPE STREQUAL "DEBUG")
- append("-O1" CMAKE_C_FLAGS CMAKE_CXX_FLAGS)
+ append("-O1" CMAKE_C_SANITIZER_FLAGS CMAKE_CXX_SANITIZER_FLAGS)
endif()
if(USE_SANITIZER MATCHES "([Aa]ddress);([Uu]ndefined)"
OR USE_SANITIZER MATCHES "([Uu]ndefined);([Aa]ddress)")
message(STATUS "Building with Address, Undefined sanitizers")
- append("-fsanitize=address,undefined" CMAKE_C_FLAGS CMAKE_CXX_FLAGS)
+ append("-fsanitize=address,undefined" CMAKE_C_SANITIZER_FLAGS CMAKE_CXX_SANITIZER_FLAGS)
set(MEMCHECK_TYPE AddressSanitizer)
elseif(USE_SANITIZER MATCHES "([Aa]ddress)")
# Optional: -fno-optimize-sibling-calls -fsanitize-address-use-after-scope
message(STATUS "Building with Address sanitizer")
- append("-fsanitize=address" CMAKE_C_FLAGS CMAKE_CXX_FLAGS)
+ append("-fsanitize=address" CMAKE_C_SANITIZER_FLAGS CMAKE_CXX_SANITIZER_FLAGS)
set(MEMCHECK_TYPE AddressSanitizer)
elseif(USE_SANITIZER MATCHES "([Mm]emory([Ww]ith[Oo]rigins)?)")
# Optional: -fno-optimize-sibling-calls -fsanitize-memory-track-origins=2
- append("-fsanitize=memory" CMAKE_C_FLAGS CMAKE_CXX_FLAGS)
+ append("-fsanitize=memory" CMAKE_C_SANITIZER_FLAGS CMAKE_CXX_SANITIZER_FLAGS)
if(USE_SANITIZER MATCHES "([Mm]emory[Ww]ith[Oo]rigins)")
message(STATUS "Building with MemoryWithOrigins sanitizer")
- append("-fsanitize-memory-track-origins" CMAKE_C_FLAGS CMAKE_CXX_FLAGS)
+ append("-fsanitize-memory-track-origins" CMAKE_C_SANITIZER_FLAGS CMAKE_CXX_SANITIZER_FLAGS)
else()
message(STATUS "Building with Memory sanitizer")
endif()
set(MEMCHECK_TYPE MemorySanitizer)
elseif(USE_SANITIZER MATCHES "([Uu]ndefined)")
message(STATUS "Building with Undefined sanitizer")
- append("-fsanitize=undefined" CMAKE_C_FLAGS CMAKE_CXX_FLAGS)
+ append("-fsanitize=undefined" CMAKE_C_SANITIZER_FLAGS CMAKE_CXX_SANITIZER_FLAGS)
if(EXISTS "${BLACKLIST_FILE}")
- append("-fsanitize-blacklist=${BLACKLIST_FILE}" CMAKE_C_FLAGS
- CMAKE_CXX_FLAGS)
+ append("-fsanitize-blacklist=${BLACKLIST_FILE}" CMAKE_C_SANITIZER_FLAGS CMAKE_CXX_SANITIZER_FLAGS)
endif()
set(MEMCHECK_TYPE UndefinedBehaviorSanitizer)
elseif(USE_SANITIZER MATCHES "([Tt]hread)")
message(STATUS "Building with Thread sanitizer")
- append("-fsanitize=thread" CMAKE_C_FLAGS CMAKE_CXX_FLAGS)
+ append("-fsanitize=thread" CMAKE_C_SANITIZER_FLAGS CMAKE_CXX_SANITIZER_FLAGS)
set(MEMCHECK_TYPE ThreadSanitizer)
elseif(USE_SANITIZER MATCHES "([Ll]eak)")
message(STATUS "Building with Leak sanitizer")
- append("-fsanitize=leak" CMAKE_C_FLAGS CMAKE_CXX_FLAGS)
+ append("-fsanitize=leak" CMAKE_C_SANITIZER_FLAGS CMAKE_CXX_SANITIZER_FLAGS)
set(MEMCHECK_TYPE LeakSanitizer)
else()
message(
@@ -82,7 +83,7 @@ if(USE_SANITIZER AND "${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang")
elseif(MSVC)
if(USE_SANITIZER MATCHES "([Aa]ddress)")
message(STATUS "Building with Address sanitizer")
- append("-fsanitize=address" CMAKE_C_FLAGS CMAKE_CXX_FLAGS)
+ append("-fsanitize=address" CMAKE_C_SANITIZER_FLAGS CMAKE_CXX_SANITIZER_FLAGS)
else()
message(
FATAL_ERROR
diff --git a/doc/code-conventions.md b/doc/code-conventions.md
new file mode 100644
index 0000000..ff3b4cf
--- /dev/null
+++ b/doc/code-conventions.md
@@ -0,0 +1,57 @@
+# HDF5 Library Code Conventions
+
+This document describes some practices that are new, or newly
+documented, starting in 2020.
+
+## Function / Variable Attributes
+
+In H5private.h, the library provides platform-independent macros
+for qualifying function and variable definitions.
+
+### Functions that accept `printf(3)` and `scanf(3)` format strings
+
+Label functions that accept a `printf(3)`-compliant format string with
+`H5_ATTR_FORMAT(printf,format_argno,variadic_argno)`, where
+the format string is the `format_argno`th argument (counting from 1)
+and the variadic arguments start with the `variadic_argno`th.
+
+Functions that accept a `scanf(3)`-compliant format string should
+be labeled `H5_ATTR_FORMAT(scanf,format_argno,variadic_argno)`.
+
+### Functions that do never return
+
+The definition of a function that always causes the program to abort and hang
+should be labeled `H5_ATTR_NORETURN` to help the compiler see which flows of
+control are infeasible.
+
+### Other attributes
+
+**TBD**
+
+### Unused variables and parameters
+
+Compilers will warn about unused parameters and variables—developers should pay
+attention to those warnings and make an effort to prevent them.
+
+Some function parameters and variables are unused in *all* configurations of
+the project. Ordinarily, such parameters and variables should be deleted.
+However, sometimes it is possible to foresee a parameter being used, or
+removing it would change an API, or a parameter has to be defined to conform a
+function to some function pointer type. In those cases, it's permissible to
+mark a symbol `H5_ATTR_UNUSED`.
+
+Other parameters and variables are unused in *some* configurations of the
+project, but not all. A symbol may fall into disuse in some configuration in
+the future—then the compiler should warn, and the symbol should not be
+defined—so developers should try to label a sometimes-unused symbol with an
+attribute that's specific to the configurations where the symbol is (or is not)
+expected to be used. The library provides the following attributes for that
+purpose:
+
+* `H5_ATTR_DEPRECATED_USED`: used only if deprecated symbols are enabled
+* `H5_ATTR_NDEBUG_UNUSED`: used only if `NDEBUG` is *not* \#defined
+* `H5_ATTR_DEBUG_API_USED`: used if the debug API is enabled
+* `H5_ATTR_PARALLEL_UNUSED`: used only if Parallel HDF5 *is not* configured
+* `H5_ATTR_PARALLEL_USED`: used only if Parallel HDF5 *is* configured
+
+Some attributes may be phased in or phased out in the future.
diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt
index 89cafc8..1bcbbf2 100644
--- a/examples/CMakeLists.txt
+++ b/examples/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required (VERSION 3.10)
+cmake_minimum_required (VERSION 3.12)
project (HDF5_EXAMPLES C)
#-----------------------------------------------------------------------------
diff --git a/fortran/CMakeLists.txt b/fortran/CMakeLists.txt
index 31edad2..7b90d83 100644
--- a/fortran/CMakeLists.txt
+++ b/fortran/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required (VERSION 3.10)
+cmake_minimum_required (VERSION 3.12)
project (HDF5_F90 C Fortran)
if (H5_HAVE_PARALLEL)
diff --git a/fortran/examples/CMakeLists.txt b/fortran/examples/CMakeLists.txt
index be98963..aa702ff 100644
--- a/fortran/examples/CMakeLists.txt
+++ b/fortran/examples/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required (VERSION 3.10)
+cmake_minimum_required (VERSION 3.12)
project (HDF5_F90_EXAMPLES C Fortran)
# --------------------------------------------------------------------
# Notes: When creating examples they should be prefixed
diff --git a/fortran/src/CMakeLists.txt b/fortran/src/CMakeLists.txt
index b380340..b5d1a60 100644
--- a/fortran/src/CMakeLists.txt
+++ b/fortran/src/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required (VERSION 3.10)
+cmake_minimum_required (VERSION 3.12)
project (HDF5_F90_SRC C Fortran)
#-----------------------------------------------------------------------------
@@ -80,13 +80,25 @@ add_executable (H5match_types
${HDF5_F90_SRC_SOURCE_DIR}/H5match_types.c
)
target_include_directories (H5match_types PRIVATE "${HDF5_BINARY_DIR};${HDF5_SRC_DIR};${HDF5_F90_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>")
+
+add_custom_command (
+ OUTPUT ${HDF5_F90_BINARY_DIR}/H5f90i_gen.h
+ ${HDF5_F90_BINARY_DIR}/H5fortran_types.F90
+ COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:H5match_types>
+ WORKING_DIRECTORY ${HDF5_F90_BINARY_DIR}
+ DEPENDS H5match_types
+)
+
if (NOT ONLY_SHARED_LIBS)
add_custom_command (
OUTPUT ${HDF5_F90_BINARY_DIR}/static/H5f90i_gen.h
${HDF5_F90_BINARY_DIR}/static/H5fortran_types.F90
- COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:H5match_types>
+ COMMAND ${CMAKE_COMMAND}
+ ARGS -E copy_if_different "${HDF5_F90_BINARY_DIR}/H5f90i_gen.h" "${HDF5_F90_BINARY_DIR}/static/H5f90i_gen.h"
+ COMMAND ${CMAKE_COMMAND}
+ ARGS -E copy_if_different "${HDF5_F90_BINARY_DIR}/H5fortran_types.F90" "${HDF5_F90_BINARY_DIR}/static/H5fortran_types.F90"
WORKING_DIRECTORY ${HDF5_F90_BINARY_DIR}/static
- DEPENDS H5match_types
+ DEPENDS ${HDF5_F90_BINARY_DIR}/H5f90i_gen.h
)
set_source_files_properties (${HDF5_F90_BINARY_DIR}/static/H5f90i_gen.h PROPERTIES GENERATED TRUE)
set_source_files_properties (${HDF5_F90_BINARY_DIR}/static/H5fortran_types.F90 PROPERTIES GENERATED TRUE)
@@ -95,9 +107,12 @@ if (BUILD_SHARED_LIBS)
add_custom_command (
OUTPUT ${HDF5_F90_BINARY_DIR}/shared/H5f90i_gen.h
${HDF5_F90_BINARY_DIR}/shared/H5fortran_types.F90
- COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:H5match_types>
+ COMMAND ${CMAKE_COMMAND}
+ ARGS -E copy_if_different "${HDF5_F90_BINARY_DIR}/H5f90i_gen.h" "${HDF5_F90_BINARY_DIR}/shared/H5f90i_gen.h"
+ COMMAND ${CMAKE_COMMAND}
+ ARGS -E copy_if_different "${HDF5_F90_BINARY_DIR}/H5fortran_types.F90" "${HDF5_F90_BINARY_DIR}/shared/H5fortran_types.F90"
WORKING_DIRECTORY ${HDF5_F90_BINARY_DIR}/shared
- DEPENDS H5match_types
+ DEPENDS ${HDF5_F90_BINARY_DIR}/H5f90i_gen.h
)
set_source_files_properties (${HDF5_F90_BINARY_DIR}/shared/H5f90i_gen.h PROPERTIES GENERATED TRUE)
set_source_files_properties (${HDF5_F90_BINARY_DIR}/shared/H5fortran_types.F90 PROPERTIES GENERATED TRUE)
@@ -180,12 +195,20 @@ set (f90_F_GEN_SOURCES
${HDF5_F90_SRC_SOURCE_DIR}/H5Dff.F90
${HDF5_F90_SRC_SOURCE_DIR}/H5Pff.F90
)
+add_custom_command (
+ OUTPUT ${HDF5_F90_BINARY_DIR}/H5_gen.F90
+ COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:H5_buildiface>
+ WORKING_DIRECTORY ${HDF5_F90_BINARY_DIR}
+ DEPENDS ${f90_F_GEN_SOURCES}
+ COMMENT "Generating the H5_gen.F90 file"
+)
if (NOT ONLY_SHARED_LIBS)
add_custom_command (
OUTPUT ${HDF5_F90_BINARY_DIR}/static/H5_gen.F90
- COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:H5_buildiface>
+ COMMAND ${CMAKE_COMMAND}
+ ARGS -E copy_if_different "${HDF5_F90_BINARY_DIR}/H5_gen.F90" "${HDF5_F90_BINARY_DIR}/static/H5_gen.F90"
WORKING_DIRECTORY ${HDF5_F90_BINARY_DIR}/static
- DEPENDS ${f90_F_GEN_SOURCES}
+ DEPENDS ${HDF5_F90_BINARY_DIR}/H5_gen.F90
COMMENT "Generating the H5_gen.F90 file"
)
add_custom_target (H5gen ALL
@@ -197,9 +220,10 @@ endif ()
if (BUILD_SHARED_LIBS)
add_custom_command (
OUTPUT ${HDF5_F90_BINARY_DIR}/shared/H5_gen.F90
- COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:H5_buildiface>
+ COMMAND ${CMAKE_COMMAND}
+ ARGS -E copy_if_different "${HDF5_F90_BINARY_DIR}/H5_gen.F90" "${HDF5_F90_BINARY_DIR}/shared/H5_gen.F90"
WORKING_DIRECTORY ${HDF5_F90_BINARY_DIR}/shared
- DEPENDS ${f90_F_GEN_SOURCES}
+ DEPENDS ${HDF5_F90_BINARY_DIR}/H5_gen.F90
COMMENT "Generating the H5_gen.F90 shared file"
)
add_custom_target (H5genSH ALL
diff --git a/fortran/src/H5Fff.F90 b/fortran/src/H5Fff.F90
index 8574c06..62e8de8 100644
--- a/fortran/src/H5Fff.F90
+++ b/fortran/src/H5Fff.F90
@@ -967,7 +967,7 @@ CONTAINS
INTEGER(HID_T) , INTENT(IN) :: file_id
TYPE(C_PTR) , VALUE :: buf_ptr
INTEGER(SIZE_T), INTENT(IN) :: buf_len
- INTEGER(SIZE_T), INTENT(IN) :: buf_size
+ INTEGER(SIZE_T), INTENT(OUT) :: buf_size
END FUNCTION h5fget_file_image_c
END INTERFACE
diff --git a/fortran/src/H5Pf.c b/fortran/src/H5Pf.c
index 2cacc8c..a931903 100644
--- a/fortran/src/H5Pf.c
+++ b/fortran/src/H5Pf.c
@@ -4061,46 +4061,6 @@ h5pget_attr_creation_order_c(hid_t_f *ocpl_id, int_f *crt_order_flags)
ret_value = 0;
return ret_value;
}
-/****if* H5Pf/h5pset_libver_bounds_c
- * NAME
- * h5pset_libver_bounds_c
- * PURPOSE
- * Calls H5Pset_libver_bounds
- *
- * INPUTS
- *
- * fapl_id - File access property list identifier
- * low - The earliest version of the library that will be used for writing objects.
- * high - The latest version of the library that will be used for writing objects.
- * OUTPUTS
- *
- *
- * RETURNS
- * 0 on success, -1 on failure
- * AUTHOR
- * M. Scot Breitenfeld
- * February 18, 2008
- * HISTORY
- *
- * SOURCE
-*/
-int_f
-h5pset_libver_bounds_c(hid_t_f *fapl_id, int_f *low, int_f *high )
-/******/
-{
- int ret_value = -1;
- herr_t ret;
-
- /*
- * Call H5Pset_libver_bounds function.
- */
- ret = H5Pset_libver_bounds( (hid_t)*fapl_id, (H5F_libver_t)*low, (H5F_libver_t)*high );
- if (ret < 0) return ret_value;
-
- ret_value = 0;
- return ret_value;
-}
-
/****if* H5Pf/h5pset_link_creation_order_c
* NAME
* h5pset_link_creation_order_c
diff --git a/fortran/src/H5Pff.F90 b/fortran/src/H5Pff.F90
index 0c0500d..61d30b8 100644
--- a/fortran/src/H5Pff.F90
+++ b/fortran/src/H5Pff.F90
@@ -4754,6 +4754,65 @@ CONTAINS
END SUBROUTINE h5pget_attr_creation_order_f
+!****s* H5P/H5Pget_libver_bounds_f
+! NAME
+! H5Pget_libver_bounds_f
+!
+! PURPOSE
+! Retrieves the lower and upper bounds on the HDF5 library release versions that indirectly
+! determine the object format versions used when creating objects in the file.
+!
+! INPUTS
+!
+! fapl_id - File access property list identifier
+! low - The earliest version of the library that will be used for writing objects.
+! high - The latest version of the library that will be used for writing objects.
+!
+! OUTPUTS
+!
+! hdferr - error code
+! Success: 0
+! Failure: -1
+!
+! AUTHOR
+! M. Scot Breitenfeld
+! February 10, 2020
+!
+! Fortran Interface:
+ SUBROUTINE h5pget_libver_bounds_f(fapl_id, low, high, hdferr)
+ IMPLICIT NONE
+ INTEGER(HID_T), INTENT(IN) :: fapl_id ! File access property list identifier
+ INTEGER, INTENT(OUT) :: low ! The earliest version of the library that will be used for writing objects.
+ INTEGER, INTENT(OUT) :: high ! The latest version of the library that will be used for writing objects.
+ INTEGER, INTENT(OUT) :: hdferr ! Error code: 0 on success and -1 on failure
+!*****
+! Local variables
+ INTEGER(ENUM_T) :: low_c, high_c
+ INTEGER(C_INT) :: hdferr_c
+!
+! MS FORTRAN needs explicit interface for C functions called here.
+!
+ INTERFACE
+ INTEGER(C_INT) FUNCTION h5pget_libver_bounds(fapl_id, low, high) &
+ BIND(C,NAME='H5Pget_libver_bounds')
+ IMPORT :: C_INT, HID_T, ENUM_T
+ IMPLICIT NONE
+ INTEGER(HID_T) , INTENT(IN) , VALUE :: fapl_id
+ INTEGER(ENUM_T), INTENT(OUT) :: low
+ INTEGER(ENUM_T), INTENT(OUT) :: high
+ END FUNCTION h5pget_libver_bounds
+ END INTERFACE
+
+ hdferr_c = H5Pget_libver_bounds(fapl_id, low_c, high_c)
+
+ low = INT(low_c)
+ high = INT(high_c)
+
+ hdferr = 0
+ IF(hdferr_c.LT.0) hdferr = -1
+
+ END SUBROUTINE h5pget_libver_bounds_f
+
!****s* H5P/H5Pset_libver_bounds_f
! NAME
! H5Pset_libver_bounds_f
@@ -4781,32 +4840,30 @@ CONTAINS
SUBROUTINE h5pset_libver_bounds_f(fapl_id, low, high, hdferr)
IMPLICIT NONE
INTEGER(HID_T), INTENT(IN) :: fapl_id ! File access property list identifier
- INTEGER, INTENT(IN) :: low ! The earliest version of the library that will be used for writing objects.
- ! Currently, low must be one of two pre-defined values:
- ! HDF_LIBVER_EARLIEST_F
- ! HDF_LIBVER_LATEST_F
- INTEGER, INTENT(IN) :: high ! The latest version of the library that will be used for writing objects.
- ! Currently, low must set to the pre-defined value:
- ! HDF_LIBVER_LATEST_F
- INTEGER, INTENT(OUT) :: hdferr ! Error code
- ! 0 on success and -1 on failure
-!*****
+ INTEGER, INTENT(IN) :: low ! The earliest version of the library that will be used for writing objects.
+ INTEGER, INTENT(IN) :: high ! The latest version of the library that will be used for writing objects.
+ INTEGER, INTENT(OUT) :: hdferr ! Error code: 0 on success and -1 on failure
+!*****
+! Local variables
+ INTEGER(C_INT) :: hdferr_c
!
! MS FORTRAN needs explicit interface for C functions called here.
!
INTERFACE
- INTEGER FUNCTION h5pset_libver_bounds_c(fapl_id, low, high) &
- BIND(C,NAME='h5pset_libver_bounds_c')
- IMPORT :: HID_T
+ INTEGER(C_INT) FUNCTION h5pset_libver_bounds(fapl_id, low, high) &
+ BIND(C,NAME='H5Pset_libver_bounds')
+ IMPORT :: C_INT, HID_T, ENUM_T
IMPLICIT NONE
- INTEGER(HID_T), INTENT(IN) :: fapl_id
- INTEGER, INTENT(IN) :: low
- INTEGER, INTENT(IN) :: high
-
- END FUNCTION H5pset_libver_bounds_c
+ INTEGER(HID_T), INTENT(IN), VALUE :: fapl_id
+ INTEGER(ENUM_T), INTENT(IN), VALUE :: low
+ INTEGER(ENUM_T), INTENT(IN), VALUE :: high
+ END FUNCTION h5pset_libver_bounds
END INTERFACE
- hdferr = h5pset_libver_bounds_c(fapl_id, low, high)
+ hdferr_c = h5pset_libver_bounds(fapl_id, INT(low, ENUM_T), INT(high, ENUM_T))
+
+ hdferr = 0
+ IF(hdferr_c.LT.0) hdferr = -1
END SUBROUTINE h5pset_libver_bounds_f
diff --git a/fortran/src/H5_f.c b/fortran/src/H5_f.c
index 132da7b..ced5049 100644
--- a/fortran/src/H5_f.c
+++ b/fortran/src/H5_f.c
@@ -441,7 +441,13 @@ h5init_flags_c( int_f *h5d_flags, size_t_f *h5d_size_flags,
h5f_flags[15] = (int_f)H5F_OBJ_ALL;
h5f_flags[16] = (int_f)H5F_LIBVER_EARLIEST;
h5f_flags[17] = (int_f)H5F_LIBVER_LATEST;
- h5f_flags[18] = (int_f)H5F_UNLIMITED;
+ h5f_flags[18] = (int_f)H5F_LIBVER_ERROR;
+ h5f_flags[19] = (int_f)H5F_LIBVER_NBOUNDS;
+ h5f_flags[20] = (int_f)H5F_UNLIMITED;
+ h5f_flags[21] = (int_f)H5F_LIBVER_V18;
+ h5f_flags[22] = (int_f)H5F_LIBVER_V110;
+ h5f_flags[23] = (int_f)H5F_LIBVER_V112;
+ h5f_flags[24] = (int_f)H5F_LIBVER_V114;
/*
* H5FD flags
diff --git a/fortran/src/H5_ff.F90 b/fortran/src/H5_ff.F90
index 443be79..7c7c751 100644
--- a/fortran/src/H5_ff.F90
+++ b/fortran/src/H5_ff.F90
@@ -46,7 +46,7 @@ MODULE H5LIB
!
! H5F flags declaration
!
- INTEGER, PARAMETER :: H5F_FLAGS_LEN = 19
+ INTEGER, PARAMETER :: H5F_FLAGS_LEN = 25
INTEGER, DIMENSION(1:H5F_FLAGS_LEN) :: H5F_flags
!
! H5generic flags declaration
@@ -343,7 +343,13 @@ CONTAINS
H5F_OBJ_ALL_F = H5F_flags(16)
H5F_LIBVER_EARLIEST_F = H5F_flags(17)
H5F_LIBVER_LATEST_F = H5F_flags(18)
- H5F_UNLIMITED_F = H5F_flags(19)
+ H5F_LIBVER_ERROR_F = H5F_flags(19)
+ H5F_LIBVER_NBOUNDS_F = H5F_flags(20)
+ H5F_UNLIMITED_F = H5F_flags(21)
+ H5F_LIBVER_V18_F = H5F_flags(22)
+ H5F_LIBVER_V110_F = H5F_flags(23)
+ H5F_LIBVER_V112_F = H5F_flags(24)
+ H5F_LIBVER_V114_F = H5F_flags(25)
!
! H5generic flags
!
diff --git a/fortran/src/H5f90global.F90 b/fortran/src/H5f90global.F90
index dabc0bb..6b601e9 100644
--- a/fortran/src/H5f90global.F90
+++ b/fortran/src/H5f90global.F90
@@ -237,6 +237,12 @@ MODULE H5GLOBAL
!DEC$ATTRIBUTES DLLEXPORT :: H5F_LIBVER_EARLIEST_F
!DEC$ATTRIBUTES DLLEXPORT :: H5F_LIBVER_LATEST_F
!DEC$ATTRIBUTES DLLEXPORT :: H5F_UNLIMITED_F
+ !DEC$ATTRIBUTES DLLEXPORT :: H5F_LIBVER_ERROR_F
+ !DEC$ATTRIBUTES DLLEXPORT :: H5F_LIBVER_NBOUNDS_F
+ !DEC$ATTRIBUTES DLLEXPORT :: H5F_LIBVER_V18_F
+ !DEC$ATTRIBUTES DLLEXPORT :: H5F_LIBVER_V110_F
+ !DEC$ATTRIBUTES DLLEXPORT :: H5F_LIBVER_V112_F
+ !DEC$ATTRIBUTES DLLEXPORT :: H5F_LIBVER_V114_F
!DEC$endif
INTEGER :: H5F_ACC_RDWR_F
@@ -258,6 +264,12 @@ MODULE H5GLOBAL
INTEGER :: H5F_LIBVER_EARLIEST_F
INTEGER :: H5F_LIBVER_LATEST_F
INTEGER :: H5F_UNLIMITED_F
+ INTEGER :: H5F_LIBVER_ERROR_F
+ INTEGER :: H5F_LIBVER_NBOUNDS_F
+ INTEGER :: H5F_LIBVER_V18_F
+ INTEGER :: H5F_LIBVER_V110_F
+ INTEGER :: H5F_LIBVER_V112_F
+ INTEGER :: H5F_LIBVER_V114_F
!
! H5G flags declaration
!
diff --git a/fortran/src/H5f90proto.h b/fortran/src/H5f90proto.h
index e6f5dd4..fe616d3 100644
--- a/fortran/src/H5f90proto.h
+++ b/fortran/src/H5f90proto.h
@@ -454,7 +454,6 @@ H5_FCDLL int_f h5pset_attr_creation_order_c(hid_t_f *ocpl_id, int_f *crt_order_f
H5_FCDLL int_f h5pset_shared_mesg_nindexes_c(hid_t_f *plist_id, int_f *nindexes );
H5_FCDLL int_f h5pset_shared_mesg_index_c(hid_t_f *fcpl_id, int_f *index_num, int_f *mesg_type_flags, int_f *min_mesg_size);
H5_FCDLL int_f h5pget_attr_creation_order_c(hid_t_f *ocpl_id, int_f *crt_order_flags);
-H5_FCDLL int_f h5pset_libver_bounds_c(hid_t_f *fapl_id, int_f *low, int_f *high);
H5_FCDLL int_f h5pset_link_creation_order_c(hid_t_f *gcpl_id, int_f *crt_order_flags);
H5_FCDLL int_f h5pget_link_phase_change_c(hid_t_f *gcpl_id, int_f *max_compact, int_f *min_dense );
H5_FCDLL int_f h5pget_obj_track_times_c(hid_t_f *plist_id, int_f *flag);
diff --git a/fortran/src/hdf5_fortrandll.def.in b/fortran/src/hdf5_fortrandll.def.in
index c792232..9c69e5a 100644
--- a/fortran/src/hdf5_fortrandll.def.in
+++ b/fortran/src/hdf5_fortrandll.def.in
@@ -288,6 +288,7 @@ H5P_mp_H5PSET_ATTR_CREATION_ORDER_F
H5P_mp_H5PSET_SHARED_MESG_NINDEXES_F
H5P_mp_H5PSET_SHARED_MESG_INDEX_F
H5P_mp_H5PGET_ATTR_CREATION_ORDER_F
+H5P_mp_H5PGET_LIBVER_BOUNDS_F
H5P_mp_H5PSET_LIBVER_BOUNDS_F
H5P_mp_H5PSET_LINK_CREATION_ORDER_F
H5P_mp_H5PGET_LINK_PHASE_CHANGE_F
diff --git a/fortran/test/CMakeLists.txt b/fortran/test/CMakeLists.txt
index a3cc552..5657323 100644
--- a/fortran/test/CMakeLists.txt
+++ b/fortran/test/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required (VERSION 3.10)
+cmake_minimum_required (VERSION 3.12)
project (HDF5_FORTRAN_TESTS C Fortran)
#-----------------------------------------------------------------------------
diff --git a/fortran/test/tH5P_F03.F90 b/fortran/test/tH5P_F03.F90
index b44540b..083c312 100644
--- a/fortran/test/tH5P_F03.F90
+++ b/fortran/test/tH5P_F03.F90
@@ -112,6 +112,7 @@ SUBROUTINE test_create(total_error)
INTEGER :: ifill
REAL :: rfill
REAL(KIND=dp) :: dpfill
+ INTEGER :: low, high
!
! * Create a file.
@@ -205,11 +206,48 @@ SUBROUTINE test_create(total_error)
CALL check("h5fclose_f", error, total_error)
! Open the file and get the dataset fill value from each dataset
- CALL H5Pcreate_f(H5P_FILE_ACCESS_F, fapl, error)
- CALL check("H5Pcreate_f",error, total_error)
+ CALL h5pcreate_f(H5P_FILE_ACCESS_F, fapl, error)
+ CALL check("h5pcreate_f",error, total_error)
+
+ CALL h5pset_libver_bounds_f(fapl, H5F_LIBVER_V18_F, H5F_LIBVER_V18_F, error)
+ CALL check("h5pset_libver_bounds_f",error, total_error)
+ CALL h5pget_libver_bounds_f(fapl, low, high, error)
+ CALL check("h5pget_libver_bounds_f",error, total_error)
+ CALL VERIFY("***ERROR: Returned wrong low libver_bounds", low, H5F_LIBVER_V18_F, total_error)
+ CALL VERIFY("***ERROR: Returned wrong high libver_bounds", high, H5F_LIBVER_V18_F, total_error)
+
+ CALL h5pset_libver_bounds_f(fapl, H5F_LIBVER_V18_F, H5F_LIBVER_V110_F, error)
+ CALL check("h5pset_libver_bounds_f",error, total_error)
+ CALL h5pget_libver_bounds_f(fapl, low, high, error)
+ CALL check("h5pget_libver_bounds_f",error, total_error)
+ CALL VERIFY("***ERROR: Returned wrong low libver_bounds", low, H5F_LIBVER_V18_F, total_error)
+ CALL VERIFY("***ERROR: Returned wrong high libver_bounds", high, H5F_LIBVER_V110_F, total_error)
+
+ CALL h5pset_libver_bounds_f(fapl, H5F_LIBVER_V112_F, H5F_LIBVER_V112_F, error)
+ CALL check("h5pset_libver_bounds_f",error, total_error)
+ CALL h5pget_libver_bounds_f(fapl, low, high, error)
+ CALL check("h5pget_libver_bounds_f",error, total_error)
+ CALL VERIFY("***ERROR: Returned wrong low libver_bounds", low, H5F_LIBVER_V112_F, total_error)
+ CALL VERIFY("***ERROR: Returned wrong high libver_bounds", high, H5F_LIBVER_V112_F, total_error)
+
+ CALL h5pset_libver_bounds_f(fapl, H5F_LIBVER_V114_F, H5F_LIBVER_V114_F, error)
+ CALL check("h5pset_libver_bounds_f",error, total_error)
+ CALL h5pget_libver_bounds_f(fapl, low, high, error)
+ CALL check("h5pget_libver_bounds_f",error, total_error)
+ CALL VERIFY("***ERROR: Returned wrong low libver_bounds", low, H5F_LIBVER_V114_F, total_error)
+ CALL VERIFY("***ERROR: Returned wrong high libver_bounds", high, H5F_LIBVER_V114_F, total_error)
CALL H5Pset_libver_bounds_f(fapl, H5F_LIBVER_LATEST_F, H5F_LIBVER_LATEST_F, error)
CALL check("H5Pset_libver_bounds_f",error, total_error)
+ CALL h5pget_libver_bounds_f(fapl, low, high, error)
+ CALL check("h5pget_libver_bounds_f",error, total_error)
+ CALL VERIFY("***ERROR: Returned wrong low libver_bounds", low, H5F_LIBVER_LATEST_F, total_error)
+ CALL VERIFY("***ERROR: Returned wrong high libver_bounds", high, H5F_LIBVER_LATEST_F, total_error)
+ IF(H5F_LIBVER_LATEST_F.GE.H5F_LIBVER_NBOUNDS_F)THEN
+ WRITE(*,'(A,I0,A,I0,A)') &
+ "***ERROR: H5F_LIBVER_LATEST_F (",H5F_LIBVER_LATEST_F,") .GE. H5F_LIBVER_NBOUNDS_F (",H5F_LIBVER_NBOUNDS_F,")"
+ total_error = total_error + 1
+ ENDIF
CALL h5fopen_f (FILENAME, H5F_ACC_RDONLY_F, file, error, fapl)
CALL check("h5fopen_f", error, total_error)
diff --git a/fortran/testpar/CMakeLists.txt b/fortran/testpar/CMakeLists.txt
index 1f8dbb4..5c80fd6 100644
--- a/fortran/testpar/CMakeLists.txt
+++ b/fortran/testpar/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required (VERSION 3.10)
+cmake_minimum_required (VERSION 3.12)
project (HDF5_FORTRAN_TESTPAR C Fortran)
#-----------------------------------------------------------------------------
diff --git a/hl/CMakeLists.txt b/hl/CMakeLists.txt
index bef034c..70c458d 100644
--- a/hl/CMakeLists.txt
+++ b/hl/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required (VERSION 3.10)
+cmake_minimum_required (VERSION 3.12)
project (HDF5_HL C)
#-----------------------------------------------------------------------------
diff --git a/hl/c++/CMakeLists.txt b/hl/c++/CMakeLists.txt
index a62d9d4..4e55078 100644
--- a/hl/c++/CMakeLists.txt
+++ b/hl/c++/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required (VERSION 3.10)
+cmake_minimum_required (VERSION 3.12)
project (HDF5_HL_CPP CXX)
#-----------------------------------------------------------------------------
diff --git a/hl/c++/examples/CMakeLists.txt b/hl/c++/examples/CMakeLists.txt
index 4bd4807..22c9973 100644
--- a/hl/c++/examples/CMakeLists.txt
+++ b/hl/c++/examples/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required (VERSION 3.10)
+cmake_minimum_required (VERSION 3.12)
project (HDF5_HL_CPP_EXAMPLES CXX)
# --------------------------------------------------------------------
diff --git a/hl/c++/src/CMakeLists.txt b/hl/c++/src/CMakeLists.txt
index 9964160..866f372 100644
--- a/hl/c++/src/CMakeLists.txt
+++ b/hl/c++/src/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required (VERSION 3.10)
+cmake_minimum_required (VERSION 3.12)
project (HDF5_HL_CPP_SRC CXX)
#-----------------------------------------------------------------------------
diff --git a/hl/c++/test/CMakeLists.txt b/hl/c++/test/CMakeLists.txt
index 429e5c7..9bf32ef 100644
--- a/hl/c++/test/CMakeLists.txt
+++ b/hl/c++/test/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required (VERSION 3.10)
+cmake_minimum_required (VERSION 3.12)
project (HDF5_HL_CPP_TEST CXX)
add_executable (hl_ptableTest ${HDF5_HL_CPP_TEST_SOURCE_DIR}/ptableTest.cpp)
diff --git a/hl/examples/CMakeLists.txt b/hl/examples/CMakeLists.txt
index 44115e5..1707ae9 100644
--- a/hl/examples/CMakeLists.txt
+++ b/hl/examples/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required (VERSION 3.10)
+cmake_minimum_required (VERSION 3.12)
project (HDF5_HL_EXAMPLES C)
#-----------------------------------------------------------------------------
diff --git a/hl/fortran/CMakeLists.txt b/hl/fortran/CMakeLists.txt
index 3c82574..70da026 100644
--- a/hl/fortran/CMakeLists.txt
+++ b/hl/fortran/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required (VERSION 3.10)
+cmake_minimum_required (VERSION 3.12)
project (HDF5_HL_F90 C Fortran)
#-----------------------------------------------------------------------------
diff --git a/hl/fortran/examples/CMakeLists.txt b/hl/fortran/examples/CMakeLists.txt
index 449194e..265d8db 100644
--- a/hl/fortran/examples/CMakeLists.txt
+++ b/hl/fortran/examples/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required (VERSION 3.10)
+cmake_minimum_required (VERSION 3.12)
project (HDF5_HL_F90_EXAMPLES C Fortran)
set (examples
diff --git a/hl/fortran/src/CMakeLists.txt b/hl/fortran/src/CMakeLists.txt
index 91ec669..d4979ba 100644
--- a/hl/fortran/src/CMakeLists.txt
+++ b/hl/fortran/src/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required (VERSION 3.10)
+cmake_minimum_required (VERSION 3.12)
project (HDF5_HL_F90_SRC C Fortran)
#-----------------------------------------------------------------------------
diff --git a/hl/fortran/test/CMakeLists.txt b/hl/fortran/test/CMakeLists.txt
index 369692d..269cefb 100644
--- a/hl/fortran/test/CMakeLists.txt
+++ b/hl/fortran/test/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required (VERSION 3.10)
+cmake_minimum_required (VERSION 3.12)
project (HDF5_HL_FORTRAN_TESTS C Fortran)
#-----------------------------------------------------------------------------
diff --git a/hl/src/CMakeLists.txt b/hl/src/CMakeLists.txt
index 9bce694..55d84c7 100644
--- a/hl/src/CMakeLists.txt
+++ b/hl/src/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required (VERSION 3.10)
+cmake_minimum_required (VERSION 3.12)
project (HDF5_HL_SRC C)
#-----------------------------------------------------------------------------
diff --git a/hl/test/CMakeLists.txt b/hl/test/CMakeLists.txt
index 69f3dae..43fc312 100644
--- a/hl/test/CMakeLists.txt
+++ b/hl/test/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required (VERSION 3.10)
+cmake_minimum_required (VERSION 3.12)
project (HDF5_HL_TEST C)
# --------------------------------------------------------------------
# Notes: When creating unit test executables they should be prefixed
diff --git a/hl/test/test_file_image.c b/hl/test/test_file_image.c
index fd2d0d2..504a3f5 100644
--- a/hl/test/test_file_image.c
+++ b/hl/test/test_file_image.c
@@ -467,7 +467,7 @@ test_file_image(size_t open_images, size_t nflags, unsigned *flags)
FAIL_PUTS_ERROR("H5Dclose() failed");
} /* end for */
- PASSED()
+ PASSED();
HL_TESTING2("close file images");
diff --git a/hl/tools/CMakeLists.txt b/hl/tools/CMakeLists.txt
index c2889c3..fd9b6d9 100644
--- a/hl/tools/CMakeLists.txt
+++ b/hl/tools/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required (VERSION 3.10)
+cmake_minimum_required (VERSION 3.12)
project (HDF5_HL_TOOLS C)
add_subdirectory (gif2h5)
diff --git a/hl/tools/gif2h5/CMakeLists.txt b/hl/tools/gif2h5/CMakeLists.txt
index e12588b..cc2ba68 100644
--- a/hl/tools/gif2h5/CMakeLists.txt
+++ b/hl/tools/gif2h5/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required (VERSION 3.10)
+cmake_minimum_required (VERSION 3.12)
project (HDF5_HL_TOOLS_GIF2H5 C)
#-----------------------------------------------------------------------------
diff --git a/hl/tools/h5watch/CMakeLists.txt b/hl/tools/h5watch/CMakeLists.txt
index edb78c0..9329c97 100644
--- a/hl/tools/h5watch/CMakeLists.txt
+++ b/hl/tools/h5watch/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required (VERSION 3.10)
+cmake_minimum_required (VERSION 3.12)
project (HDF5_HL_TOOLS_H5WATCH C)
#-----------------------------------------------------------------------------
diff --git a/java/CMakeLists.txt b/java/CMakeLists.txt
index 56e1695..416e495 100644
--- a/java/CMakeLists.txt
+++ b/java/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required (VERSION 3.10)
+cmake_minimum_required (VERSION 3.12)
project (HDF5_JAVA C Java)
set (CMAKE_MODULE_PATH "${HDF_RESOURCES_DIR};${HDF_RESOURCES_EXT_DIR}")
diff --git a/java/examples/CMakeLists.txt b/java/examples/CMakeLists.txt
index 828b96a..3412c40 100644
--- a/java/examples/CMakeLists.txt
+++ b/java/examples/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required (VERSION 3.10)
+cmake_minimum_required (VERSION 3.12)
project (HDFJAVA_EXAMPLES Java)
add_subdirectory (datasets)
diff --git a/java/examples/datasets/CMakeLists.txt b/java/examples/datasets/CMakeLists.txt
index 02b9fdf..fc4acc4 100644
--- a/java/examples/datasets/CMakeLists.txt
+++ b/java/examples/datasets/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required (VERSION 3.10)
+cmake_minimum_required (VERSION 3.12)
project (HDFJAVA_EXAMPLES_DATASETS Java)
set (CMAKE_VERBOSE_MAKEFILE 1)
diff --git a/java/examples/datatypes/CMakeLists.txt b/java/examples/datatypes/CMakeLists.txt
index f32f645..bd4f483 100644
--- a/java/examples/datatypes/CMakeLists.txt
+++ b/java/examples/datatypes/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required (VERSION 3.10)
+cmake_minimum_required (VERSION 3.12)
project (HDFJAVA_EXAMPLES_DATATYPES Java)
set (CMAKE_VERBOSE_MAKEFILE 1)
diff --git a/java/examples/groups/CMakeLists.txt b/java/examples/groups/CMakeLists.txt
index e319a7f..c2c7d0f 100644
--- a/java/examples/groups/CMakeLists.txt
+++ b/java/examples/groups/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required (VERSION 3.10)
+cmake_minimum_required (VERSION 3.12)
project (HDFJAVA_EXAMPLES_GROUPS Java)
set (CMAKE_VERBOSE_MAKEFILE 1)
diff --git a/java/examples/intro/CMakeLists.txt b/java/examples/intro/CMakeLists.txt
index a1ccd6b..6cb1e16 100644
--- a/java/examples/intro/CMakeLists.txt
+++ b/java/examples/intro/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required (VERSION 3.10)
+cmake_minimum_required (VERSION 3.12)
project (HDFJAVA_EXAMPLES_INTRO Java)
set (CMAKE_VERBOSE_MAKEFILE 1)
diff --git a/java/src/CMakeLists.txt b/java/src/CMakeLists.txt
index 3f80d8f..0bfbaf7 100644
--- a/java/src/CMakeLists.txt
+++ b/java/src/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required (VERSION 3.10)
+cmake_minimum_required (VERSION 3.12)
project (HDF5_JAVA_SRC C)
#-----------------------------------------------------------------------------
diff --git a/java/src/hdf/CMakeLists.txt b/java/src/hdf/CMakeLists.txt
index 161ddf1..5660158 100644
--- a/java/src/hdf/CMakeLists.txt
+++ b/java/src/hdf/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required (VERSION 3.10)
+cmake_minimum_required (VERSION 3.12)
project (HDF5_JAVA_HDF C)
add_subdirectory (hdf5lib)
diff --git a/java/src/hdf/hdf5lib/CMakeLists.txt b/java/src/hdf/hdf5lib/CMakeLists.txt
index b0293fb..f3d9b8d 100644
--- a/java/src/hdf/hdf5lib/CMakeLists.txt
+++ b/java/src/hdf/hdf5lib/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required (VERSION 3.10)
+cmake_minimum_required (VERSION 3.12)
project (HDF5_JAVA_HDF_HDF5 Java)
set (CMAKE_VERBOSE_MAKEFILE 1)
diff --git a/java/src/hdf/hdf5lib/H5.java b/java/src/hdf/hdf5lib/H5.java
index 872fbc7..1527dc2 100644
--- a/java/src/hdf/hdf5lib/H5.java
+++ b/java/src/hdf/hdf5lib/H5.java
@@ -3590,7 +3590,7 @@ public class H5 implements java.io.Serializable {
* - name is null.
*/
public synchronized static int H5Gget_obj_info_all(long loc_id, String name, String[] objNames, int[] objTypes,
- H5O_token_t[] tokens) throws HDF5LibraryException, NullPointerException {
+ H5O_token_t[] tokens) throws HDF5LibraryException, NullPointerException {
if (objNames == null) {
throw new NullPointerException("H5Gget_obj_info_all(): name array is null");
}
@@ -3605,7 +3605,7 @@ public class H5 implements java.io.Serializable {
public synchronized static int H5Gget_obj_info_all(long loc_id, String name, String[] oname, int[] otype,
int[] ltype, long[] fno, H5O_token_t[] tokens, int indx_type) throws HDF5LibraryException, NullPointerException {
- return H5Gget_obj_info_full(loc_id, name, oname, otype, ltype, fno, tokens, oname.length, indx_type, -1);
+ return H5Gget_obj_info_full(loc_id, name, oname, otype, ltype, fno, tokens, indx_type, -1);
}
public synchronized static int H5Gget_obj_info_full(long loc_id, String name, String[] oname, int[] otype,
diff --git a/java/src/hdf/overview.html b/java/src/hdf/overview.html
index e3a032b..f6a34fc 100644
--- a/java/src/hdf/overview.html
+++ b/java/src/hdf/overview.html
@@ -7,7 +7,7 @@ The <b>Java HD5 Interface (JHI5)</b> is a Java package
(<a href="../../hdf-java-html/javadocs/hdf/hdf5lib/package-summary.html">hdf.hdf5lib</a>)
that ``wraps around'' the HDF5 library.
<p>There are a large number of functions in the HDF5
-library (version 1.10). Some of the functions are not supported in JHI5. Most
+library (version 1.13). Some of the functions are not supported in JHI5. Most
of the unsupported functions have C function pointers, which is not currently
implemented in JHI5.</p>
diff --git a/java/src/jni/CMakeLists.txt b/java/src/jni/CMakeLists.txt
index ac41bfb..d945c33 100644
--- a/java/src/jni/CMakeLists.txt
+++ b/java/src/jni/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required (VERSION 3.10)
+cmake_minimum_required (VERSION 3.12)
project (HDF5_JAVA_JNI C)
set (HDF5_JAVA_JNI_CSRCS
diff --git a/java/src/jni/h5pFAPLImp.c b/java/src/jni/h5pFAPLImp.c
index c9844b7..9ae8775 100644
--- a/java/src/jni/h5pFAPLImp.c
+++ b/java/src/jni/h5pFAPLImp.c
@@ -395,29 +395,23 @@ Java_hdf_hdf5lib_H5_H5Pget_1fapl_1hdfs
if (H5Pget_fapl_hdfs((hid_t)fapl_id, &fa) < 0)
H5_LIBRARY_ERROR(ENVONLY);
- if (NULL != fa.namenode_name) {
- if (NULL == (j_namenode_name = ENVPTR->NewStringUTF(ENVONLY, fa.namenode_name))) {
- CHECK_JNI_EXCEPTION(ENVONLY, JNI_TRUE);
- H5_OUT_OF_MEMORY_ERROR(ENVONLY, "H5Pget_fapl_hdfs: out of memory - can't create namenode_name string");
- }
+ if (NULL == (j_namenode_name = ENVPTR->NewStringUTF(ENVONLY, fa.namenode_name))) {
+ CHECK_JNI_EXCEPTION(ENVONLY, JNI_TRUE);
+ H5_OUT_OF_MEMORY_ERROR(ENVONLY, "H5Pget_fapl_hdfs: out of memory - can't create namenode_name string");
}
args[0].l = j_namenode_name;
args[1].i = (jint)fa.namenode_port;
- if (NULL != fa.user_name) {
- if (NULL == (j_user_name = ENVPTR->NewStringUTF(ENVONLY, fa.user_name))) {
- CHECK_JNI_EXCEPTION(ENVONLY, JNI_TRUE);
- H5_OUT_OF_MEMORY_ERROR(ENVONLY, "H5Pget_fapl_hdfs: out of memory - can't create user_name string");
- }
+ if (NULL == (j_user_name = ENVPTR->NewStringUTF(ENVONLY, fa.user_name))) {
+ CHECK_JNI_EXCEPTION(ENVONLY, JNI_TRUE);
+ H5_OUT_OF_MEMORY_ERROR(ENVONLY, "H5Pget_fapl_hdfs: out of memory - can't create user_name string");
}
args[2].l = j_user_name;
- if (NULL != fa.kerberos_ticket_cache) {
- if (NULL == (j_kerb_cache_path = ENVPTR->NewStringUTF(ENVONLY, fa.kerberos_ticket_cache))) {
- CHECK_JNI_EXCEPTION(ENVONLY, JNI_TRUE);
- H5_OUT_OF_MEMORY_ERROR(ENVONLY, "H5Pget_fapl_hdfs: out of memory - can't create kerberos_ticket_cache string");
- }
+ if (NULL == (j_kerb_cache_path = ENVPTR->NewStringUTF(ENVONLY, fa.kerberos_ticket_cache))) {
+ CHECK_JNI_EXCEPTION(ENVONLY, JNI_TRUE);
+ H5_OUT_OF_MEMORY_ERROR(ENVONLY, "H5Pget_fapl_hdfs: out of memory - can't create kerberos_ticket_cache string");
}
args[3].l = j_kerb_cache_path;
@@ -820,27 +814,21 @@ Java_hdf_hdf5lib_H5_H5Pget_1fapl_1ros3
if (H5Pget_fapl_ros3((hid_t)fapl_id, &fa) < 0)
H5_LIBRARY_ERROR(ENVONLY);
- if (NULL != fa.aws_region) {
- if (NULL == (j_aws = ENVPTR->NewStringUTF(ENVONLY, fa.aws_region))) {
- CHECK_JNI_EXCEPTION(ENVONLY, JNI_TRUE);
- H5_OUT_OF_MEMORY_ERROR(ENVONLY, "H5Pget_fapl_ros3: out of memory - can't create aws_region string");
- }
+ if (NULL == (j_aws = ENVPTR->NewStringUTF(ENVONLY, fa.aws_region))) {
+ CHECK_JNI_EXCEPTION(ENVONLY, JNI_TRUE);
+ H5_OUT_OF_MEMORY_ERROR(ENVONLY, "H5Pget_fapl_ros3: out of memory - can't create aws_region string");
}
args[0].l = j_aws;
- if (NULL != fa.secret_id) {
- if (NULL == (j_id = ENVPTR->NewStringUTF(ENVONLY, fa.secret_id))) {
- CHECK_JNI_EXCEPTION(ENVONLY, JNI_TRUE);
- H5_OUT_OF_MEMORY_ERROR(ENVONLY, "H5Pget_fapl_ros3: out of memory - can't create secret_id string");
- }
+ if (NULL == (j_id = ENVPTR->NewStringUTF(ENVONLY, fa.secret_id))) {
+ CHECK_JNI_EXCEPTION(ENVONLY, JNI_TRUE);
+ H5_OUT_OF_MEMORY_ERROR(ENVONLY, "H5Pget_fapl_ros3: out of memory - can't create secret_id string");
}
args[1].l = j_id;
- if (NULL != fa.secret_key) {
- if (NULL == (j_key = ENVPTR->NewStringUTF(ENVONLY, fa.secret_key))) {
- CHECK_JNI_EXCEPTION(ENVONLY, JNI_TRUE);
- H5_OUT_OF_MEMORY_ERROR(ENVONLY, "H5Pget_fapl_ros3: out of memory - can't create secret_key string");
- }
+ if (NULL == (j_key = ENVPTR->NewStringUTF(ENVONLY, fa.secret_key))) {
+ CHECK_JNI_EXCEPTION(ENVONLY, JNI_TRUE);
+ H5_OUT_OF_MEMORY_ERROR(ENVONLY, "H5Pget_fapl_ros3: out of memory - can't create secret_key string");
}
args[2].l = j_key;
@@ -1685,11 +1673,9 @@ Java_hdf_hdf5lib_H5_H5Pget_1mdc_1config
args[2].z = cacheinfo.open_trace_file;
args[3].z = cacheinfo.close_trace_file;
- if (NULL != cacheinfo.trace_file_name) {
- if (NULL == (j_str = ENVPTR->NewStringUTF(ENVONLY, cacheinfo.trace_file_name))) {
- CHECK_JNI_EXCEPTION(ENVONLY, JNI_TRUE);
- H5_OUT_OF_MEMORY_ERROR(ENVONLY, "H5Pget_mdc_config: out of memory - unable to construct string from UTF characters");
- }
+ if (NULL == (j_str = ENVPTR->NewStringUTF(ENVONLY, cacheinfo.trace_file_name))) {
+ CHECK_JNI_EXCEPTION(ENVONLY, JNI_TRUE);
+ H5_OUT_OF_MEMORY_ERROR(ENVONLY, "H5Pget_mdc_config: out of memory - unable to construct string from UTF characters");
}
args[4].l = j_str;
diff --git a/java/src/jni/h5sImp.c b/java/src/jni/h5sImp.c
index 74866ed..33d3c2b 100644
--- a/java/src/jni/h5sImp.c
+++ b/java/src/jni/h5sImp.c
@@ -164,7 +164,8 @@ done:
#ifdef notdef
/* 10/28/99 -- added code to copy the array -- this is not used,
* but serves as a reminder in case we try to implement this in
- */ the future....
+ * the future....
+ */
/*
* Note: the argument coord is actually long coord[][], which has been
* flattened by the caller.
diff --git a/java/src/jni/h5sImp.h b/java/src/jni/h5sImp.h
index 87661e3..a07d4c5 100644
--- a/java/src/jni/h5sImp.h
+++ b/java/src/jni/h5sImp.h
@@ -51,7 +51,8 @@ Java_hdf_hdf5lib_H5__1H5Scopy
#ifdef notdef
/* 10/28/99 -- added code to copy the array -- this is not used,
* but serves as a reminder in case we try to implement this in
- */ the future....
+ * the future....
+ */
/*
* Note: the argument coord is actually long coord[][], which has been
* flattened by the caller.
diff --git a/java/test/CMakeLists.txt b/java/test/CMakeLists.txt
index 6275227..b97ad26 100644
--- a/java/test/CMakeLists.txt
+++ b/java/test/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required (VERSION 3.10)
+cmake_minimum_required (VERSION 3.12)
project (HDF5_JAVA_TEST Java)
set (CMAKE_VERBOSE_MAKEFILE 1)
diff --git a/m4/aclocal_fc.f90 b/m4/aclocal_fc.f90
index 664a3c6..7e81a52 100644
--- a/m4/aclocal_fc.f90
+++ b/m4/aclocal_fc.f90
@@ -83,10 +83,11 @@ END PROGRAM PROG_FC_C_LONG_DOUBLE_EQ_C_DOUBLE
!---- START ----- Determine the available KINDs for REALs and INTEGERs
PROGRAM FC_AVAIL_KINDS
IMPLICIT NONE
- INTEGER :: ik, jk, k, max_decimal_prec
- INTEGER :: num_rkinds = 1, num_ikinds = 1
+ INTEGER :: ik, jk, k, kk, max_decimal_prec
+ INTEGER :: prev_rkind, num_rkinds = 1, num_ikinds = 1
INTEGER, DIMENSION(1:10) :: list_ikinds = -1
INTEGER, DIMENSION(1:10) :: list_rkinds = -1
+ LOGICAL :: new_kind
OPEN(8, FILE='pac_fconftest.out', FORM='formatted')
@@ -113,14 +114,26 @@ PROGRAM FC_AVAIL_KINDS
! Find real KINDs
list_rkinds(num_rkinds)=SELECTED_REAL_KIND(1)
max_decimal_prec = 1
+ prev_rkind=list_rkinds(num_rkinds)
prec: DO ik = 2, 36
- exp: DO jk = 1, 17000
+ exp: DO jk = 1, 700
k = SELECTED_REAL_KIND(ik,jk)
IF(k.LT.0) EXIT exp
- IF(k.GT.list_rkinds(num_rkinds))THEN
- num_rkinds = num_rkinds + 1
- list_rkinds(num_rkinds) = k
+ IF(k.NE.prev_rkind)THEN
+ ! Check if we aleady have that kind
+ new_kind = .TRUE.
+ DO kk = 1, num_rkinds
+ IF(k.EQ.list_rkinds(kk))THEN
+ new_kind=.FALSE.
+ EXIT
+ ENDIF
+ ENDDO
+ IF(new_kind)THEN
+ num_rkinds = num_rkinds + 1
+ list_rkinds(num_rkinds) = k
+ prev_rkind=list_rkinds(num_rkinds)
+ ENDIF
ENDIF
max_decimal_prec = ik
ENDDO exp
diff --git a/release_docs/INSTALL b/release_docs/INSTALL
index 5c54698..fcf9602 100644
--- a/release_docs/INSTALL
+++ b/release_docs/INSTALL
@@ -414,13 +414,17 @@ CONTENTS
4.3.11. Backward compatibility
- The 1.10 version of the HDF5 library can be configured to operate
- identically to the v1.8 library with the
+ The 1.13 version of the HDF5 library can be configured to operate
+ identically to the v1.12 library with the
+ --with-default-api-version=v112
+ configure flag, or identically to the v1.10 library with the
+ --with-default-api-version=v110
+ configure flag, or identically to the v1.8 library with the
--with-default-api-version=v18
configure flag, or identically to the v1.6 library with the
--with-default-api-version=v16
configure flag. This allows existing code to be compiled with the
- v1.10 library without requiring immediate changes to the application
+ v1.13 library without requiring immediate changes to the application
source code. For additional configuration options and other details,
see "API Compatibility Macros":
diff --git a/release_docs/INSTALL_CMake.txt b/release_docs/INSTALL_CMake.txt
index 652e1f4..e1a34c5 100644
--- a/release_docs/INSTALL_CMake.txt
+++ b/release_docs/INSTALL_CMake.txt
@@ -26,11 +26,11 @@ Obtaining HDF5 source code
2. Obtain compressed (*.tar or *.zip) HDF5 source from
https://portal.hdfgroup.org/display/support/Building+HDF5+with+CMake
and put it in "myhdfstuff".
- Uncompress the file. There should be a hdf5-1.10."X" folder.
+ Uncompress the file. There should be a hdf5-1.13."X" folder.
CMake version
1. We suggest you obtain the latest CMake from the Kitware web site.
- The HDF5 1.10."X" product requires a minimum CMake version 3.10,
+ The HDF5 1.13."X" product requires a minimum CMake version 3.12,
where "X" is the current HDF5 release version. If you are using
VS2019, the minimum version is 3.15.
@@ -53,7 +53,7 @@ The following files referenced below are available at the HDF web site:
https://portal.hdfgroup.org/display/support/Building+HDF5+with+CMake
Single compressed file with all the files needed, including source:
- CMake-hdf5-1.10.X.zip or CMake-hdf5-1.10.X.tar.gz
+ CMake-hdf5-1.13.X.zip or CMake-hdf5-1.13.X.tar.gz
Individual files included in the above mentioned compressed files
-----------------------------------------------
@@ -65,7 +65,7 @@ External compression szip and zlib libraries:
ZLib.tar.gz
Examples Source package:
- HDF5Examples-1.10.x-Source.tar.gz
+ HDF5Examples-1.14.x-Source.tar.gz
Configuration files:
HDF5config.cmake
@@ -78,10 +78,10 @@ To build HDF5 with the SZIP and ZLIB external libraries you will need to:
1. Change to the development directory "myhdfstuff".
- 2. Download the CMake-hdf5-1.10.X.zip(.tar.gz) file to "myhdfstuff".
+ 2. Download the CMake-hdf5-1.13.X.zip(.tar.gz) file to "myhdfstuff".
Uncompress the file.
- 3. Change to the source directory "hdf5-1.10.x".
+ 3. Change to the source directory "hdf5-1.13.x".
CTestScript.cmake file should not be modified.
4. Edit the platform configuration file, HDF5options.cmake, if you want to change
@@ -109,7 +109,7 @@ To build HDF5 with the SZIP and ZLIB external libraries you will need to:
The command above will configure, build, test, and create an install
package in the myhdfstuff folder. It will have the format:
- HDF5-1.10.NN-<platform>.<zip or tar.gz>
+ HDF5-1.13.NN-<platform>.<zip or tar.gz>
On Unix, <platform> will be "Linux". A similar .sh file will also be created.
On Windows, <platform> will be "win64" or "win32". If you have an
@@ -130,13 +130,13 @@ To build HDF5 with the SZIP and ZLIB external libraries you will need to:
6. To install, "X" is the current release version
On Windows (with WiX installed), execute:
- HDF5-1.10."X"-win32.msi or HDF5-1.10."X"-win64.msi
+ HDF5-1.13."X"-win32.msi or HDF5-1.13."X"-win64.msi
By default this program will install the hdf5 library into the
"C:\Program Files" directory and will create the following
directory structure:
HDF_Group
--HDF5
- ----1.10."X"
+ ----1.13."X"
------bin
------include
------lib
@@ -144,40 +144,40 @@ To build HDF5 with the SZIP and ZLIB external libraries you will need to:
On Linux, change to the install destination directory
(create it if doesn't exist) and execute:
- <path-to>/myhdfstuff/HDF5-1.10."X"-Linux.sh
+ <path-to>/myhdfstuff/HDF5-1.13."X"-Linux.sh
After accepting the license, the script will prompt:
By default the HDF5 will be installed in:
- "<current directory>/HDF5-1.10."X"-Linux"
- Do you want to include the subdirectory HDF5-1.10."X"-Linux?
+ "<current directory>/HDF5-1.13."X"-Linux"
+ Do you want to include the subdirectory HDF5-1.13."X"-Linux?
Saying no will install in: "<current directory>" [Yn]:
Note that the script will create the following directory structure
relative to the install point:
HDF_Group
--HDF5
- ----1.10."X"
+ ----1.13."X"
------bin
------include
------lib
------share
- On Mac you will find HDF5-1.10."X"-Darwin.dmg in the myhdfstuff folder. Click
+ On Mac you will find HDF5-1.13."X"-Darwin.dmg in the myhdfstuff folder. Click
on the dmg file to proceed with installation. After accepting the license,
there will be a folder with the following structure:
HDF_Group
--HDF5
- ----1.10."X"
+ ----1.13."X"
------bin
------include
------lib
------share
By default the installation will create the bin, include, lib and cmake
- folders in the <install destination directory>/HDF_Group/HDF5/1.10."X"
+ folders in the <install destination directory>/HDF_Group/HDF5/1.13."X"
The <install destination directory> depends on the build platform;
Windows will set the default to:
- C:/Program Files/HDF_Group/HDF5/1.10."X"
+ C:/Program Files/HDF_Group/HDF5/1.13."X"
Linux will set the default to:
- "myhdfstuff/HDF_Group/HDF5/1.10."X"
+ "myhdfstuff/HDF_Group/HDF5/1.13."X"
The default can be changed by adding ",INSTALLDIR=<my new dir>" to the
"ctest -S HDF5config.cmake..." command. For example on linux:
ctest -S HDF5config.cmake,INSTALLDIR=/usr/local/myhdf5,BUILD_GENERATOR=Unix -C Release -VV -O hdf5.log
@@ -204,13 +204,13 @@ Notes: This short set of instructions is written for users who want to
5. Configure the C library, tools and tests with one of the following commands:
On Windows 32 bit
- cmake -G "Visual Studio 12 2013" -DCMAKE_BUILD_TYPE:STRING=Release -DBUILD_SHARED_LIBS:BOOL=OFF -DBUILD_TESTING:BOOL=ON -DHDF5_BUILD_TOOLS:BOOL=ON ..\hdf5-1.10."X"
+ cmake -G "Visual Studio 12 2013" -DCMAKE_BUILD_TYPE:STRING=Release -DBUILD_SHARED_LIBS:BOOL=OFF -DBUILD_TESTING:BOOL=ON -DHDF5_BUILD_TOOLS:BOOL=ON ..\hdf5-1.13."X"
On Windows 64 bit
- cmake -G "Visual Studio 12 2013 Win64" -DCMAKE_BUILD_TYPE:STRING=Release -DBUILD_SHARED_LIBS:BOOL=OFF -DBUILD_TESTING:BOOL=ON -DHDF5_BUILD_TOOLS:BOOL=ON ..\hdf5-1.10."X"
+ cmake -G "Visual Studio 12 2013 Win64" -DCMAKE_BUILD_TYPE:STRING=Release -DBUILD_SHARED_LIBS:BOOL=OFF -DBUILD_TESTING:BOOL=ON -DHDF5_BUILD_TOOLS:BOOL=ON ..\hdf5-1.13."X"
On Linux and Mac
- cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE:STRING=Release -DBUILD_SHARED_LIBS:BOOL=OFF -DBUILD_TESTING:BOOL=ON -DHDF5_BUILD_TOOLS:BOOL=ON ../hdf5-1.10."X"
+ cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE:STRING=Release -DBUILD_SHARED_LIBS:BOOL=OFF -DBUILD_TESTING:BOOL=ON -DHDF5_BUILD_TOOLS:BOOL=ON ../hdf5-1.13."X"
where "X" is the current release version.
@@ -225,13 +225,13 @@ Notes: This short set of instructions is written for users who want to
9. To install
On Windows (with WiX installed), execute:
- HDF5-1.10."X"-win32.msi or HDF5-1.10."X"-win64.msi
+ HDF5-1.13."X"-win32.msi or HDF5-1.13."X"-win64.msi
By default this program will install the hdf5 library into the
"C:\Program Files" directory and will create the following
directory structure:
HDF_Group
--HDF5
- ----1.10."X"
+ ----1.13."X"
------bin
------include
------lib
@@ -239,28 +239,28 @@ Notes: This short set of instructions is written for users who want to
On Linux, change to the install destination directory
(create if doesn't exist) and execute:
- <path-to>/myhdfstuff/build/HDF5-1.10."X"-Linux.sh
+ <path-to>/myhdfstuff/build/HDF5-1.13."X"-Linux.sh
After accepting the license, the script will prompt:
By default the HDF5 will be installed in:
- "<current directory>/HDF5-1.10."X"-Linux"
- Do you want to include the subdirectory HDF5-1.10."X"-Linux?
+ "<current directory>/HDF5-1.13."X"-Linux"
+ Do you want to include the subdirectory HDF5-1.13."X"-Linux?
Saying no will install in: "<current directory>" [Yn]:
Note that the script will create the following directory structure
relative to the install point:
HDF_Group
--HDF5
- ----1.10."X"
+ ----1.13."X"
------bin
------include
------lib
------share
- On Mac you will find HDF5-1.10."X"-Darwin.dmg in the build folder. Click
+ On Mac you will find HDF5-1.13."X"-Darwin.dmg in the build folder. Click
on the dmg file to proceed with installation. After accepting the license,
there will be a folder with the following structure:
HDF_Group
--HDF5
- ----1.10."X"
+ ----1.13."X"
------bin
------include
------lib
@@ -272,7 +272,7 @@ IV. Further considerations
========================================================================
1. We suggest you obtain the latest CMake for windows from the Kitware
- web site. The HDF5 1.10."X" product requires a minimum CMake version 3.10.
+ web site. The HDF5 1.13."X" product requires a minimum CMake version 3.12.
2. If you plan to use Zlib or Szip:
A. Download the binary packages and install them in a central location.
@@ -656,7 +656,7 @@ HDF5_STRICT_FORMAT_CHECKS "Whether to perform strict file format checks"
HDF_TEST_EXPRESS "Control testing framework (0-3)" "0"
HDF5_TEST_VFD "Execute tests with different VFDs" OFF
HDF5_TEST_PASSTHROUGH_VOL "Execute tests with different passthrough VOL connectors" OFF
-DEFAULT_API_VERSION "Enable default API (v16, v18, v110, v112)" "v112"
+DEFAULT_API_VERSION "Enable default API (v16, v18, v110, v112, v114)" "v114"
HDF5_USE_FOLDERS "Enable folder grouping of projects in IDEs." ON
HDF5_WANT_DATA_ACCURACY "IF data accuracy is guaranteed during data conversions" ON
HDF5_WANT_DCONV_EXCEPTION "exception handling functions is checked during data conversions" ON
diff --git a/release_docs/INSTALL_Cygwin.txt b/release_docs/INSTALL_Cygwin.txt
index 74f494c..eebffba 100644
--- a/release_docs/INSTALL_Cygwin.txt
+++ b/release_docs/INSTALL_Cygwin.txt
@@ -2,8 +2,8 @@
HDF5 Build and Install Instructions for Cygwin
************************************************************************
-This document is a instruction on how to build, test and install HDF5 libary on
-Cygwin. See detailed information in hdf5/INSTALL.
+This document is a instruction on how to build, test and install HDF5 libary on
+Cygwin. See detailed information in hdf5/INSTALL.
NOTE: hdf5 can be built with CMake, see the INSTALL_CMake.txt file for more guidance.
@@ -12,16 +12,16 @@ Preconditions:
1. Installed Cygwin 1.7.25 or higher
- To install the Cygwin net release, go to http://www.cygwin.com and
+ To install the Cygwin net release, go to http://www.cygwin.com and
click on "setup-x86.exe" (32-bit installation) under the heading
- "Current Cygwin DLL version". This will download a GUI
- installer called setup-x86.exe which can be run to download a complete
- Cygwin installation via the internet. Then follow the instructions
+ "Current Cygwin DLL version". This will download a GUI
+ installer called setup-x86.exe which can be run to download a complete
+ Cygwin installation via the internet. Then follow the instructions
on each screen to install Cygwin.
- Cygwin uses packages to manage installing various software. Users can
+ Cygwin uses packages to manage installing various software. Users can
choose to install or uninstall certain packages by running setup.exe.
- http://www.cygwin.com/packages/ provides detailed information about
+ http://www.cygwin.com/packages/ provides detailed information about
Cygwin packages.
Most required dependencies can be satisfied by installing all packages in
@@ -31,32 +31,32 @@ Preconditions:
2. Compilers, Libraries and Utilities Installed
2.1 Compilers Supported
-
+
The following compilers are supported by HDF5 and included in the Cygwin
package system:
gcc (4.7.3 and 4.9.2), which includes:
gcc4-core : C compiler
gcc4-g++ : C++ compiler
gcc4-fortran : fortran compiler
-
+
2.1.1 Using Compilers Not Supported
-
+
By default the current configuration uses vendor compilers; to use
another compiler run the following commands before running
- configure:
-
+ configure:
+
setenv CC "foo -flags"
setenv FC "fffoo -flags"
- For example, if users want to use pgf90 as fortran compiler, then
+ For example, if users want to use pgf90 as fortran compiler, then
setenv FC pgf90
See the configure help page (configure --help) for a list of
environment variables that have an affect on building the
library.
-
+
2.2 HDF5 External Library Dependencies
2.2.1 Zlib
@@ -66,162 +66,162 @@ Preconditions:
2.2.2 Szip
The HDF5 library has a predefined compression filter that uses
the extended-Rice lossless compression algorithm for chunked
- datatsets. For more information on Szip compression, license terms,
+ datatsets. For more information on Szip compression, license terms,
and obtaining the Szip source code, see:
https://portal.hdfgroup.org/display/HDF5/Szip+Compression+in+HDF+Products
-
-
+
+
2.3 Additional Utilities
-
+
The following standard utilities are also required to build and test HDF5:
-
+
bison : yacc implementation
flex : flex utility
make : make utility
-
+
2.4 Alternate Build Process
-
- Download the CMake package and follow the notes in the "INSTALL_CMake.txt"
+
+ Download the CMake package and follow the notes in the "INSTALL_CMake.txt"
file to build HDF5 with the CMake utilities.
-
-
-
+
+
+
Build, Test and Install HDF5 on Cygwin
--------------------------------------
1. Get HDF5 source code package
Users can download HDF5 source code package from HDF website
- (http://hdfgroup.org).
-
+ (http://hdfgroup.org).
+
2. Unpacking the distribution
The HDF5 source code is distributed in a variety of formats which
- can be unpacked with the following commands, each of which creates
- an `hdf5-1.10.x' directory.
+ can be unpacked with the following commands, each of which creates
+ an `hdf5-1.13.x' directory.
2.1 Non-compressed tar archive (*.tar)
- $ tar xf hdf5-1.10.x.tar
+ $ tar xf hdf5-1.13.x.tar
2.2 Gzip'd tar archive (*.tar.gz)
- $ gunzip < hdf5-1.10.x.tar.gz | tar xf -
+ $ gunzip < hdf5-1.13.x.tar.gz | tar xf -
2.3 Bzip'd tar archive (*.tar.bz2)
- $ bunzip2 < hdf5-1.10.x.tar.bz2 | tar xf -
+ $ bunzip2 < hdf5-1.13.x.tar.bz2 | tar xf -
2. Setup Environment
In Cygwin, most compilers and setting are automatically detected during
- the configure script. However, if you are building Fortran we recommend
- that you explicitly set the "FC" variable in your environment to use the
+ the configure script. However, if you are building Fortran we recommend
+ that you explicitly set the "FC" variable in your environment to use the
gfortran compiler. For example, issue the command:
-
+
$ export FC=gfortran
-
-4. Configuring
-
- Notes: See detailed information in hdf5/release_docs/INSTALL,
- part 5. Full installation instructions for source
+
+4. Configuring
+
+ Notes: See detailed information in hdf5/release_docs/INSTALL,
+ part 5. Full installation instructions for source
distributions
- The host configuration file for cygwin i686-pc-cygwin is located
- in the `config' directory and are based on architecture name,
- vendor name, and operating system which are displayed near the
+ The host configuration file for cygwin i686-pc-cygwin is located
+ in the `config' directory and are based on architecture name,
+ vendor name, and operating system which are displayed near the
beginning of the `configure' output. The host config file influences
- the behavior of configure by setting or augmenting shell variables.
-
+ the behavior of configure by setting or augmenting shell variables.
+
In short,
-
- To configure HDF5 C Library, using
-
+
+ To configure HDF5 C Library, using
+
$ ./configure
-
+
To configure HDF5 C/C++ Library, using
$ ./configure --enable-cxx
-
+
To configure HDF5 C/Fortran Library, using
$ ./configure --enable-fortran
-
+
To configure HDF5 C with Szip library, using
$ ./configure --with-szlib="path to szlib"
-
- For example, if szip library was installed in the directory
+
+ For example, if szip library was installed in the directory
/cygdrive/c/szip, which is parent directory of "include" and
- "lib", then the following command will configure HDF5 C library
+ "lib", then the following command will configure HDF5 C library
with szip enabled:
-
+
$ ./configure --with-szlib=/cygdrive/c/szip
-
+
To configure HDF5 C without Zlib,
-
+
To disable zlib, using
$ ./configure --without-zlib
-
+
Two ways to configure HDF5 C with specified Zlib
-
+
Using
$ ./configure --with-zlib=INCDIR,LIBDIR
For example, if the zlib library is installed in
/cygdrive/c/usr, which is the parent directory of directories
- "include" and "lib",
+ "include" and "lib",
$ ./configure --with-zlib=/cygdrive/c/usr/include,/cygdrive/c/usr/lib
Through the CPPFLAGS and LDFLAGS Variables
-
- For example, if zlib was installed in the directory
- /cygdrive/c/usr then using the following command to configure
+
+ For example, if zlib was installed in the directory
+ /cygdrive/c/usr then using the following command to configure
HDF5 with zib
$ CPPFLAGS=-I/cygdrive/c/usr/include \
$ LDFLAGS=-L/cygdrive/c/usr/lib \
$ ./configure
- To specify the installation directories, using
+ To specify the installation directories, using
$ ./configure --prefix="path for installation"
-
- By default, HDF5 library, header files, examples, and
+
+ By default, HDF5 library, header files, examples, and
support programs will be installed in /usr/local/lib,
/usr/local/include, /usr/local/doc/hdf5/examples, and
- /usr/local/bin. To use a path other than /usr/local specify
+ /usr/local/bin. To use a path other than /usr/local specify
the path with the `--prefix=PATH' switch as in the above
command.
- Combination of Switches
+ Combination of Switches
- All of the above switches can be combined together. For
- example, if users want to configure HDF5 C/C++/Fortran
- library with szip library enabled, with zlib library at
- /cygdrive/c/usr/, and install HDF5 into directory
+ All of the above switches can be combined together. For
+ example, if users want to configure HDF5 C/C++/Fortran
+ library with szip library enabled, with zlib library at
+ /cygdrive/c/usr/, and install HDF5 into directory
/cygdrive/c/hdf5 using gcc/g++ as C/C++ compiler and gfortran
as fortran compiler
-
+
$ ./configure
--with-szlib=/cygdrive/c/szip
--with-zlib=/cygdrive/c/usr/include,/cygdrive/c/usr/lib
--prefix=/cygdrive/c/hdf5
--enable-cxx
- --enable-fortran
+ --enable-fortran
<"If no more switches, then hit Enter">
Notes: The command format above is for readilibity. In practice,
please type in the command above with at least one
- space between each line, No "Enter" until users finish
- the switches and want to run the configure.
+ space between each line, No "Enter" until users finish
+ the switches and want to run the configure.
+
-
or do it through CPPFLAGS and LDFLAGS variables:
-
+
$ CPPFLAGS=-I/cygdrive/c/usr/include \
$ LDFLAGS=-L/cygdrive/c/usr/lib \
@@ -229,38 +229,38 @@ Build, Test and Install HDF5 on Cygwin
--with-szlib=/cygdrive/c/szip
--prefix=/cygdrive/c/hdf5
--enable-cxx
- --enable-fortran
+ --enable-fortran
<"If no more switches, then hit Enter">
-
+
5. Make and Make Check
After configuration is done successfully, run the following series of
commands to build, test and install HDF5
-
+
$ make > "output file name"
$ make check > "output file name"
-
+
Before run "make install", check output file for "make check", there
should be no failures at all.
6. Make Install
$ make install > "output file name"
-
-
+
+
7. Check installed HDF5 library
- After step 6, go to your installation directory, there should be
+ After step 6, go to your installation directory, there should be
three subdirectories: "bin" "include" and "lib".
-8. Known Problems
-
+8. Known Problems
+
dt_arith tests may fail due to the use of fork. This is a known issue
with cygwin on Windows.
"make check" fails when building shared lib files is enabled. The default
on Cygwin has been changed to disable shared. It can be enabled with
- the --enable-shared configure option but is likely to fail "make check"
+ the --enable-shared configure option but is likely to fail "make check"
with GCC compilers.
-----------------------------------------------------------------------
diff --git a/release_docs/README_HPC b/release_docs/README_HPC
index 67a5d6c..513064c 100644
--- a/release_docs/README_HPC
+++ b/release_docs/README_HPC
@@ -1,6 +1,6 @@
************************************************************************
* Using CMake to build and test HDF5 source on HPC machines *
-************************************************************************
+************************************************************************
Contents
@@ -16,34 +16,34 @@ Section VI: Other cross compiling options
========================================================================
I. Prerequisites
========================================================================
- 1. Create a working directory that is accessible from the compute nodes for
+ 1. Create a working directory that is accessible from the compute nodes for
running tests; the working directory should be in a scratch space or a
parallel file system space since testing will use this space. Building
- from HDF5 source in a 'home' directory typically results in test
+ from HDF5 source in a 'home' directory typically results in test
failures and should be avoided.
-
- 2. Load modules for desired compilers, module for cmake version 3.10 or greater,
+
+ 2. Load modules for desired compilers, module for cmake version 3.12 or greater,
and set any needed environment variables for compilers (i.e., CC, FC, CXX).
Unload any problematic modules (i.e., craype-hugepages2M).
========================================================================
II. Obtain HDF5 source
========================================================================
-Obtain HDF5 source code from the HDF5 repository using a git command or
+Obtain HDF5 source code from the HDF5 repository using a git command or
from a release tar file in a working directory:
- git clone https://git@bitbucket.hdfgroup.org/scm/hdffv/hdf5.git
+ git clone https://git@bitbucket.hdfgroup.org/scm/hdffv/hdf5.git
[-b branch] [source directory]
If no branch is specified, then the 'develop' version will be checked out.
-If no source directory is specified, then the source will be located in the
-'hdf5' directory. The Cmake scripts expect the source to be in a directory
+If no source directory is specified, then the source will be located in the
+'hdf5' directory. The CMake scripts expect the source to be in a directory
named hdf5-<version string>, where 'version string' uses the format '1.xx.xx'.
-For example, for the current 'develop' version, the "hdf5" directory should
-be renamed "hdf5-1.11.4", or for the first hdf5_1_10_5 pre-release version,
-it should be renamed "hdf5-1.10.5-pre1".
+For example, for the current 'develop' version, the "hdf5" directory should
+be renamed "hdf5-1.13.0", or for the first hdf5_1_12_0 pre-release version,
+it should be renamed "hdf5-1.12.0-5".
-If the version number is not known a priori, the version string
+If the version number is not known a priori, the version string
can be obtained by running bin/h5vers in the top level directory of the source clone, and
the source directory renamed 'hdf5-<version string>'.
@@ -57,23 +57,23 @@ The ctest command [1]:
ctest -S HDF5config.cmake,BUILD_GENERATOR=Unix -C Release -V -O hdf5.log
-will configure, build, test and package HDF5 from the downloaded source
+will configure, build, test and package HDF5 from the downloaded source
after the setup steps outlined below are followed.
-CMake option variables are available to allow running test programs in batch
-scripts on compute nodes and to cross-compile for compute node hardware using
+CMake option variables are available to allow running test programs in batch
+scripts on compute nodes and to cross-compile for compute node hardware using
a cross-compiling emulator. The setup steps will make default settings for
-parallel or serial only builds available to the CMake command.
+parallel or serial only builds available to the CMake command.
- 1. For the current 'develop' version the "hdf5" directory should be renamed
- "hdf5-1.11.4".
+ 1. For the current 'develop' version the "hdf5" directory should be renamed
+ "hdf5-1.13.0".
2. Three cmake script files need to be copied to the working directory, or
have symbolic links to them, created in the working directory:
-
- hdf5-1.11.4/config/cmake/scripts/HDF5config.cmake
- hdf5-1.11.4/config/cmake/scripts/CTestScript.cmake
- hdf5-1.11.4/config/cmake/scripts/HDF5options.cmake
+
+ hdf5-1.13.0/config/cmake/scripts/HDF5config.cmake
+ hdf5-1.13.0/config/cmake/scripts/CTestScript.cmake
+ hdf5-1.13.0/config/cmake/scripts/HDF5options.cmake
should be copied to the working directory.
@@ -82,16 +82,16 @@ parallel or serial only builds available to the CMake command.
CTestScript.cmake
HDF5config.cmake
HDF5options.cmake
- hdf5-1.11.4
+ hdf5-1.13.0
- Additionally, when the ctest command runs [1], it will add a build directory
+ Additionally, when the ctest command runs [1], it will add a build directory
in the working directory.
4. The following options (among others) can be added to the ctest
command [1], following '-S HDF5config.cmake,' and separated by ',':
HPC=sbatch (or 'bsub' or 'raybsub') indicates which type of batch
- files to use for running tests. If omitted, test
+ files to use for running tests. If omitted, test
will run on the local machine or login node.
KNL=true to cross-compile for KNL compute nodes on CrayXC40
@@ -104,27 +104,27 @@ parallel or serial only builds available to the CMake command.
The HPC options will add BUILD_GENERATOR=Unix for the three HPC options.
An example ctest command for a parallel build on a system using sbatch is
-
+
ctest -S HDF5config.cmake,HPC=sbatch,MPI=true -C Release -V -O hdf5.log
- Adding the option 'KNL=true' to the above list will compile for KNL nodes,
+ Adding the option 'KNL=true' to the above list will compile for KNL nodes,
for example, on 'mutrino' and other CrayXC40 machines.
- Changing -V to -VV will produce more logging information in HDF5.log.
+ Changing -V to -VV will produce more logging information in HDF5.log.
- More detailed CMake information can be found in the HDF5 source in
+ More detailed CMake information can be found in the HDF5 source in
release_docs/INSTALL_CMake.txt.
========================================================================
IV. Cross-compiling
========================================================================
-For cross-compiling on Cray, set environment variables CC=cc, FC=ftn
+For cross-compiling on Cray, set environment variables CC=cc, FC=ftn
and CXX=CC (for c++) after all compiler modules are loaded since switching
compiler modules may unset or reset these variables.
-CMake provides options for cross-compiling. To cross-compile for KNL hardware
-on mutrino and other CrayXC40 machines, add HPC=sbatch,KNL=true to the
-ctest command line. This will set the following options from the
+CMake provides options for cross-compiling. To cross-compile for KNL hardware
+on mutrino and other CrayXC40 machines, add HPC=sbatch,KNL=true to the
+ctest command line. This will set the following options from the
config/cmake/scripts/HPC/sbatch-HDF5options.cmake file:
set (COMPILENODE_HWCOMPILE_MODULE "craype-haswell")
@@ -133,74 +133,74 @@ config/cmake/scripts/HPC/sbatch-HDF5options.cmake file:
set (LOCAL_BATCH_SCRIPT_PARALLEL_NAME "knl_ctestP.sl")
set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DCMAKE_TOOLCHAIN_FILE:STRING=config/toolchain/crayle.cmake")
-On the Cray XC40 the craype-haswell module is needed for configuring, and the
+On the Cray XC40 the craype-haswell module is needed for configuring, and the
craype-mic-knl module is needed for building to run on the KNL nodes. CMake
-with the above options will swap modules after configuring is complete,
+with the above options will swap modules after configuring is complete,
but before compiling programs for KNL.
The sbatch script arguments for running jobs on KNL nodes may differ on CrayXC40
-machines other than mutrino. The batch scripts knl_ctestS.sl and knl_ctestP.sl
-have the correct arguments for mutrino: "#SBATCH -p knl -C quad,cache". For
-cori, another CrayXC40, that line is replaced by "#SBATCH -C knl,quad,cache".
-For cori (and other machines), the values in LOCAL_BATCH_SCRIPT_NAME and
-LOCAL_BATCH_SCRIPT_PARALLEL_NAME in the config/cmake/scripts/HPC/sbatch-HDF5options.cmake
-file can be replaced by cori_knl_ctestS.sl and cori_knl_ctestS.sl, or the lines
-can be edited in the batch files in hdf5-1.11.4/bin/batch.
+machines other than mutrino. The batch scripts knl_ctestS.sl and knl_ctestP.sl
+have the correct arguments for mutrino: "#SBATCH -p knl -C quad,cache". For
+cori, another CrayXC40, that line is replaced by "#SBATCH -C knl,quad,cache".
+For cori (and other machines), the values in LOCAL_BATCH_SCRIPT_NAME and
+LOCAL_BATCH_SCRIPT_PARALLEL_NAME in the config/cmake/scripts/HPC/sbatch-HDF5options.cmake
+file can be replaced by cori_knl_ctestS.sl and cori_knl_ctestS.sl, or the lines
+can be edited in the batch files in hdf5-1.13.0/bin/batch.
========================================================================
V. Manual alternatives
========================================================================
-If using ctest is undesirable, one can create a build directory and run the cmake
+If using ctest is undesirable, one can create a build directory and run the cmake
configure command, for example
-"/projects/Mutrino/hpcsoft/cle6.0/common/cmake/3.10.2/bin/cmake"
--C "<working directory>/hdf5-1.11.4/config/cmake/cacheinit.cmake"
--DCMAKE_BUILD_TYPE:STRING=Release -DHDF5_BUILD_FORTRAN:BOOL=ON
--DHDF5_BUILD_JAVA:BOOL=OFF
--DCMAKE_INSTALL_PREFIX:PATH=<working directory>/HDF_Group/HDF5/1.11.4
--DHDF5_ENABLE_Z_LIB_SUPPORT:BOOL=OFF -DHDF5_ENABLE_SZIP_SUPPORT:BOOL=OFF
--DHDF5_ENABLE_PARALLEL:BOOL=ON -DHDF5_BUILD_CPP_LIB:BOOL=OFF
--DHDF5_BUILD_JAVA:BOOL=OFF -DHDF5_ENABLE_THREADSAFE:BOOL=OFF
--DHDF5_PACKAGE_EXTLIBS:BOOL=ON -DLOCAL_BATCH_TEST:BOOL=ON
--DMPIEXEC_EXECUTABLE:STRING=srun -DMPIEXEC_NUMPROC_FLAG:STRING=-n
--DMPIEXEC_MAX_NUMPROCS:STRING=6
--DCMAKE_TOOLCHAIN_FILE:STRING=config/toolchain/crayle.cmake
--DLOCAL_BATCH_SCRIPT_NAME:STRING=knl_ctestS.sl
--DLOCAL_BATCH_SCRIPT_PARALLEL_NAME:STRING=knl_ctestP.sl -DSITE:STRING=mutrino
--DBUILDNAME:STRING=par-knl_GCC493-SHARED-Linux-4.4.156-94.61.1.16335.0.PTF.1107299-default-x86_64
-"-GUnix Makefiles" "" "<working directory>/hdf5-1.11.4"
+"/projects/Mutrino/hpcsoft/cle6.0/common/cmake/3.12/bin/cmake"
+-C "<working directory>/hdf5-1.13.0/config/cmake/cacheinit.cmake"
+-DCMAKE_BUILD_TYPE:STRING=Release -DHDF5_BUILD_FORTRAN:BOOL=ON
+-DHDF5_BUILD_JAVA:BOOL=OFF
+-DCMAKE_INSTALL_PREFIX:PATH=<working directory>/HDF_Group/HDF5/1.13.0
+-DHDF5_ENABLE_Z_LIB_SUPPORT:BOOL=OFF -DHDF5_ENABLE_SZIP_SUPPORT:BOOL=OFF
+-DHDF5_ENABLE_PARALLEL:BOOL=ON -DHDF5_BUILD_CPP_LIB:BOOL=OFF
+-DHDF5_BUILD_JAVA:BOOL=OFF -DHDF5_ENABLE_THREADSAFE:BOOL=OFF
+-DHDF5_PACKAGE_EXTLIBS:BOOL=ON -DLOCAL_BATCH_TEST:BOOL=ON
+-DMPIEXEC_EXECUTABLE:STRING=srun -DMPIEXEC_NUMPROC_FLAG:STRING=-n
+-DMPIEXEC_MAX_NUMPROCS:STRING=6
+-DCMAKE_TOOLCHAIN_FILE:STRING=config/toolchain/crayle.cmake
+-DLOCAL_BATCH_SCRIPT_NAME:STRING=knl_ctestS.sl
+-DLOCAL_BATCH_SCRIPT_PARALLEL_NAME:STRING=knl_ctestP.sl -DSITE:STRING=mutrino
+-DBUILDNAME:STRING=par-knl_GCC493-SHARED-Linux-4.4.156-94.61.1.16335.0.PTF.1107299-default-x86_64
+"-GUnix Makefiles" "" "<working directory>/hdf5-1.13.0"
followed by make and batch jobs to run tests.
-To cross-compile on CrayXC40, run the configure command with the craype-haswell
+To cross-compile on CrayXC40, run the configure command with the craype-haswell
module loaded, then switch to the craype-mic-knl module for the build process.
-Tests on machines using slurm can be run with
+Tests on machines using slurm can be run with
-"sbatch -p knl -C quad,cache ctestS.sl"
+"sbatch -p knl -C quad,cache ctestS.sl"
-or
+or
-"sbatch -p knl -C quad,cache ctestP.sl"
+"sbatch -p knl -C quad,cache ctestP.sl"
for parallel builds.
-
+
Tests on machines using LSF will typically use "bsub ctestS.lsf", etc.
========================================================================
VI. Other cross compiling options
========================================================================
-Settings for two other cross-compiling options are also in the config/toolchain
+Settings for two other cross-compiling options are also in the config/toolchain
files which do not seem to be necessary with the Cray PrgEnv-* modules
-1. HDF5_USE_PREGEN. This option, along with the HDF5_USE_PREGEN_DIR CMake
- variable would allow the use of an appropriate H5Tinit.c file with type
- information generated on a compute node to be used when cross compiling
- for those compute nodes. The use of the variables in lines 110 and 111
- of HDF5options.cmake file seem to preclude needing this option with the
- available Cray modules and CMake option.
-
-2. HDF5_BATCH_H5DETECT and associated CMake variables. This option when
- properly configured will run H5detect in a batch job on a compute node
- at the beginning of the CMake build process. It was also found to be
- unnecessary with the available Cray modules and CMake options.
+1. HDF5_USE_PREGEN. This option, along with the HDF5_USE_PREGEN_DIR CMake
+ variable would allow the use of an appropriate H5Tinit.c file with type
+ information generated on a compute node to be used when cross compiling
+ for those compute nodes. The use of the variables in lines 110 and 111
+ of HDF5options.cmake file seem to preclude needing this option with the
+ available Cray modules and CMake option.
+
+2. HDF5_BATCH_H5DETECT and associated CMake variables. This option when
+ properly configured will run H5detect in a batch job on a compute node
+ at the beginning of the CMake build process. It was also found to be
+ unnecessary with the available Cray modules and CMake options.
diff --git a/release_docs/RELEASE.txt b/release_docs/RELEASE.txt
index 8b25de0..ff024c3 100644
--- a/release_docs/RELEASE.txt
+++ b/release_docs/RELEASE.txt
@@ -20,7 +20,7 @@ The official HDF5 releases can be obtained from:
https://www.hdfgroup.org/downloads/hdf5/
-Changes from Release to Release and New Features in the HDF5-1.10.x release series
+Changes from Release to Release and New Features in the HDF5-1.13.x release series
can be found at:
https://portal.hdfgroup.org/display/HDF5/HDF5+Application+Developer%27s+Guide
@@ -48,6 +48,20 @@ New Features
Configuration:
-------------
+ - Added test script for file size compare
+
+ if CMake minimum version is at least 3.14, the fileCompareTest.cmake
+ script will compare file sizes.
+
+ (ADB - 2020/02/24, HDFFV-11036)
+
+ - Update CMake minimum version to 3.12
+
+ Updated CMake minimum version to 3.12 and added version checks
+ for Windows features.
+
+ (ADB - 2020/02/05, TRILABS-142)
+
- Fixed CMake include properties for Fortran libraries
Corrected the library properties for Fortran to use the
@@ -78,9 +92,18 @@ New Features
(ADB - 2020/01/15, HDFFV-11001)
- - Added Clang sanitizers to CMake for analyzer support
+ - Added Clang sanitizers to CMake for analyzer support if compiler is clang.
- Added CMake code and files to execute the Clang sanitizers.
+ Added CMake code and files to execute the Clang sanitizers if
+ HDF5_ENABLE_SANITIZERS is enabled and the USE_SANITIZER option
+ is set to one of the following:
+ Address
+ Memory
+ MemoryWithOrigins
+ Undefined
+ Thread
+ Leak
+ 'Address;Undefined'
(ADB - 2019/12/12, TRILAB-135)
@@ -479,6 +502,16 @@ New Features
Tools:
------
+ - h5repack was fixed to repack the reference attributes properly.
+ The code line that checks if the update of reference inside a compound
+ datatype is misplaced outside the code block loop that carries out the
+ check. In consequence, the next attribute that is not the reference
+ type was repacked again as the reference type and caused the failure of
+ repacking. The fix is to move the corresponding code line to the correct
+ code block.
+
+ (KY -2020/02/07, HDFFV-11014)
+
- h5diff was updated to use the new reference APIs.
h5diff uses the new reference APIs to compare references.
@@ -547,6 +580,19 @@ Bug Fixes since HDF5-1.10.3 release
(CJH - 2019/12/9, HDFFV-10934)
+ - Fixed an assertion failure in the parallel library when collectively
+ filling chunks. As it is required that chunks be written in
+ monotonically non-decreasing order of offset in the file, this assertion
+ was being triggered when the list of chunk file space allocations being
+ passed to the collective chunk filling routine was not sorted according
+ to this particular requirement.
+
+ The addition of a sort of the out of order chunks trades a bit of
+ performance for the elimination of this assertion and of any complaints
+ from MPI implementations about the file offsets used being out of order.
+
+ (JTH - 2019/10/07, HDFFV-10792)
+
- Fixed the iteration error in test_versionbounds() in test/dtypes.c
The test was supposed to loop through all valid combinations of
@@ -854,6 +900,9 @@ Bug Fixes since HDF5-1.10.3 release
(MSB, 2018/1/8, HDFFV-10443)
+ - Corrected INTERFACE INTENT(IN) to INTENT(OUT) for buf_size in h5fget_file_image_f.
+
+ (MSB - 2020/2/18, HDFFV-11029)
Tools
-----
@@ -1173,12 +1222,8 @@ Supported Platforms
(emu) Sun Fortran 95 8.6 SunOS_sparc
Sun C++ 5.12 SunOS_sparc
- Windows 7 Visual Studio 2015 w/ Intel Fortran 18 (cmake)
-
Windows 7 x64 Visual Studio 2015 w/ Intel C, Fortran 2018 (cmake)
- Visual Studio 2015 w/ MSMPI 8 (cmake)
-
- Windows 10 Visual Studio 2015 w/ Intel Fortran 18 (cmake)
+ Visual Studio 2015 w/ MSMPI 10 (cmake)
Windows 10 x64 Visual Studio 2015 w/ Intel Fortran 18 (cmake)
Visual Studio 2017 w/ Intel Fortran 19 (cmake)
diff --git a/release_docs/USING_CMake_Examples.txt b/release_docs/USING_CMake_Examples.txt
index 21e153f..bd089a6 100644
--- a/release_docs/USING_CMake_Examples.txt
+++ b/release_docs/USING_CMake_Examples.txt
@@ -21,8 +21,8 @@ I. Preconditions
========================================================================
1. We suggest you obtain the latest CMake for windows from the Kitware
- web site. The HDF5 1.10.x product requires a minimum CMake version
- of 3.10.2. If you are using VS2019, the minimum version is 3.15.
+ web site. The HDF5 1.13.x product requires a minimum CMake version
+ of 3.12. If you are using VS2019, the minimum version is 3.15.
2. You have installed the HDF5 library built with CMake, by executing
the HDF Install Utility (the *.msi file in the binary package for
diff --git a/release_docs/USING_HDF5_CMake.txt b/release_docs/USING_HDF5_CMake.txt
index 73a24d9..f2d7754 100644
--- a/release_docs/USING_HDF5_CMake.txt
+++ b/release_docs/USING_HDF5_CMake.txt
@@ -36,8 +36,8 @@ I. Preconditions
========================================================================
1. We suggest you obtain the latest CMake for windows from the Kitware
- web site. The HDF5 1.10.x product requires a minimum CMake version
- of 3.10.1.
+ web site. The HDF5 1.13.x product requires a minimum CMake version
+ of 3.12.
2. You have installed the HDF5 library built with CMake, by executing
the HDF Install Utility (the *.msi file in the binary package for
@@ -47,7 +47,7 @@ I. Preconditions
3. Set the environment variable HDF5_DIR to the installed location of
the config files for HDF5. On Windows:
- HDF5_DIR=C:/Program Files/HDF_Group/HDF5/1.10.x/cmake
+ HDF5_DIR=C:/Program Files/HDF_Group/HDF5/1.13.x/cmake
(Note there are no quote characters used on Windows and all platforms
use forward slashes)
@@ -180,7 +180,7 @@ Given the preconditions in section I, create a CMakeLists.txt file at the
source root. Include the following text in the file:
##########################################################
-cmake_minimum_required (VERSION 3.10)
+cmake_minimum_required (VERSION 3.12)
project (HDF5MyApp C CXX)
set (LIB_TYPE STATIC) # or SHARED
diff --git a/release_docs/USING_HDF5_VS.txt b/release_docs/USING_HDF5_VS.txt
index ba22753..5ec9996 100644
--- a/release_docs/USING_HDF5_VS.txt
+++ b/release_docs/USING_HDF5_VS.txt
@@ -54,11 +54,11 @@ Using Visual Studio 2008 with HDF5 Libraries built with Visual Studio 2008
and select "x64".
2.2 Find the box "Show directories for", choose "Include files", add the
- header path (i.e. c:\Program Files\HDF_Group\HDF5\1.10.x\include)
+ header path (i.e. c:\Program Files\HDF_Group\HDF5\1.13.x\include)
to the included directories.
2.3 Find the box "Show directories for", choose "Library files", add the
- library path (i.e. c:\Program Files\HDF_Group\HDF5\1.10.x\lib)
+ library path (i.e. c:\Program Files\HDF_Group\HDF5\1.13.x\lib)
to the library directories.
2.4 If using Fortran libraries, you will also need to setup the path
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 070cf62..f582056 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required (VERSION 3.10)
+cmake_minimum_required (VERSION 3.12)
project (HDF5_SRC C)
#-----------------------------------------------------------------------------
diff --git a/src/H5Aint.c b/src/H5Aint.c
index fc5ea34..1a74abe 100644
--- a/src/H5Aint.c
+++ b/src/H5Aint.c
@@ -224,7 +224,7 @@ H5A__create(const H5G_loc_t *loc, const char *attr_name, const H5T_t *type,
HGOTO_ERROR(H5E_DATASET, H5E_CANTSET, NULL, "can't set version of dataspace")
/* Copy the object header information */
- if(H5O_loc_copy(&(attr->oloc), loc->oloc, H5_COPY_DEEP) < 0)
+ if(H5O_loc_copy_deep(&(attr->oloc), loc->oloc) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTOPENOBJ, NULL, "unable to copy entry")
/* Deep copy of the group hierarchy path */
@@ -390,7 +390,7 @@ H5A__open_common(const H5G_loc_t *loc, H5A_t *attr)
HGOTO_ERROR(H5E_ATTR, H5E_CANTRELEASE, FAIL, "can't release group hier. path")
/* Deep copy of the symbol table entry */
- if(H5O_loc_copy(&(attr->oloc), loc->oloc, H5_COPY_DEEP) < 0)
+ if(H5O_loc_copy_deep(&(attr->oloc), loc->oloc) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTOPENOBJ, FAIL, "unable to copy entry")
/* Deep copy of the group hier. path */
@@ -909,7 +909,7 @@ H5A__get_type(H5A_t *attr)
* reopen the type before returning it to the user. Make the type
* read-only.
*/
- if (NULL == (dt = H5T_copy(attr->shared->dt, H5T_COPY_REOPEN)))
+ if (NULL == (dt = H5T_copy_reopen(attr->shared->dt)))
HGOTO_ERROR(H5E_ATTR, H5E_CANTINIT, H5I_INVALID_HID, "unable to copy datatype")
/* Mark any datatypes as being in memory now */
diff --git a/src/H5B2leaf.c b/src/H5B2leaf.c
index 7ed0468..c1221ba 100644
--- a/src/H5B2leaf.c
+++ b/src/H5B2leaf.c
@@ -1051,7 +1051,7 @@ H5B2__assert_leaf(const H5B2_hdr_t H5_ATTR_NDEBUG_UNUSED *hdr,
*-------------------------------------------------------------------------
*/
H5_ATTR_PURE herr_t
-H5B2__assert_leaf2(const H5B2_hdr_t *hdr, const H5B2_leaf_t *leaf, const H5B2_leaf_t H5_ATTR_UNUSED *leaf2)
+H5B2__assert_leaf2(const H5B2_hdr_t H5_ATTR_NDEBUG_UNUSED *hdr, const H5B2_leaf_t H5_ATTR_NDEBUG_UNUSED *leaf, const H5B2_leaf_t H5_ATTR_UNUSED *leaf2)
{
/* General sanity checking on node */
HDassert(leaf->nrec <= hdr->node_info->split_nrec);
diff --git a/src/H5D.c b/src/H5D.c
index 178bb30..61a40df 100644
--- a/src/H5D.c
+++ b/src/H5D.c
@@ -598,7 +598,7 @@ H5Dget_offset(hid_t dset_id)
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, HADDR_UNDEF, "invalid dataset identifier")
/* Get the offset */
- if(H5VL_dataset_get(vol_obj, H5VL_DATASET_GET_OFFSET, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, &ret_value) < 0)
+ if(H5VL_dataset_optional(vol_obj, H5VL_NATIVE_DATASET_GET_OFFSET, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, &ret_value) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, HADDR_UNDEF, "unable to get offset")
done:
diff --git a/src/H5Dchunk.c b/src/H5Dchunk.c
index 556e367..e760f63 100644
--- a/src/H5Dchunk.c
+++ b/src/H5Dchunk.c
@@ -323,6 +323,7 @@ static herr_t H5D__chunk_prune_fill(H5D_chunk_it_ud1_t *udata, hbool_t new_unfil
#ifdef H5_HAVE_PARALLEL
static herr_t H5D__chunk_collective_fill(const H5D_t *dset,
H5D_chunk_coll_info_t *chunk_info, size_t chunk_size, const void *fill_buf);
+static int H5D__chunk_cmp_addr(const void *addr1, const void *addr2);
#endif /* H5_HAVE_PARALLEL */
static int
@@ -4958,6 +4959,7 @@ H5D__chunk_collective_fill(const H5D_t *dset, H5D_chunk_coll_info_t *chunk_info,
MPI_Datatype mem_type, file_type;
H5FD_mpio_xfer_t prev_xfer_mode; /* Previous data xfer mode */
hbool_t have_xfer_mode = FALSE; /* Whether the previous xffer mode has been retrieved */
+ hbool_t need_addr_sort = FALSE;
int i; /* Local index variable */
herr_t ret_value = SUCCEED; /* Return value */
@@ -5006,19 +5008,28 @@ H5D__chunk_collective_fill(const H5D_t *dset, H5D_chunk_coll_info_t *chunk_info,
/* make sure that the addresses in the datatype are
monotonically non decreasing */
- if(i)
- HDassert(chunk_disp_array[i] > chunk_disp_array[i - 1]);
- } /* end if */
+ if(i && (chunk_disp_array[i] < chunk_disp_array[i - 1]))
+ need_addr_sort = TRUE;
+ } /* end for */
/* calculate if there are any leftover blocks after evenly
distributing. If there are, then round robin the distribution
to processes 0 -> leftover. */
if(leftover && leftover > mpi_rank) {
chunk_disp_array[blocks] = (MPI_Aint)chunk_info->addr[blocks*mpi_size + mpi_rank];
+ if(blocks && (chunk_disp_array[blocks] < chunk_disp_array[blocks - 1]))
+ need_addr_sort = TRUE;
block_lens[blocks] = block_len;
blocks++;
}
+ /*
+ * Ensure that the blocks are sorted in monotonically non-decreasing
+ * order of offset in the file.
+ */
+ if(need_addr_sort)
+ HDqsort(chunk_disp_array, blocks, sizeof(MPI_Aint), H5D__chunk_cmp_addr);
+
/* MSC - should use this if MPI_type_create_hindexed block is working:
* mpi_code = MPI_Type_create_hindexed_block(blocks, block_len, chunk_disp_array, MPI_BYTE, &file_type);
*/
@@ -5073,6 +5084,36 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5D__chunk_collective_fill() */
+
+
+static int
+H5D__chunk_cmp_addr(const void *addr1, const void *addr2)
+{
+ MPI_Aint _addr1 = (MPI_Aint)0, _addr2 = (MPI_Aint)0;
+ int ret_value = 0;
+
+ FUNC_ENTER_STATIC_NOERR
+
+ _addr1 = *((const MPI_Aint *) addr1);
+ _addr2 = *((const MPI_Aint *) addr2);
+
+#if MPI_VERSION >= 3 && MPI_SUBVERSION >= 1
+ {
+ MPI_Aint diff = MPI_Aint_diff(_addr1, _addr2);
+
+ if(diff < (MPI_Aint)0)
+ ret_value = -1;
+ else if(diff > (MPI_Aint)0)
+ ret_value = 1;
+ else
+ ret_value = 0;
+ }
+#else
+ ret_value = (_addr1 > _addr2) - (_addr1 < _addr2);
+#endif
+
+ FUNC_LEAVE_NOAPI(ret_value)
+} /* end H5D__chunk_cmp_addr() */
#endif /* H5_HAVE_PARALLEL */
@@ -7162,7 +7203,7 @@ H5D__get_num_chunks(const H5D_t *dset, const H5S_t H5_ATTR_UNUSED *space, hsize_
} /* end else */
done:
- FUNC_LEAVE_NOAPI(ret_value)
+ FUNC_LEAVE_NOAPI_TAG(ret_value)
} /* end H5D__get_num_chunks() */
@@ -7300,7 +7341,7 @@ H5D__get_chunk_info(const H5D_t *dset, const H5S_t H5_ATTR_UNUSED *space, hsize_
} /* end if H5F_addr_defined */
done:
- FUNC_LEAVE_NOAPI(ret_value)
+ FUNC_LEAVE_NOAPI_TAG(ret_value)
} /* end H5D__get_chunk_info() */
diff --git a/src/H5Dint.c b/src/H5Dint.c
index 0d67fd0..1624f7b 100644
--- a/src/H5Dint.c
+++ b/src/H5Dint.c
@@ -1534,7 +1534,7 @@ H5D_open(const H5G_loc_t *loc, hid_t dapl_id)
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
/* Shallow copy (take ownership) of the object location object */
- if(H5O_loc_copy(&(dataset->oloc), loc->oloc, H5_COPY_SHALLOW) < 0)
+ if(H5O_loc_copy_shallow(&(dataset->oloc), loc->oloc) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTCOPY, NULL, "can't copy object location")
/* Shallow copy (take ownership) of the group hier. path */
@@ -3881,7 +3881,7 @@ H5D__get_type(const H5D_t *dset)
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to patch datatype's file pointer")
/* Copy the dataset's datatype */
- if(NULL == (dt = H5T_copy(dset->shared->type, H5T_COPY_REOPEN)))
+ if(NULL == (dt = H5T_copy_reopen(dset->shared->type)))
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to copy datatype")
/* Mark any datatypes as being in memory now */
diff --git a/src/H5FDs3comms.c b/src/H5FDs3comms.c
index f08e9d5..d9d4c88 100644
--- a/src/H5FDs3comms.c
+++ b/src/H5FDs3comms.c
@@ -1202,7 +1202,7 @@ H5FD_s3comms_s3r_open(const char *url,
if ((region != NULL && *region != '\0') ||
(id != NULL && *id != '\0') ||
- (signing_key != NULL && *signing_key != '\0'))
+ (signing_key != NULL))
{
/* if one exists, all three must exist
*/
@@ -1214,7 +1214,7 @@ H5FD_s3comms_s3r_open(const char *url,
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL,
"secret id cannot be null.\n");
}
- if (signing_key == NULL || signing_key[0] == '\0') {
+ if (signing_key == NULL) {
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL,
"signing key cannot be null.\n");
}
diff --git a/src/H5Fmount.c b/src/H5Fmount.c
index 13d95aa..5e6b899 100644
--- a/src/H5Fmount.c
+++ b/src/H5Fmount.c
@@ -766,7 +766,7 @@ H5F_traverse_mount(H5O_loc_t *oloc/*in,out*/)
HGOTO_ERROR(H5E_FILE, H5E_CANTFREE, FAIL, "unable to free object location")
/* Copy the entry for the root group */
- if(H5O_loc_copy(oloc, mnt_oloc, H5_COPY_DEEP) < 0)
+ if(H5O_loc_copy_deep(oloc, mnt_oloc) < 0)
HGOTO_ERROR(H5E_FILE, H5E_CANTCOPY, FAIL, "unable to copy object location")
/* In case the shared root group info points to a different file handle
diff --git a/src/H5Fprivate.h b/src/H5Fprivate.h
index f0c28ca..fbb164d 100644
--- a/src/H5Fprivate.h
+++ b/src/H5Fprivate.h
@@ -432,7 +432,7 @@ typedef struct H5F_t H5F_t;
default: HDassert("bad sizeof size" && 0); \
}
-#define H5F_DECODE_LENGTH(f,p,l) H5F_DECODE_LENGTH_LEN(p,l,H5F_SIZEOF_SIZE(f))
+#define H5F_DECODE_LENGTH(f,p,l) DECODE_VAR(p,l,H5F_SIZEOF_SIZE(f))
/*
* Macros that check for overflows. These are somewhat dangerous to fiddle
diff --git a/src/H5Gint.c b/src/H5Gint.c
index e0b8bd7..a3849a6 100644
--- a/src/H5Gint.c
+++ b/src/H5Gint.c
@@ -336,7 +336,7 @@ H5G_open(const H5G_loc_t *loc)
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "can't allocate space for group")
/* Shallow copy (take ownership) of the group location object */
- if(H5O_loc_copy(&(grp->oloc), loc->oloc, H5_COPY_SHALLOW) < 0)
+ if(H5O_loc_copy_shallow(&(grp->oloc), loc->oloc) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTCOPY, NULL, "can't copy object location")
if(H5G_name_copy(&(grp->path), loc->path, H5_COPY_SHALLOW) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTCOPY, NULL, "can't copy path")
diff --git a/src/H5Gobj.c b/src/H5Gobj.c
index 15dbd79..1892182 100644
--- a/src/H5Gobj.c
+++ b/src/H5Gobj.c
@@ -738,7 +738,7 @@ H5G__obj_info(const H5O_loc_t *oloc, H5G_info_t *grp_info)
H5G_loc_reset(&grp_loc);
/* Deep copy (duplicate) of the group location object */
- if(H5O_loc_copy(&grp_oloc, (H5O_loc_t *)oloc, H5_COPY_DEEP) < 0) /* (Casting away const OK - QAK) */
+ if(H5O_loc_copy_deep(&grp_oloc, oloc) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTCOPY, FAIL, "can't copy object location")
/* Open the group */
diff --git a/src/H5Gtraverse.c b/src/H5Gtraverse.c
index 7482e27..0f27880 100644
--- a/src/H5Gtraverse.c
+++ b/src/H5Gtraverse.c
@@ -132,7 +132,7 @@ H5G__traverse_slink_cb(H5G_loc_t H5_ATTR_UNUSED *grp_loc, const char H5_ATTR_UNU
} /* end if */
else {
/* Copy new location information for resolved object */
- H5O_loc_copy(udata->obj_loc->oloc, obj_loc->oloc, H5_COPY_DEEP);
+ H5O_loc_copy_deep(udata->obj_loc->oloc, obj_loc->oloc);
/* Indicate that the object exists */
udata->exists = TRUE;
diff --git a/src/H5I.c b/src/H5I.c
index 2ba8a2a..b233d23 100644
--- a/src/H5I.c
+++ b/src/H5I.c
@@ -215,7 +215,8 @@ H5I_term_package(void)
*-------------------------------------------------------------------------
*/
H5I_type_t
-H5Iregister_type(size_t hash_size, unsigned reserved, H5I_free_t free_func)
+H5Iregister_type(size_t H5_ATTR_DEBUG_API_USED hash_size, unsigned reserved,
+ H5I_free_t free_func)
{
H5I_class_t *cls = NULL; /* New ID class */
H5I_type_t new_type; /* New ID type value */
diff --git a/src/H5L.c b/src/H5L.c
index 0d5bc02..47e29c0 100644
--- a/src/H5L.c
+++ b/src/H5L.c
@@ -1910,7 +1910,7 @@ H5L__link_cb(H5G_loc_t *grp_loc/*in*/, const char *name, const H5O_link_t H5_ATT
* copy and wipe out grp_loc)
*/
H5G_name_reset(&temp_path);
- if(H5O_loc_copy(&temp_oloc, grp_loc->oloc, H5_COPY_DEEP) < 0)
+ if(H5O_loc_copy_deep(&temp_oloc, grp_loc->oloc) < 0)
HGOTO_ERROR(H5E_LINK, H5E_CANTCOPY, FAIL, "unable to copy object location")
temp_loc.oloc = &temp_oloc;
@@ -2695,7 +2695,7 @@ H5L__move_dest_cb(H5G_loc_t *grp_loc/*in*/, const char *name,
* copy and wipe out grp_loc)
*/
H5G_name_reset(&temp_path);
- if(H5O_loc_copy(&temp_oloc, grp_loc->oloc, H5_COPY_DEEP) < 0)
+ if(H5O_loc_copy_deep(&temp_oloc, grp_loc->oloc) < 0)
HGOTO_ERROR(H5E_LINK, H5E_CANTCOPY, FAIL, "unable to copy object location")
temp_loc.oloc = &temp_oloc;
diff --git a/src/H5Ochunk.c b/src/H5Ochunk.c
index 9ce5a46..72402e4 100644
--- a/src/H5Ochunk.c
+++ b/src/H5Ochunk.c
@@ -358,7 +358,7 @@ H5O__chunk_update_idx(H5F_t *f, H5O_t *oh, unsigned idx)
HGOTO_ERROR(H5E_OHDR, H5E_CANTUNPROTECT, FAIL, "unable to release object header chunk")
done:
- FUNC_LEAVE_NOAPI(ret_value)
+ FUNC_LEAVE_NOAPI_TAG(ret_value)
} /* end H5O__chunk_update_idx() */
diff --git a/src/H5Odbg.c b/src/H5Odbg.c
index b8190ae..3c91cae 100644
--- a/src/H5Odbg.c
+++ b/src/H5Odbg.c
@@ -153,7 +153,7 @@ H5O__assert(const H5O_t *oh)
/* Loop over all messages in object header */
for(u = 0, curr_msg = &oh->mesg[0]; u < oh->nmesgs; u++, curr_msg++) {
- uint8_t *curr_hdr; /* Start of current message header */
+ uint8_t H5_ATTR_NDEBUG_UNUSED *curr_hdr; /* Start of current message header */
size_t curr_tot_size; /* Total size of current message (including header) */
curr_hdr = curr_msg->raw - H5O_SIZEOF_MSGHDR_OH(oh);
@@ -164,7 +164,7 @@ H5O__assert(const H5O_t *oh)
free_space += curr_tot_size;
else if(H5O_CONT_ID == curr_msg->type->id) {
H5O_cont_t *cont = (H5O_cont_t *)curr_msg->native;
- hbool_t found_chunk = FALSE; /* Found a chunk that matches */
+ hbool_t H5_ATTR_NDEBUG_UNUSED found_chunk = FALSE; /* Found a chunk that matches */
HDassert(cont);
diff --git a/src/H5Oint.c b/src/H5Oint.c
index d5a3a71..04220af 100644
--- a/src/H5Oint.c
+++ b/src/H5Oint.c
@@ -1913,27 +1913,19 @@ H5O_loc_reset(H5O_loc_t *loc)
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5O_loc_reset() */
-
+
/*-------------------------------------------------------------------------
* Function: H5O_loc_copy
*
- * Purpose: Copy object location information
+ * Purpose: Copy object location information, according to the depth.
*
* Return: Success: Non-negative
- * Failure: Negative
+ * Failure: Negative
*
* Programmer: Quincey Koziol
* koziol@ncsa.uiuc.edu
* Monday, September 19, 2005
*
- * Notes: 'depth' parameter determines how much of the group entry
- * structure we want to copy. The values are:
- * H5_COPY_SHALLOW - Copy all the field values from the source
- * to the destination, but not copying objects pointed to.
- * (Destination "takes ownership" of objects pointed to)
- * H5_COPY_DEEP - Copy all the fields from the source to
- * the destination, deep copying objects pointed to.
- *
*-------------------------------------------------------------------------
*/
herr_t
@@ -1946,25 +1938,88 @@ H5O_loc_copy(H5O_loc_t *dst, H5O_loc_t *src, H5_copy_depth_t depth)
HDassert(dst);
HDassert(depth == H5_COPY_SHALLOW || depth == H5_COPY_DEEP);
+ /* Invoke correct routine */
+ if(depth == H5_COPY_SHALLOW)
+ H5O_loc_copy_shallow(dst, src);
+ else
+ H5O_loc_copy_deep(dst, src);
+
+ FUNC_LEAVE_NOAPI(SUCCEED)
+} /* end H5O_loc_copy() */
+
+
+/*-------------------------------------------------------------------------
+ * Function: H5O_loc_copy_shallow
+ *
+ * Purpose: Shallow copy object location information. Copies all the field
+ * values from the source to the destination, but not copying
+ * objects pointed to. (i.e. destination "takes ownership" of
+ * objects pointed to)
+ *
+ * Return: Success: Non-negative
+ * Failure: Negative
+ *
+ * Programmer: Quincey Koziol
+ * January 18, 2020
+ *
+ *-------------------------------------------------------------------------
+ */
+herr_t
+H5O_loc_copy_shallow(H5O_loc_t *dst, H5O_loc_t *src)
+{
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
+
+ /* Check arguments */
+ HDassert(src);
+ HDassert(dst);
+
/* Copy the top level information */
H5MM_memcpy(dst, src, sizeof(H5O_loc_t));
- /* Deep copy the names */
- if(depth == H5_COPY_DEEP) {
- /* If the original entry was holding open the file, this one should
- * hold it open, too.
- */
- if(src->holding_file)
- H5F_INCR_NOPEN_OBJS(dst->file);
- }
- else if(depth == H5_COPY_SHALLOW) {
- H5O_loc_reset(src);
- }
+ /* Reset the source location, as the destination 'owns' it now */
+ H5O_loc_reset(src);
FUNC_LEAVE_NOAPI(SUCCEED)
-} /* end H5O_loc_copy() */
+} /* end H5O_loc_copy_shallow() */
+
+/*-------------------------------------------------------------------------
+ * Function: H5O_loc_copy_deep
+ *
+ * Purpose: Deep copy object location information. Copies all the fields
+ * from the source to the destination, deep copying objects
+ * pointed to.
+ *
+ * Return: Success: Non-negative
+ * Failure: Negative
+ *
+ * Programmer: David Young
+ * January 18, 2020
+ *
+ *-------------------------------------------------------------------------
+ */
+herr_t
+H5O_loc_copy_deep(H5O_loc_t *dst, const H5O_loc_t *src)
+{
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
+
+ /* Check arguments */
+ HDassert(src);
+ HDassert(dst);
+
+ /* Copy the top level information */
+ H5MM_memcpy(dst, src, sizeof(H5O_loc_t));
+
+ /* If the original entry was holding open the file, this one should
+ * hold it open, too.
+ */
+ if(src->holding_file)
+ H5F_INCR_NOPEN_OBJS(dst->file);
+
+ FUNC_LEAVE_NOAPI(SUCCEED)
+} /* end H5O_loc_copy_deep() */
+
/*-------------------------------------------------------------------------
* Function: H5O_loc_hold_file
*
diff --git a/src/H5Oprivate.h b/src/H5Oprivate.h
index 52a72b2..ceaa96d 100644
--- a/src/H5Oprivate.h
+++ b/src/H5Oprivate.h
@@ -997,6 +997,8 @@ H5_DLL herr_t H5O_debug(H5F_t *f, haddr_t addr, FILE * stream, int indent,
/* These functions operate on object locations */
H5_DLL herr_t H5O_loc_reset(H5O_loc_t *loc);
H5_DLL herr_t H5O_loc_copy(H5O_loc_t *dst, H5O_loc_t *src, H5_copy_depth_t depth);
+H5_DLL herr_t H5O_loc_copy_shallow(H5O_loc_t *dst, H5O_loc_t *src);
+H5_DLL herr_t H5O_loc_copy_deep(H5O_loc_t *dst, const H5O_loc_t *src);
H5_DLL herr_t H5O_loc_hold_file(H5O_loc_t *loc);
H5_DLL herr_t H5O_loc_free(H5O_loc_t *loc);
H5_DLL H5O_loc_t *H5O_get_loc(hid_t id);
diff --git a/src/H5Pfapl.c b/src/H5Pfapl.c
index 9a04c3e..7866464 100644
--- a/src/H5Pfapl.c
+++ b/src/H5Pfapl.c
@@ -4479,7 +4479,8 @@ H5P_facc_mdc_log_location_close(const char H5_ATTR_UNUSED *name, size_t H5_ATTR_
*-------------------------------------------------------------------------
*/
herr_t
-H5Pset_evict_on_close(hid_t fapl_id, hbool_t evict_on_close)
+H5Pset_evict_on_close(hid_t fapl_id,
+ hbool_t H5_ATTR_PARALLEL_UNUSED evict_on_close)
{
H5P_genplist_t *plist; /* property list pointer */
herr_t ret_value = SUCCEED; /* return value */
diff --git a/src/H5T.c b/src/H5T.c
index f1c2dbb..5d3c4a1 100644
--- a/src/H5T.c
+++ b/src/H5T.c
@@ -301,6 +301,9 @@
/* Local Typedefs */
/******************/
+/* Typedef for recursive const-correct datatype copying routines */
+typedef H5T_t *(*H5T_copy_func_t)(H5T_t *old_dt);
+
/********************/
/* Local Prototypes */
@@ -313,6 +316,11 @@ static herr_t H5T__set_size(H5T_t *dt, size_t size);
static herr_t H5T__close_cb(H5T_t *dt);
static H5T_path_t *H5T__path_find_real(const H5T_t *src, const H5T_t *dst, const char *name, H5T_conv_func_t *conv);
static hbool_t H5T__detect_vlen_ref(const H5T_t *dt);
+static H5T_t *H5T__initiate_copy(const H5T_t *old_dt);
+static H5T_t *H5T__copy_transient(H5T_t *old_dt);
+static H5T_t *H5T__copy_all(H5T_t *old_dt);
+static herr_t H5T__complete_copy(H5T_t *new_dt, const H5T_t *old_dt,
+ H5T_shared_t *reopened_fo, hbool_t set_memory_type, H5T_copy_func_t copyfn);
/*****************************/
@@ -3304,132 +3312,152 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5T__create() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5T_copy
+ * Function: H5T__initiate_copy
*
- * Purpose: Copies datatype OLD_DT. The resulting data type is not
- * locked and is a transient type.
+ * Purpose: Allocates datatype structures, copies core fields, and initializes
+ * VOL fields.
*
* Return: Success: Pointer to a new copy of the OLD_DT argument.
- *
* Failure: NULL
*
- * Programmer: Robb Matzke
- * Thursday, December 4, 1997
+ * Note: Common code for both H5T_copy and H5T_copy_reopen, as part of
+ * the const-correct datatype copying routines.
+ *
+ * Programmer: David Young
+ * January 18, 2020
*
*-------------------------------------------------------------------------
*/
-H5T_t *
-H5T_copy(H5T_t *old_dt, H5T_copy_t method)
+static H5T_t *
+H5T__initiate_copy(const H5T_t *old_dt)
{
- H5T_t *new_dt = NULL, *tmp = NULL;
- H5T_shared_t *reopened_fo = NULL;
- unsigned i;
- char *s;
- H5T_t *ret_value = NULL; /* Return value */
-
- FUNC_ENTER_NOAPI(NULL)
+ H5T_t *new_dt = NULL; /* Copy of datatype */
+ H5T_t *ret_value = NULL; /* Return value */
- /* check args */
- HDassert(old_dt);
+ FUNC_ENTER_STATIC
/* Allocate space */
if(NULL == (new_dt = H5FL_MALLOC(H5T_t)))
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
+ HGOTO_ERROR(H5E_DATATYPE, H5E_CANTALLOC, NULL, "H5T_t memory allocation failed")
if(NULL == (new_dt->shared = H5FL_MALLOC(H5T_shared_t)))
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
+ HGOTO_ERROR(H5E_DATATYPE, H5E_CANTALLOC, NULL, "H5T_shared_t memory allocation failed")
- /* Copy shared information (entry information is copied last) */
+ /* Copy shared information */
*(new_dt->shared) = *(old_dt->shared);
- /* No VOL object */
+ /* Reset VOL fields */
new_dt->vol_obj = NULL;
-
- /* No owned VOL object */
new_dt->shared->owned_vol_obj = NULL;
- /* Check what sort of copy we are making */
- switch (method) {
- case H5T_COPY_TRANSIENT:
- /*
- * Return an unlocked transient type.
- */
- new_dt->shared->state = H5T_STATE_TRANSIENT;
- break;
+ /* Set return value */
+ ret_value = new_dt;
- case H5T_COPY_ALL:
- /*
- * Return a transient type (locked or unlocked) or an unopened named
- * type. Immutable transient types are degraded to read-only.
- */
- if(H5T_STATE_OPEN==old_dt->shared->state)
- new_dt->shared->state = H5T_STATE_NAMED;
- else if(H5T_STATE_IMMUTABLE==old_dt->shared->state)
- new_dt->shared->state = H5T_STATE_RDONLY;
- break;
+done:
+ if(ret_value == NULL)
+ if(new_dt) {
+ if(new_dt->shared)
+ new_dt->shared = H5FL_FREE(H5T_shared_t, new_dt->shared);
+ new_dt = H5FL_FREE(H5T_t, new_dt);
+ } /* end if */
- case H5T_COPY_REOPEN:
- /*
- * Return a transient type (locked or unlocked) or an opened named
- * type. Immutable transient types are degraded to read-only.
- */
- if(old_dt->sh_loc.type == H5O_SHARE_TYPE_COMMITTED) {
- /* Check if the object is already open */
- if(NULL == (reopened_fo = (H5T_shared_t *)H5FO_opened(old_dt->sh_loc.file, old_dt->sh_loc.u.loc.oh_addr))) {
- /* Clear any errors from H5FO_opened() */
- H5E_clear_stack(NULL);
+ FUNC_LEAVE_NOAPI(ret_value)
+} /* end H5T__initiate_copy() */
- /* Open named datatype again */
- if(H5O_open(&old_dt->oloc) < 0)
- HGOTO_ERROR(H5E_DATATYPE, H5E_CANTOPENOBJ, NULL, "unable to reopen named data type")
+
+/*-------------------------------------------------------------------------
+ * Function: H5T__copy_transient
+ *
+ * Purpose: Part of recursive framework for const-correct datatype copying.
+ *
+ * Return: Success: Pointer to a new copy of the OLD_DT argument.
+ * Failure: NULL
+ *
+ * Programmer: David Young
+ * January 18, 2020
+ *
+ *-------------------------------------------------------------------------
+ */
+static H5T_t *
+H5T__copy_transient(H5T_t *old_dt)
+{
+ H5T_t *ret_value = NULL; /* Return value */
- /* Insert opened named datatype into opened object list for the file */
- if(H5FO_insert(old_dt->sh_loc.file, old_dt->sh_loc.u.loc.oh_addr, new_dt->shared, FALSE)<0)
- HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINSERT, NULL, "can't insert datatype into list of open objects")
+ FUNC_ENTER_STATIC
- /* Increment object count for the object in the top file */
- if(H5FO_top_incr(old_dt->sh_loc.file, old_dt->sh_loc.u.loc.oh_addr) < 0)
- HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINC, NULL, "can't increment object count")
+ /* Copy datatype, with correct method */
+ if(NULL == (ret_value = H5T_copy(old_dt, H5T_COPY_TRANSIENT)))
+ HGOTO_ERROR(H5E_DATATYPE, H5E_CANTCOPY, NULL, "can't make 'transient' copy of datatype")
- new_dt->shared->fo_count = 1;
- } /* end if */
- else {
- /* The object is already open. Free the H5T_shared_t struct
- * we had been using and use the one that already exists.
- * Not terribly efficient. */
- new_dt->shared = H5FL_FREE(H5T_shared_t, new_dt->shared);
- new_dt->shared = reopened_fo;
-
- reopened_fo->fo_count++;
-
- /* Check if the object has been opened through the top file yet */
- if(H5FO_top_count(old_dt->sh_loc.file, old_dt->sh_loc.u.loc.oh_addr) == 0) {
- /* Open the object through this top file */
- if(H5O_open(&old_dt->oloc) < 0)
- HGOTO_ERROR(H5E_DATATYPE, H5E_CANTOPENOBJ, NULL, "unable to open object header")
- } /* end if */
+done:
+ FUNC_LEAVE_NOAPI(ret_value)
+} /* end H5T__copy_transient() */
- /* Increment object count for the object in the top file */
- if(H5FO_top_incr(old_dt->sh_loc.file, old_dt->sh_loc.u.loc.oh_addr) < 0)
- HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINC, NULL, "can't increment object count")
- } /* end else */
- new_dt->shared->state = H5T_STATE_OPEN;
- }
- else if(H5T_STATE_IMMUTABLE == old_dt->shared->state) {
- new_dt->shared->state = H5T_STATE_RDONLY;
- }
- break;
- default:
- HGOTO_ERROR(H5E_DATATYPE, H5E_BADTYPE, NULL, "invalid copy method type")
- } /* end switch */
+
+/*-------------------------------------------------------------------------
+ * Function: H5T__copy_all
+ *
+ * Purpose: Part of recursive framework for const-correct datatype copying.
+ *
+ * Return: Success: Pointer to a new copy of the OLD_DT argument.
+ * Failure: NULL
+ *
+ * Programmer: David Young
+ * January 18, 2020
+ *
+ *-------------------------------------------------------------------------
+ */
+static H5T_t *
+H5T__copy_all(H5T_t *old_dt)
+{
+ H5T_t *ret_value = NULL; /* Return value */
+
+ FUNC_ENTER_STATIC
+
+ /* Copy datatype, with correct method */
+ if(NULL == (ret_value = H5T_copy(old_dt, H5T_COPY_ALL)))
+ HGOTO_ERROR(H5E_DATATYPE, H5E_CANTCOPY, NULL, "can't make 'all' copy of datatype")
+
+done:
+ FUNC_LEAVE_NOAPI(ret_value)
+} /* end H5T__copy_transient() */
+
+
+/*-------------------------------------------------------------------------
+ * Function: H5T__complete_copy
+ *
+ * Purpose: Completes copying datatype fields, as part of the recursive
+ * const-correct datatype copy routines.
+ *
+ * Return: Success: non-negative
+ * Failure: negative
+ *
+ * Note: Common code for both H5T_copy and H5T_copy_reopen.
+ *
+ * Programmer: David Young
+ * January 18, 2020
+ *
+ *-------------------------------------------------------------------------
+ */
+static herr_t
+H5T__complete_copy(H5T_t *new_dt, const H5T_t *old_dt, H5T_shared_t *reopened_fo,
+ hbool_t set_memory_type, H5T_copy_func_t copyfn)
+{
+ H5T_t *tmp = NULL; /* Temporary copy of compound field's datatype */
+ char *s; /* Temporary copy of compound field name / enum value name */
+ unsigned i; /* Local index variable */
+ herr_t ret_value = SUCCEED; /* Return value */
+
+ FUNC_ENTER_STATIC
/* Update fields in the new struct, if we aren't sharing an already opened
* committed datatype */
if(!reopened_fo) {
/* Copy parent information */
if(old_dt->shared->parent)
- new_dt->shared->parent = H5T_copy(old_dt->shared->parent, method);
+ if(NULL == (new_dt->shared->parent = (*copyfn)(old_dt->shared->parent)))
+ HGOTO_ERROR(H5E_DATATYPE, H5E_CANTCOPY, FAIL, "can't copy datatype's parent type")
switch(new_dt->shared->type) {
case H5T_COMPOUND:
@@ -3443,10 +3471,8 @@ H5T_copy(H5T_t *old_dt, H5T_copy_t method)
*/
/* Only malloc if space has been allocated for members - NAF */
if(new_dt->shared->u.compnd.nalloc > 0) {
- new_dt->shared->u.compnd.memb =
- (H5T_cmemb_t *)H5MM_malloc(new_dt->shared->u.compnd.nalloc * sizeof(H5T_cmemb_t));
- if (NULL == new_dt->shared->u.compnd.memb)
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
+ if(NULL == (new_dt->shared->u.compnd.memb = H5MM_malloc(new_dt->shared->u.compnd.nalloc * sizeof(H5T_cmemb_t))))
+ HGOTO_ERROR(H5E_DATATYPE, H5E_CANTALLOC, FAIL, "memory allocation failed")
H5MM_memcpy(new_dt->shared->u.compnd.memb, old_dt->shared->u.compnd.memb,
new_dt->shared->u.compnd.nmembs * sizeof(H5T_cmemb_t));
@@ -3456,15 +3482,17 @@ H5T_copy(H5T_t *old_dt, H5T_copy_t method)
unsigned j;
int old_match;
- s = new_dt->shared->u.compnd.memb[i].name;
- new_dt->shared->u.compnd.memb[i].name = H5MM_xstrdup(s);
- tmp = H5T_copy (old_dt->shared->u.compnd.memb[i].type, method);
+ if(NULL == (s = H5MM_xstrdup(new_dt->shared->u.compnd.memb[i].name)))
+ HGOTO_ERROR(H5E_DATATYPE, H5E_CANTCOPY, FAIL, "can't copy string for compound field's name")
+ new_dt->shared->u.compnd.memb[i].name = s;
+ if(NULL == (tmp = (*copyfn)(old_dt->shared->u.compnd.memb[i].type)))
+ HGOTO_ERROR(H5E_DATATYPE, H5E_CANTCOPY, FAIL, "can't copy compound field's datatype")
new_dt->shared->u.compnd.memb[i].type = tmp;
HDassert(tmp != NULL);
/* Range check against compound member's offset */
- if ((accum_change < 0) && ((ssize_t) new_dt->shared->u.compnd.memb[i].offset < accum_change))
- HGOTO_ERROR(H5E_DATATYPE, H5E_BADVALUE, NULL, "invalid field size in datatype")
+ if((accum_change < 0) && ((ssize_t) new_dt->shared->u.compnd.memb[i].offset < accum_change))
+ HGOTO_ERROR(H5E_DATATYPE, H5E_BADVALUE, FAIL, "invalid field size in datatype")
/* Apply the accumulated size change to the offset of the field */
new_dt->shared->u.compnd.memb[i].offset += (size_t) accum_change;
@@ -3479,7 +3507,7 @@ H5T_copy(H5T_t *old_dt, H5T_copy_t method)
/* check if we couldn't find a match */
if(old_match < 0)
- HGOTO_ERROR(H5E_DATATYPE, H5E_CANTCOPY, NULL, "fields in datatype corrupted")
+ HGOTO_ERROR(H5E_DATATYPE, H5E_CANTCOPY, FAIL, "fields in datatype corrupted")
} /* end if */
else
old_match = (int) i;
@@ -3494,8 +3522,8 @@ H5T_copy(H5T_t *old_dt, H5T_copy_t method)
} /* end for */
/* Range check against datatype size */
- if ((accum_change < 0) && ((ssize_t) new_dt->shared->size < accum_change))
- HGOTO_ERROR(H5E_DATATYPE, H5E_BADVALUE, NULL, "invalid field size in datatype")
+ if((accum_change < 0) && ((ssize_t) new_dt->shared->size < accum_change))
+ HGOTO_ERROR(H5E_DATATYPE, H5E_BADVALUE, FAIL, "invalid field size in datatype")
/* Apply the accumulated size change to the size of the compound struct */
new_dt->shared->size += (size_t) accum_change;
@@ -3508,27 +3536,25 @@ H5T_copy(H5T_t *old_dt, H5T_copy_t method)
* of each new member with copied values. That is, H5T_copy() is a
* deep copy.
*/
- new_dt->shared->u.enumer.name =
- (char **)H5MM_malloc(new_dt->shared->u.enumer.nalloc * sizeof(char*));
- new_dt->shared->u.enumer.value =
- (uint8_t *)H5MM_malloc(new_dt->shared->u.enumer.nalloc * new_dt->shared->size);
- if(NULL == new_dt->shared->u.enumer.value)
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
+ if(NULL == (new_dt->shared->u.enumer.name = H5MM_malloc(new_dt->shared->u.enumer.nalloc * sizeof(char*))))
+ HGOTO_ERROR(H5E_DATATYPE, H5E_CANTALLOC, FAIL, "enam name array memory allocation failed")
+ if(NULL == (new_dt->shared->u.enumer.value = H5MM_malloc(new_dt->shared->u.enumer.nalloc * new_dt->shared->size)))
+ HGOTO_ERROR(H5E_DATATYPE, H5E_CANTALLOC, FAIL, "enam value array memory allocation failed")
H5MM_memcpy(new_dt->shared->u.enumer.value, old_dt->shared->u.enumer.value,
new_dt->shared->u.enumer.nmembs * new_dt->shared->size);
for(i = 0; i < new_dt->shared->u.enumer.nmembs; i++) {
- s = old_dt->shared->u.enumer.name[i];
- new_dt->shared->u.enumer.name[i] = H5MM_xstrdup(s);
+ if(NULL == (s = H5MM_xstrdup(old_dt->shared->u.enumer.name[i])))
+ HGOTO_ERROR(H5E_DATATYPE, H5E_CANTCOPY, FAIL, "can't copy string for enum value's name")
+ new_dt->shared->u.enumer.name[i] = s;
} /* end for */
break;
case H5T_VLEN:
case H5T_REFERENCE:
- if(method == H5T_COPY_TRANSIENT || method == H5T_COPY_REOPEN) {
+ if(set_memory_type)
/* H5T_copy converts any type into a memory type */
if(H5T_set_loc(new_dt, NULL, H5T_LOC_MEMORY) < 0)
- HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, NULL, "invalid datatype location")
- } /* end if */
+ HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "invalid datatype location")
break;
case H5T_OPAQUE:
@@ -3540,7 +3566,7 @@ H5T_copy(H5T_t *old_dt, H5T_copy_t method)
case H5T_ARRAY:
/* Re-compute the array's size, in case it's base type changed size */
- new_dt->shared->size=new_dt->shared->u.array.nelem*new_dt->shared->parent->shared->size;
+ new_dt->shared->size = new_dt->shared->u.array.nelem * new_dt->shared->parent->shared->size;
break;
case H5T_NO_CLASS:
@@ -3559,15 +3585,15 @@ H5T_copy(H5T_t *old_dt, H5T_copy_t method)
* type and the new type is also named.
*/
if(H5O_loc_reset(&new_dt->oloc) < 0)
- HGOTO_ERROR(H5E_DATATYPE, H5E_CANTRESET, NULL, "unable to initialize location")
+ HGOTO_ERROR(H5E_DATATYPE, H5E_CANTRESET, FAIL, "unable to initialize location")
if(H5G_name_reset(&new_dt->path) < 0)
- HGOTO_ERROR(H5E_DATATYPE, H5E_CANTOPENOBJ, NULL, "unable to reset path")
+ HGOTO_ERROR(H5E_DATATYPE, H5E_CANTOPENOBJ, FAIL, "unable to reset path")
if(new_dt->shared->state == H5T_STATE_NAMED || new_dt->shared->state == H5T_STATE_OPEN) {
- if(H5O_loc_copy(&(new_dt->oloc), &(old_dt->oloc), H5_COPY_DEEP) < 0)
- HGOTO_ERROR(H5E_DATATYPE, H5E_CANTCOPY, NULL, "can't copy object location")
+ if(H5O_loc_copy_deep(&(new_dt->oloc), &(old_dt->oloc)) < 0)
+ HGOTO_ERROR(H5E_DATATYPE, H5E_CANTCOPY, FAIL, "can't copy object location")
if(H5G_name_copy(&(new_dt->path), &(old_dt->path), H5_COPY_DEEP) < 0)
- HGOTO_ERROR(H5E_DATATYPE, H5E_CANTOPENOBJ, NULL, "unable to copy path")
+ HGOTO_ERROR(H5E_DATATYPE, H5E_CANTOPENOBJ, FAIL, "unable to copy path")
} /* end if */
/* Copy shared location information if the new type is named or if it is
@@ -3576,28 +3602,194 @@ H5T_copy(H5T_t *old_dt, H5T_copy_t method)
if((old_dt->sh_loc.type == H5O_SHARE_TYPE_SOHM || old_dt->sh_loc.type == H5O_SHARE_TYPE_HERE) ||
new_dt->shared->state == H5T_STATE_NAMED || new_dt->shared->state == H5T_STATE_OPEN) {
if(H5O_set_shared(&(new_dt->sh_loc), &(old_dt->sh_loc)) < 0)
- HGOTO_ERROR(H5E_DATATYPE, H5E_CANTCOPY, NULL, "can't copy shared information")
+ HGOTO_ERROR(H5E_DATATYPE, H5E_CANTCOPY, FAIL, "can't copy shared information")
} /* end if */
else
/* Reset shared component info */
H5O_msg_reset_share(H5O_DTYPE_ID, new_dt);
+done:
+ FUNC_LEAVE_NOAPI(ret_value)
+} /* end H5T__complete_copy() */
+
+
+/*-------------------------------------------------------------------------
+ * Function: H5T_copy
+ *
+ * Purpose: Copies datatype OLD_DT. The resulting data type is not
+ * locked and is a transient type.
+ *
+ * Return: Success: Pointer to a new copy of the OLD_DT argument.
+ * Failure: NULL
+ *
+ * Programmer: Robb Matzke
+ * Thursday, December 4, 1997
+ *
+ *-------------------------------------------------------------------------
+ */
+H5T_t *
+H5T_copy(const H5T_t *old_dt, H5T_copy_t method)
+{
+ H5T_t *new_dt = NULL; /* New datatype */
+ H5T_copy_func_t copyfn; /* Pointer to correct copy routine */
+ H5T_t *ret_value = NULL; /* Return value */
+
+ FUNC_ENTER_NOAPI(NULL)
+
+ /* check args */
+ HDassert(old_dt);
+
+ /* Allocate and copy core datatype information */
+ if(NULL == (new_dt = H5T__initiate_copy(old_dt)))
+ HGOTO_ERROR(H5E_DATATYPE, H5E_CANTCOPY, NULL, "can't copy core datatype info")
+
+ /* Check what sort of copy we are making */
+ switch (method) {
+ case H5T_COPY_TRANSIENT:
+ /*
+ * Return an unlocked transient type.
+ */
+ new_dt->shared->state = H5T_STATE_TRANSIENT;
+ copyfn = H5T__copy_transient;
+ break;
+
+ case H5T_COPY_ALL:
+ /*
+ * Return a transient type (locked or unlocked) or an unopened named
+ * type. Immutable transient types are degraded to read-only.
+ */
+ if(H5T_STATE_OPEN==old_dt->shared->state)
+ new_dt->shared->state = H5T_STATE_NAMED;
+ else if(H5T_STATE_IMMUTABLE==old_dt->shared->state)
+ new_dt->shared->state = H5T_STATE_RDONLY;
+ copyfn = H5T__copy_all;
+ break;
+
+ default:
+ HGOTO_ERROR(H5E_DATATYPE, H5E_BADTYPE, NULL, "invalid copy method type")
+ } /* end switch */
+
+ /* Finish making the copy of the datatype */
+ if(H5T__complete_copy(new_dt, old_dt, NULL, (method == H5T_COPY_TRANSIENT), copyfn) < 0)
+ HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, NULL, "can't complete datatype initialization")
+
/* Set return value */
ret_value = new_dt;
done:
- if(ret_value == NULL) {
+ if(ret_value == NULL)
if(new_dt) {
- if(new_dt->shared)
- new_dt->shared = H5FL_FREE(H5T_shared_t, new_dt->shared);
+ HDassert(new_dt->shared);
+ new_dt->shared = H5FL_FREE(H5T_shared_t, new_dt->shared);
new_dt = H5FL_FREE(H5T_t, new_dt);
} /* end if */
- } /* end if */
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5T_copy() */
+
+/*-------------------------------------------------------------------------
+ * Function: H5T_copy_reopen
+ *
+ * Purpose: Copy a datatype, possibly reopening a named datatype, as part
+ * the const-correct datatype copying routines.
+ *
+ * Return: Success: Pointer to a new copy of the OLD_DT argument.
+ * Failure: NULL
+ *
+ * Programmer: David Young
+ * January 18, 2020
+ *
+ *-------------------------------------------------------------------------
+ */
+H5T_t *
+H5T_copy_reopen(H5T_t *old_dt)
+{
+ H5T_t *new_dt = NULL; /* New datatype */
+ H5T_shared_t *reopened_fo = NULL; /* Pointer to reopened existing named datatype */
+ H5T_t *ret_value = NULL; /* Return value */
+
+ FUNC_ENTER_NOAPI(NULL)
+
+ /* check args */
+ HDassert(old_dt);
+
+ /* Allocate and copy core datatype information */
+ if(NULL == (new_dt = H5T__initiate_copy(old_dt)))
+ HGOTO_ERROR(H5E_DATATYPE, H5E_CANTCOPY, NULL, "can't copy core datatype info")
+
+ /*
+ * Return a transient type (locked or unlocked) or an opened named
+ * type. Immutable transient types are degraded to read-only.
+ */
+ if(old_dt->sh_loc.type == H5O_SHARE_TYPE_COMMITTED) {
+ /* Check if the object is already open */
+ if(NULL == (reopened_fo = (H5T_shared_t *)H5FO_opened(old_dt->sh_loc.file, old_dt->sh_loc.u.loc.oh_addr))) {
+ /* Clear any errors from H5FO_opened() */
+ H5E_clear_stack(NULL);
+
+ /* Open named datatype again */
+ if(H5O_open(&old_dt->oloc) < 0)
+ HGOTO_ERROR(H5E_DATATYPE, H5E_CANTOPENOBJ, NULL, "unable to reopen named data type")
+
+ /* Insert opened named datatype into opened object list for the file */
+ if(H5FO_insert(old_dt->sh_loc.file, old_dt->sh_loc.u.loc.oh_addr, new_dt->shared, FALSE)<0)
+ HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINSERT, NULL, "can't insert datatype into list of open objects")
+
+ /* Increment object count for the object in the top file */
+ if(H5FO_top_incr(old_dt->sh_loc.file, old_dt->sh_loc.u.loc.oh_addr) < 0)
+ HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINC, NULL, "can't increment object count")
+
+ new_dt->shared->fo_count = 1;
+ } /* end if */
+ else {
+ /* The object is already open. Free the H5T_shared_t struct
+ * we had been using and use the one that already exists.
+ * Not terribly efficient. */
+ new_dt->shared = H5FL_FREE(H5T_shared_t, new_dt->shared);
+ new_dt->shared = reopened_fo;
+
+ reopened_fo->fo_count++;
+
+ /* Check if the object has been opened through the top file yet */
+ if(H5FO_top_count(old_dt->sh_loc.file, old_dt->sh_loc.u.loc.oh_addr) == 0) {
+ /* Open the object through this top file */
+ if(H5O_open(&old_dt->oloc) < 0)
+ HGOTO_ERROR(H5E_DATATYPE, H5E_CANTOPENOBJ, NULL, "unable to open object header")
+ } /* end if */
+
+ /* Increment object count for the object in the top file */
+ if(H5FO_top_incr(old_dt->sh_loc.file, old_dt->sh_loc.u.loc.oh_addr) < 0)
+ HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINC, NULL, "can't increment object count")
+ } /* end else */
+
+ /* Set state for new datatype */
+ new_dt->shared->state = H5T_STATE_OPEN;
+ } /* end if */
+ else
+ /* Downgrade immutable datatypes to read-only */
+ if(H5T_STATE_IMMUTABLE == old_dt->shared->state)
+ new_dt->shared->state = H5T_STATE_RDONLY;
+
+ /* Finish making the copy of the datatype */
+ if(H5T__complete_copy(new_dt, old_dt, reopened_fo, TRUE, H5T_copy_reopen) < 0)
+ HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, NULL, "can't complete datatype initialization")
+
+ /* Set return value */
+ ret_value = new_dt;
+
+done:
+ if(ret_value == NULL)
+ if(new_dt) {
+ HDassert(new_dt->shared);
+ new_dt->shared = H5FL_FREE(H5T_shared_t, new_dt->shared);
+ new_dt = H5FL_FREE(H5T_t, new_dt);
+ } /* end if */
+
+ FUNC_LEAVE_NOAPI(ret_value)
+} /* end H5T_copy_reopen() */
+
/*-------------------------------------------------------------------------
* Function: H5T_lock
*
diff --git a/src/H5TS.c b/src/H5TS.c
index cc55810..b0cef7f 100644
--- a/src/H5TS.c
+++ b/src/H5TS.c
@@ -639,13 +639,4 @@ H5TS_create_thread(void *(*func)(void *), H5TS_attr_t *attr, void *udata)
} /* H5TS_create_thread */
-#else /* H5_HAVE_THREADSAFE */
-
-uint64_t
-H5TS_thread_id(void)
-{
- return 0;
-}
-
#endif /* H5_HAVE_THREADSAFE */
-
diff --git a/src/H5Tcommit.c b/src/H5Tcommit.c
index 1b922d5..7d26af3 100644
--- a/src/H5Tcommit.c
+++ b/src/H5Tcommit.c
@@ -446,7 +446,7 @@ H5T__commit(H5F_t *file, H5T_t *type, hid_t tcpl_id)
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "unable to update type header message")
/* Copy the new object header's location into the datatype, taking ownership of it */
- if(H5O_loc_copy(&(type->oloc), &temp_oloc, H5_COPY_SHALLOW) < 0)
+ if(H5O_loc_copy_shallow(&(type->oloc), &temp_oloc) < 0)
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "unable to copy datatype location")
if(H5G_name_copy(&(type->path), &temp_path, H5_COPY_SHALLOW) < 0)
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "unable to copy datatype location")
@@ -943,7 +943,7 @@ H5T_open(const H5G_loc_t *loc)
#endif /* H5_USING_MEMCHECKER */
/* Shallow copy (take ownership) of the object location object */
- if(H5O_loc_copy(&dt->oloc, loc->oloc, H5_COPY_SHALLOW) < 0)
+ if(H5O_loc_copy_shallow(&dt->oloc, loc->oloc) < 0)
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTCOPY, NULL, "can't copy object location")
/* Shallow copy (take ownership) of the group hier. path */
@@ -1033,7 +1033,7 @@ H5T__open_oid(const H5G_loc_t *loc)
dt->shared->state = H5T_STATE_OPEN;
/* Shallow copy (take ownership) of the object location object */
- if(H5O_loc_copy(&dt->oloc, loc->oloc, H5_COPY_SHALLOW) < 0)
+ if(H5O_loc_copy_shallow(&dt->oloc, loc->oloc) < 0)
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTCOPY, NULL, "can't copy object location")
/* Shallow copy (take ownership) of the group hier. path */
diff --git a/src/H5Tcompound.c b/src/H5Tcompound.c
index d4f1008..f4a9e04 100644
--- a/src/H5Tcompound.c
+++ b/src/H5Tcompound.c
@@ -51,8 +51,9 @@
/********************/
/* Local Prototypes */
/********************/
-static herr_t H5T_pack(const H5T_t *dt);
-static htri_t H5T_is_packed(const H5T_t *dt);
+static herr_t H5T__pack(const H5T_t *dt);
+static htri_t H5T__is_packed(const H5T_t *dt);
+static H5T_t *H5T__reopen_member_type(const H5T_t *dt, unsigned membno);
/*********************/
@@ -226,7 +227,7 @@ H5Tget_member_type(hid_t type_id, unsigned membno)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, H5I_INVALID_HID, "invalid member number")
/* Retrieve the datatype for the member */
- if(NULL == (memb_dt = H5T_get_member_type(dt, membno, H5T_COPY_REOPEN)))
+ if(NULL == (memb_dt = H5T__reopen_member_type(dt, membno)))
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, H5I_INVALID_HID, "unable to retrieve member type")
/* Get an ID for the datatype */
@@ -245,8 +246,7 @@ done:
/*-------------------------------------------------------------------------
* Function: H5T_get_member_type
*
- * Purpose: Private function for H5Tget_member_type. Returns the data
- * type of the specified member.
+ * Purpose: Returns a copy of the data type of the specified member.
*
* Return: Success: A copy of the member datatype;
* modifying the returned datatype does not
@@ -260,18 +260,19 @@ done:
*-------------------------------------------------------------------------
*/
H5T_t *
-H5T_get_member_type(const H5T_t *dt, unsigned membno, H5T_copy_t method)
+H5T_get_member_type(const H5T_t *dt, unsigned membno)
{
H5T_t *ret_value = NULL; /* Return value */
FUNC_ENTER_NOAPI(NULL)
+ /* Sanity checks */
HDassert(dt);
HDassert(membno < dt->shared->u.compnd.nmembs);
- /* Copy datatype into an atom */
- if(NULL == (ret_value = H5T_copy(dt->shared->u.compnd.memb[membno].type, method)))
- HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, NULL, "unable to copy member datatype")
+ /* Copy datatype */
+ if(NULL == (ret_value = H5T_copy(dt->shared->u.compnd.memb[membno].type, H5T_COPY_TRANSIENT)))
+ HGOTO_ERROR(H5E_DATATYPE, H5E_CANTCOPY, NULL, "unable to copy member datatype")
done:
FUNC_LEAVE_NOAPI(ret_value)
@@ -279,6 +280,43 @@ done:
/*-------------------------------------------------------------------------
+ * Function: H5T__reopen_member_type
+ *
+ * Purpose: Private function for H5Tget_member_type. Returns a re-opened
+ * copy of the data type of the specified member.
+ *
+ * Return: Success: A copy of the member datatype;
+ * modifying the returned datatype does not
+ * modify the member type.
+ *
+ * Failure: NULL
+ *
+ * Programmer: David Young
+ * January 18, 2020
+ *
+ *-------------------------------------------------------------------------
+ */
+static H5T_t *
+H5T__reopen_member_type(const H5T_t *dt, unsigned membno)
+{
+ H5T_t *ret_value = NULL; /* Return value */
+
+ FUNC_ENTER_STATIC
+
+ /* Sanity checks */
+ HDassert(dt);
+ HDassert(membno < dt->shared->u.compnd.nmembs);
+
+ /* Copy datatype, possibly re-opening it */
+ if(NULL == (ret_value = H5T_copy_reopen(dt->shared->u.compnd.memb[membno].type)))
+ HGOTO_ERROR(H5E_DATATYPE, H5E_CANTCOPY, NULL, "unable to reopen member datatype")
+
+done:
+ FUNC_LEAVE_NOAPI(ret_value)
+} /* end H5T__reopen_member_type() */
+
+
+/*-------------------------------------------------------------------------
* Function: H5T__get_member_size
*
* Purpose: Returns the size of the specified member.
@@ -387,7 +425,7 @@ H5Tpack(hid_t type_id)
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a compound datatype")
/* Pack */
- if(H5T_pack(dt) < 0)
+ if(H5T__pack(dt) < 0)
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "unable to pack compound datatype")
done:
@@ -493,7 +531,7 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5T_pack
+ * Function: H5T__pack
*
* Purpose: Recursively packs a compound datatype by removing padding
* bytes. This is done in place (that is, destructively).
@@ -506,17 +544,17 @@ done:
*-------------------------------------------------------------------------
*/
static herr_t
-H5T_pack(const H5T_t *dt)
+H5T__pack(const H5T_t *dt)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
HDassert(dt);
if(H5T_detect_class(dt, H5T_COMPOUND, FALSE) > 0) {
/* If datatype has been packed, skip packing it and indicate success */
- if(TRUE == H5T_is_packed(dt))
+ if(TRUE == H5T__is_packed(dt))
HGOTO_DONE(SUCCEED)
/* Check for packing unmodifiable datatype */
@@ -524,7 +562,7 @@ H5T_pack(const H5T_t *dt)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "datatype is read-only")
if(dt->shared->parent) {
- if (H5T_pack(dt->shared->parent) < 0)
+ if(H5T__pack(dt->shared->parent) < 0)
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "unable to pack parent of datatype")
/* Adjust size of datatype appropriately */
@@ -539,7 +577,7 @@ H5T_pack(const H5T_t *dt)
/* Recursively pack the members */
for(i = 0; i < dt->shared->u.compnd.nmembs; i++) {
- if(H5T_pack(dt->shared->u.compnd.memb[i].type) < 0)
+ if(H5T__pack(dt->shared->u.compnd.memb[i].type) < 0)
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "unable to pack part of a compound datatype")
/* Update the member size */
@@ -552,7 +590,7 @@ H5T_pack(const H5T_t *dt)
for(i = 0, offset = 0; i < dt->shared->u.compnd.nmembs; i++) {
dt->shared->u.compnd.memb[i].offset = offset;
offset += dt->shared->u.compnd.memb[i].size;
- }
+ } /* end for */
/* Change total size */
dt->shared->size = MAX(1, offset);
@@ -564,11 +602,11 @@ H5T_pack(const H5T_t *dt)
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5T_pack() */
+} /* end H5T__pack() */
/*-------------------------------------------------------------------------
- * Function: H5T_is_packed
+ * Function: H5T__is_packed
*
* Purpose: Checks whether a datatype which is compound (or has compound
* components) is packed.
@@ -583,11 +621,11 @@ done:
*-------------------------------------------------------------------------
*/
static htri_t
-H5T_is_packed(const H5T_t *dt)
+H5T__is_packed(const H5T_t *dt)
{
htri_t ret_value = TRUE; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT_NOERR
+ FUNC_ENTER_STATIC_NOERR
HDassert(dt);
@@ -596,12 +634,11 @@ H5T_is_packed(const H5T_t *dt)
dt = dt->shared->parent;
/* If this is a compound datatype, check if it is packed */
- if(dt->shared->type == H5T_COMPOUND) {
+ if(dt->shared->type == H5T_COMPOUND)
ret_value = (htri_t)(dt->shared->u.compnd.packed);
- } /* end if */
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5T_is_packed() */
+} /* end H5T__is_packed() */
/*-------------------------------------------------------------------------
@@ -638,7 +675,7 @@ H5T__update_packed(const H5T_t *dt)
/* Now check if all members are packed */
for(i = 0; i < dt->shared->u.compnd.nmembs; i++)
- if(!H5T_is_packed(dt->shared->u.compnd.memb[i].type)) {
+ if(!H5T__is_packed(dt->shared->u.compnd.memb[i].type)) {
dt->shared->u.compnd.packed = FALSE;
break;
} /* end if */
diff --git a/src/H5Tnative.c b/src/H5Tnative.c
index 8859102..357bb08 100644
--- a/src/H5Tnative.c
+++ b/src/H5Tnative.c
@@ -272,7 +272,7 @@ H5T__get_native_type(H5T_t *dtype, H5T_direction_t direction, size_t *struct_ali
/* Construct child compound type and retrieve a list of their IDs, offsets, total size, and alignment for compound type. */
for(u = 0; u < nmemb; u++) {
- if(NULL == (memb_type = H5T_get_member_type(dtype, u, H5T_COPY_TRANSIENT)))
+ if(NULL == (memb_type = H5T_get_member_type(dtype, u)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "member type retrieval failed")
if(NULL == (comp_mname[u] = H5T__get_member_name(dtype, u)))
diff --git a/src/H5Tprivate.h b/src/H5Tprivate.h
index d8e98af..e05bb4e 100644
--- a/src/H5Tprivate.h
+++ b/src/H5Tprivate.h
@@ -59,7 +59,6 @@ struct H5S_t;
typedef enum H5T_copy_t {
H5T_COPY_TRANSIENT,
H5T_COPY_ALL,
- H5T_COPY_REOPEN
} H5T_copy_t;
/* Location of datatype information */
@@ -109,7 +108,8 @@ H5_DLLVAR H5T_order_t H5T_native_order_g;
/* Private functions */
H5_DLL herr_t H5T_init(void);
-H5_DLL H5T_t *H5T_copy(H5T_t *old_dt, H5T_copy_t method);
+H5_DLL H5T_t *H5T_copy(const H5T_t *old_dt, H5T_copy_t method);
+H5_DLL H5T_t *H5T_copy_reopen(H5T_t *old_dt);
H5_DLL herr_t H5T_lock(H5T_t *dt, hbool_t immutable);
H5_DLL herr_t H5T_close(H5T_t *dt);
H5_DLL herr_t H5T_close_real(H5T_t *dt);
@@ -164,7 +164,7 @@ H5_DLL herr_t H5T_update_shared(H5T_t *type);
/* Field functions (for both compound & enumerated types) */
H5_DLL int H5T_get_nmembers(const H5T_t *dt);
-H5_DLL H5T_t *H5T_get_member_type(const H5T_t *dt, unsigned membno, H5T_copy_t method);
+H5_DLL H5T_t *H5T_get_member_type(const H5T_t *dt, unsigned membno);
H5_DLL size_t H5T_get_member_offset(const H5T_t *dt, unsigned membno);
/* Atomic functions */
diff --git a/src/H5VLconnector.h b/src/H5VLconnector.h
index baa4cca..39d9b14 100644
--- a/src/H5VLconnector.h
+++ b/src/H5VLconnector.h
@@ -91,7 +91,6 @@ typedef int H5VL_attr_optional_t;
typedef enum H5VL_dataset_get_t {
H5VL_DATASET_GET_DAPL, /* access property list */
H5VL_DATASET_GET_DCPL, /* creation property list */
- H5VL_DATASET_GET_OFFSET, /* offset */
H5VL_DATASET_GET_SPACE, /* dataspace */
H5VL_DATASET_GET_SPACE_STATUS, /* space status */
H5VL_DATASET_GET_STORAGE_SIZE, /* storage size */
diff --git a/src/H5VLnative.h b/src/H5VLnative.h
index e1f3f93..b607abc 100644
--- a/src/H5VLnative.h
+++ b/src/H5VLnative.h
@@ -48,6 +48,7 @@
#define H5VL_NATIVE_DATASET_CHUNK_READ 6 /* H5Dchunk_read */
#define H5VL_NATIVE_DATASET_CHUNK_WRITE 7 /* H5Dchunk_write */
#define H5VL_NATIVE_DATASET_GET_VLEN_BUF_SIZE 8 /* H5Dvlen_get_buf_size */
+#define H5VL_NATIVE_DATASET_GET_OFFSET 9 /* H5Dget_offset */
/* Values for native VOL connector file optional VOL operations */
#define H5VL_NATIVE_FILE_CLEAR_ELINK_CACHE 0 /* H5Fclear_elink_file_cache */
diff --git a/src/H5VLnative_attr.c b/src/H5VLnative_attr.c
index e54c49f..8072cd5 100644
--- a/src/H5VLnative_attr.c
+++ b/src/H5VLnative_attr.c
@@ -525,7 +525,8 @@ done:
*/
herr_t
H5VL__native_attr_optional(void H5_ATTR_UNUSED *obj, H5VL_attr_optional_t opt_type,
- hid_t H5_ATTR_UNUSED dxpl_id, void H5_ATTR_UNUSED **req, va_list arguments)
+ hid_t H5_ATTR_UNUSED dxpl_id, void H5_ATTR_UNUSED **req,
+ va_list H5_ATTR_DEPRECATED_USED arguments)
{
herr_t ret_value = SUCCEED; /* Return value */
diff --git a/src/H5VLnative_dataset.c b/src/H5VLnative_dataset.c
index bea2c50..8660e80 100644
--- a/src/H5VLnative_dataset.c
+++ b/src/H5VLnative_dataset.c
@@ -297,18 +297,6 @@ H5VL__native_dataset_get(void *obj, H5VL_dataset_get_t get_type,
break;
}
- /* H5Dget_offset */
- case H5VL_DATASET_GET_OFFSET:
- {
- haddr_t *ret = HDva_arg(arguments, haddr_t *);
-
- /* Set return value */
- *ret = H5D__get_offset(dset);
- if(!H5F_addr_defined(*ret))
- *ret = HADDR_UNDEF;
- break;
- }
-
default:
HGOTO_ERROR(H5E_VOL, H5E_CANTGET, FAIL, "can't get this type of information from dataset")
} /* end switch */
@@ -391,16 +379,17 @@ herr_t
H5VL__native_dataset_optional(void *obj, H5VL_dataset_optional_t optional_type,
hid_t H5_ATTR_UNUSED dxpl_id, void H5_ATTR_UNUSED **req, va_list arguments)
{
- H5D_t *dset = NULL; /* Dataset */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5D_t *dset = (H5D_t *)obj; /* Dataset */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_PACKAGE
+ /* Sanity checks */
+ HDassert(dset);
+
switch(optional_type) {
case H5VL_NATIVE_DATASET_FORMAT_CONVERT:
{ /* H5Dformat_convert */
- dset = (H5D_t *)obj;
-
switch(dset->shared->layout.type) {
case H5D_CHUNKED:
/* Convert the chunk indexing type to version 1 B-tree if not */
@@ -436,8 +425,6 @@ H5VL__native_dataset_optional(void *obj, H5VL_dataset_optional_t optional_type,
{ /* H5Dget_chunk_index_type */
H5D_chunk_index_t *idx_type = HDva_arg(arguments, H5D_chunk_index_t *);
- dset = (H5D_t *)obj;
-
/* Make sure the dataset is chunked */
if(H5D_CHUNKED != dset->shared->layout.type)
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a chunked dataset")
@@ -453,8 +440,6 @@ H5VL__native_dataset_optional(void *obj, H5VL_dataset_optional_t optional_type,
hsize_t *offset = HDva_arg(arguments, hsize_t *);
hsize_t *chunk_nbytes = HDva_arg(arguments, hsize_t *);
- dset = (H5D_t *)obj;
-
/* Make sure the dataset is chunked */
if(H5D_CHUNKED != dset->shared->layout.type)
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a chunked dataset")
@@ -472,8 +457,6 @@ H5VL__native_dataset_optional(void *obj, H5VL_dataset_optional_t optional_type,
hid_t space_id = HDva_arg(arguments, hid_t);
hsize_t *nchunks = HDva_arg(arguments, hsize_t *);
- dset = (H5D_t *)obj;
- HDassert(dset);
HDassert(dset->shared);
HDassert(dset->shared->space);
@@ -505,8 +488,6 @@ H5VL__native_dataset_optional(void *obj, H5VL_dataset_optional_t optional_type,
haddr_t *addr = HDva_arg(arguments, haddr_t *);
hsize_t *size = HDva_arg(arguments, hsize_t *);
- dset = (H5D_t *)obj;
- HDassert(dset);
HDassert(dset->shared);
HDassert(dset->shared->space);
@@ -534,8 +515,6 @@ H5VL__native_dataset_optional(void *obj, H5VL_dataset_optional_t optional_type,
haddr_t *addr = HDva_arg(arguments, haddr_t *);
hsize_t *size = HDva_arg(arguments, hsize_t *);
- dset = (H5D_t *)obj;
- HDassert(dset);
HDassert(dset->shared);
/* Make sure the dataset is chunked */
@@ -556,8 +535,6 @@ H5VL__native_dataset_optional(void *obj, H5VL_dataset_optional_t optional_type,
void *buf = HDva_arg(arguments, void *);
hsize_t offset_copy[H5O_LAYOUT_NDIMS]; /* Internal copy of chunk offset */
- dset = (H5D_t *)obj;
-
/* Check arguments */
if(NULL == dset->oloc.file)
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "dataset is not associated with a file")
@@ -585,8 +562,6 @@ H5VL__native_dataset_optional(void *obj, H5VL_dataset_optional_t optional_type,
const void *buf = HDva_arg(arguments, const void *);
hsize_t offset_copy[H5O_LAYOUT_NDIMS]; /* Internal copy of chunk offset */
- dset = (H5D_t *)obj;
-
/* Check arguments */
if(NULL == dset->oloc.file)
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "dataset is not associated with a file")
@@ -612,13 +587,22 @@ H5VL__native_dataset_optional(void *obj, H5VL_dataset_optional_t optional_type,
hid_t space_id = HDva_arg(arguments, hid_t);
hsize_t *size = HDva_arg(arguments, hsize_t *);
- dset = (H5D_t *)obj;
-
if(H5D__vlen_get_buf_size(dset, type_id, space_id, size) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get size of vlen buf needed")
break;
}
+ /* H5Dget_offset */
+ case H5VL_NATIVE_DATASET_GET_OFFSET:
+ {
+ haddr_t *ret = HDva_arg(arguments, haddr_t *);
+
+ /* Set return value */
+ *ret = H5D__get_offset(dset);
+ if(!H5F_addr_defined(*ret))
+ *ret = HADDR_UNDEF;
+ break;
+ }
default:
HGOTO_ERROR(H5E_VOL, H5E_UNSUPPORTED, FAIL, "invalid optional operation")
diff --git a/src/H5VLnative_group.c b/src/H5VLnative_group.c
index 3fdb2d9..236ee9d 100644
--- a/src/H5VLnative_group.c
+++ b/src/H5VLnative_group.c
@@ -266,8 +266,9 @@ done:
*-------------------------------------------------------------------------
*/
herr_t
-H5VL__native_group_optional(void *obj, H5VL_group_optional_t optional_type,
- hid_t H5_ATTR_UNUSED dxpl_id, void H5_ATTR_UNUSED **req, va_list arguments)
+H5VL__native_group_optional(void H5_ATTR_UNUSED *obj,
+ H5VL_group_optional_t optional_type, hid_t H5_ATTR_UNUSED dxpl_id,
+ void H5_ATTR_UNUSED **req, va_list H5_ATTR_DEPRECATED_USED arguments)
{
herr_t ret_value = SUCCEED; /* Return value */
diff --git a/src/H5Z.c b/src/H5Z.c
index 53186f1..2f477a3 100644
--- a/src/H5Z.c
+++ b/src/H5Z.c
@@ -585,7 +585,8 @@ done:
*-------------------------------------------------------------------------
*/
static int
-H5Z__flush_file_cb(void *obj_ptr, hid_t H5_ATTR_UNUSED obj_id, void *key)
+H5Z__flush_file_cb(void *obj_ptr, hid_t H5_ATTR_UNUSED obj_id,
+ void *key H5_ATTR_PARALLEL_USED)
{
H5F_t *f = (H5F_t *)obj_ptr; /* File object for operations */
#ifdef H5_HAVE_PARALLEL
diff --git a/src/H5Znbit.c b/src/H5Znbit.c
index fe0041c..2f79725 100644
--- a/src/H5Znbit.c
+++ b/src/H5Znbit.c
@@ -338,7 +338,7 @@ H5Z_calc_parms_compound(const H5T_t *type, size_t *cd_values_actual_nparms)
H5T_class_t dtype_member_class; /* Compound datatype's member datatype's class */
/* Get member datatype */
- if(NULL == (dtype_member = H5T_get_member_type(type, u, H5T_COPY_TRANSIENT)))
+ if(NULL == (dtype_member = H5T_get_member_type(type, u)))
HGOTO_ERROR(H5E_PLINE, H5E_BADTYPE, FAIL, "bad member datatype")
/* Get member datatype's class */
@@ -695,7 +695,7 @@ H5Z_set_parms_compound(const H5T_t *type, unsigned *cd_values_index,
/* For each member, set parameters */
for(u = 0; u < nmembers; u++) {
/* Get member datatype */
- if(NULL == (dtype_member = H5T_get_member_type(type, u, H5T_COPY_TRANSIENT)))
+ if(NULL == (dtype_member = H5T_get_member_type(type, u)))
HGOTO_ERROR(H5E_PLINE, H5E_BADTYPE, FAIL, "bad member datatype")
/* Get member datatype's class */
diff --git a/src/H5private.h b/src/H5private.h
index f090203..f570723 100644
--- a/src/H5private.h
+++ b/src/H5private.h
@@ -304,17 +304,38 @@
* file). Be sure to update that file if the #ifdefs change here.
*/
#ifdef __cplusplus
-# define H5_ATTR_FORMAT(X,Y,Z) /*void*/
-# define H5_ATTR_UNUSED /*void*/
-# define H5_ATTR_NDEBUG_UNUSED /*void*/
-# define H5_ATTR_NORETURN /*void*/
-# define H5_ATTR_CONST /*void*/
-# define H5_ATTR_PURE /*void*/
-# define H5_ATTR_FALLTHROUGH /*void*/
+# define H5_ATTR_FORMAT(X,Y,Z) /*void*/
+# define H5_ATTR_UNUSED /*void*/
+# define H5_ATTR_DEPRECATED_USED /*void*/
+# define H5_ATTR_NDEBUG_UNUSED /*void*/
+# define H5_ATTR_DEBUG_API_USED /*void*/
+# define H5_ATTR_PARALLEL_UNUSED /*void*/
+# define H5_ATTR_PARALLEL_USED /*void*/
+# define H5_ATTR_NORETURN /*void*/
+# define H5_ATTR_CONST /*void*/
+# define H5_ATTR_PURE /*void*/
+# define H5_ATTR_FALLTHROUGH /*void*/
#else /* __cplusplus */
#if defined(H5_HAVE_ATTRIBUTE) && !defined(__SUNPRO_C)
# define H5_ATTR_FORMAT(X,Y,Z) __attribute__((format(X, Y, Z)))
# define H5_ATTR_UNUSED __attribute__((unused))
+#ifdef H5_HAVE_PARALLEL
+# define H5_ATTR_PARALLEL_UNUSED __attribute__((unused))
+# define H5_ATTR_PARALLEL_USED /*void*/
+#else
+# define H5_ATTR_PARALLEL_UNUSED /*void*/
+# define H5_ATTR_PARALLEL_USED __attribute__((unused))
+#endif
+#ifdef H5_NO_DEPRECATED_SYMBOLS
+#define H5_ATTR_DEPRECATED_USED H5_ATTR_UNUSED
+#else /* H5_NO_DEPRECATED_SYMBOLS */
+#define H5_ATTR_DEPRECATED_USED /*void*/
+#endif /* H5_NO_DEPRECATED_SYMBOLS */
+#ifdef H5_DEBUG_API
+#define H5_ATTR_DEBUG_API_USED /*void*/
+#else /* H5_DEBUG_API */
+#define H5_ATTR_DEBUG_API_USED H5_ATTR_UNUSED
+#endif /* H5_DEBUG_API */
#ifndef NDEBUG
#define H5_ATTR_NDEBUG_UNUSED /*void*/
#else /* NDEBUG */
@@ -329,13 +350,17 @@
# define H5_ATTR_FALLTHROUGH /*void*/
#endif
#else
-# define H5_ATTR_FORMAT(X,Y,Z) /*void*/
-# define H5_ATTR_UNUSED /*void*/
-# define H5_ATTR_NDEBUG_UNUSED /*void*/
-# define H5_ATTR_NORETURN /*void*/
-# define H5_ATTR_CONST /*void*/
-# define H5_ATTR_PURE /*void*/
-# define H5_ATTR_FALLTHROUGH /*void*/
+# define H5_ATTR_FORMAT(X,Y,Z) /*void*/
+# define H5_ATTR_UNUSED /*void*/
+# define H5_ATTR_NDEBUG_UNUSED /*void*/
+# define H5_ATTR_DEBUG_API_USED /*void*/
+# define H5_ATTR_DEPRECATED_USED /*void*/
+# define H5_ATTR_PARALLEL_UNUSED /*void*/
+# define H5_ATTR_PARALLEL_USED /*void*/
+# define H5_ATTR_NORETURN /*void*/
+# define H5_ATTR_CONST /*void*/
+# define H5_ATTR_PURE /*void*/
+# define H5_ATTR_FALLTHROUGH /*void*/
#endif
#endif /* __cplusplus */
@@ -1893,12 +1918,11 @@ H5_DLL double H5_trace(const double *calltime, const char *func, const char *typ
/* global library version information string */
extern char H5_lib_vers_info_g[];
+#include "H5TSprivate.h"
+
/* Lock headers */
#ifdef H5_HAVE_THREADSAFE
-/* Include required thread-safety header */
-#include "H5TSprivate.h"
-
/* replacement structure for original global variable */
typedef struct H5_api_struct {
H5TS_mutex_t init_lock; /* API entrance mutex */
diff --git a/src/H5public.h b/src/H5public.h
index 86a1fbb..3312cf4 100644
--- a/src/H5public.h
+++ b/src/H5public.h
@@ -51,7 +51,45 @@
# endif
#endif
#ifdef H5_HAVE_INTTYPES_H
-# include <inttypes.h> /* For uint64_t on some platforms */
+# include <inttypes.h> /* C99/POSIX.1 header for uint64_t, PRIu64 */
+#else /* H5_HAVE_INTTYPES_H */
+/* The following definitions should be suitable for 64-bit Windows, which is
+ * LLP64, and for 32-bit Windows, which is ILP32. Those are the only
+ * platforms where <inttypes.h> is likely to be missing. VS2015 and later
+ * *may* provide these definitions.
+ */
+#ifdef _WIN64
+# define PRIdPTR "lld"
+# define PRIoPTR "llo"
+# define PRIuPTR "llu"
+# define PRIxPTR "llx"
+#else /* _WIN64 */
+# define PRIdPTR "ld"
+# define PRIoPTR "lo"
+# define PRIuPTR "lu"
+# define PRIxPTR "lx"
+#endif /* _WIN64 */
+
+# define PRId8 "d"
+# define PRIo8 "o"
+# define PRIu8 "u"
+# define PRIx8 "x"
+# define PRId16 "d"
+# define PRIo16 "o"
+# define PRIu16 "u"
+# define PRIx16 "x"
+# define PRId32 "d"
+# define PRIo32 "o"
+# define PRIu32 "u"
+# define PRIx32 "x"
+# define PRId64 "lld"
+# define PRIo64 "llo"
+# define PRIu64 "llu"
+# define PRIx64 "llx"
+# define PRIdMAX "lld"
+# define PRIoMAX "llo"
+# define PRIuMAX "llu"
+# define PRIxMAX "llx"
#endif
#ifdef H5_HAVE_STDDEF_H
# include <stddef.h>
diff --git a/src/H5trace.c b/src/H5trace.c
index ec5c6a2..7168d5d 100644
--- a/src/H5trace.c
+++ b/src/H5trace.c
@@ -2746,9 +2746,6 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
case H5VL_DATASET_GET_STORAGE_SIZE:
HDfprintf(out, "H5VL_DATASET_GET_STORAGE_SIZE");
break;
- case H5VL_DATASET_GET_OFFSET:
- HDfprintf(out, "H5VL_DATASET_GET_OFFSET");
- break;
default:
HDfprintf(out, "%ld", (long)get);
break;
@@ -3276,6 +3273,9 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
case H5VL_NATIVE_DATASET_GET_VLEN_BUF_SIZE:
HDfprintf(out, "H5VL_NATIVE_DATASET_GET_VLEN_BUF_SIZE");
break;
+ case H5VL_NATIVE_DATASET_GET_OFFSET:
+ HDfprintf(out, "H5VL_NATIVE_DATASET_GET_OFFSET");
+ break;
default:
HDfprintf(out, "%ld", (long)optional);
break;
diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
index a2fb31d..2594477 100644
--- a/test/CMakeLists.txt
+++ b/test/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required (VERSION 3.10)
+cmake_minimum_required (VERSION 3.12)
project (HDF5_TEST C)
#-----------------------------------------------------------------------------
diff --git a/test/cache.c b/test/cache.c
index 349d048..bb18728 100644
--- a/test/cache.c
+++ b/test/cache.c
@@ -13932,7 +13932,7 @@ check_move_entry(unsigned paged)
takedown_cache(file_ptr, FALSE, FALSE);
if(pass)
- PASSED()
+ PASSED();
else
H5_FAILED()
@@ -17061,7 +17061,7 @@ check_move_entry_errs(unsigned paged)
takedown_cache(file_ptr, FALSE, FALSE);
if(pass)
- PASSED()
+ PASSED();
else {
H5_FAILED()
@@ -30716,7 +30716,7 @@ done:
takedown_cache(file_ptr, FALSE, FALSE);
if(pass)
- PASSED()
+ PASSED();
else {
H5_FAILED();
HDfprintf(stdout, "%s.\n", failure_mssg);
@@ -30939,7 +30939,7 @@ done:
takedown_cache(file_ptr, FALSE, FALSE);
if(pass)
- PASSED()
+ PASSED();
else {
H5_FAILED();
HDfprintf(stdout, "%s.\n", failure_mssg);
@@ -33511,7 +33511,7 @@ done:
takedown_cache(file_ptr, FALSE, FALSE);
if(pass)
- PASSED()
+ PASSED();
else {
H5_FAILED();
HDfprintf(stdout, "%s.\n", failure_mssg);
@@ -33714,7 +33714,7 @@ done:
takedown_cache(file_ptr, FALSE, FALSE);
if(pass)
- PASSED()
+ PASSED();
else {
H5_FAILED();
HDfprintf(stdout, "%s.\n", failure_mssg);
diff --git a/test/dtransform.c b/test/dtransform.c
index 6f7e8a4..bc61232 100644
--- a/test/dtransform.c
+++ b/test/dtransform.c
@@ -700,7 +700,7 @@ test_trivial(const hid_t dxpl_id_simple)
FAIL_PUTS_ERROR(" ERROR: Conversion failed to match computed data\n");
}
- PASSED()
+ PASSED();
TESTING("data transform, trivial transform, with type conversion")
if(H5Dread(dset_id_float, H5T_NATIVE_INT, H5S_ALL, H5S_ALL,
@@ -712,7 +712,7 @@ test_trivial(const hid_t dxpl_id_simple)
FAIL_PUTS_ERROR(" ERROR: Conversion failed to match computed data\n")
}
- PASSED()
+ PASSED();
return 0;
error:
@@ -739,7 +739,7 @@ test_getset(const hid_t dxpl_id_c_to_f)
if(HDstrcmp(c_to_f, ptrgetTest) != 0)
FAIL_PUTS_ERROR(" ERROR: Data transform failed to match what was set\n")
- PASSED()
+ PASSED();
HDfree(ptrgetTest);
ptrgetTest = NULL;
@@ -759,7 +759,7 @@ test_getset(const hid_t dxpl_id_c_to_f)
FAIL_PUTS_ERROR(" ERROR: Conversion failed to match computed data\n")
}
- PASSED()
+ PASSED();
TESTING("H5Pget_data_transform, after resetting transform property")
@@ -770,7 +770,7 @@ test_getset(const hid_t dxpl_id_c_to_f)
if(HDstrcmp(simple, ptrgetTest) != 0)
FAIL_PUTS_ERROR(" ERROR: Data transform failed to match what was set\n")
- PASSED()
+ PASSED();
HDfree(ptrgetTest);
ptrgetTest = NULL;
@@ -806,7 +806,7 @@ test_set(void)
H5Eset_auto2(H5E_DEFAULT, NULL, NULL);
if(H5Pget_data_transform(dxpl_id, ptrgetTest, HDstrlen(str) + 1) < 0)
- PASSED()
+ PASSED();
else
FAIL_PUTS_ERROR(" ERROR: Data transform get before set succeeded (it shouldn't have)\n");
diff --git a/test/earray.c b/test/earray.c
index 3c0212d..6597afd 100644
--- a/test/earray.c
+++ b/test/earray.c
@@ -768,7 +768,7 @@ test_create(hid_t fapl, H5EA_create_t *cparam, earray_test_param_t H5_ATTR_UNUSE
TEST_ERROR
} /* end if */
- PASSED()
+ PASSED();
}
#else /* NDEBUG */
SKIPPED();
@@ -784,7 +784,7 @@ test_create(hid_t fapl, H5EA_create_t *cparam, earray_test_param_t H5_ATTR_UNUSE
if(create_array(f, cparam, &ea, &ea_addr, NULL) < 0)
TEST_ERROR
- PASSED()
+ PASSED();
/* Verify the creation parameters */
TESTING("verify array creation parameters");
@@ -798,7 +798,7 @@ test_create(hid_t fapl, H5EA_create_t *cparam, earray_test_param_t H5_ATTR_UNUSE
TEST_ERROR
/* All tests passed */
- PASSED()
+ PASSED();
return 0;
@@ -868,7 +868,7 @@ test_reopen(hid_t fapl, H5EA_create_t *cparam, earray_test_param_t *tparam)
TEST_ERROR
/* All tests passed */
- PASSED()
+ PASSED();
return 0;
@@ -972,7 +972,7 @@ test_open_twice(hid_t fapl, H5EA_create_t *cparam, earray_test_param_t *tparam)
TEST_ERROR
/* All tests passed */
- PASSED()
+ PASSED();
return 0;
@@ -1112,7 +1112,7 @@ test_open_twice_diff(hid_t fapl, H5EA_create_t *cparam, earray_test_param_t *tpa
TEST_ERROR
/* All tests passed */
- PASSED()
+ PASSED();
return 0;
@@ -1233,7 +1233,7 @@ test_delete_open(hid_t fapl, H5EA_create_t *cparam, earray_test_param_t *tparam)
TEST_ERROR
/* All tests passed */
- PASSED()
+ PASSED();
return 0;
@@ -2234,7 +2234,7 @@ test_set_elmts(hid_t fapl, H5EA_create_t *cparam, earray_test_param_t *tparam,
TEST_ERROR
/* All tests passed */
- PASSED()
+ PASSED();
return 0;
@@ -2391,7 +2391,7 @@ test_skip_elmts(hid_t fapl, H5EA_create_t *cparam, earray_test_param_t *tparam,
TEST_ERROR
/* All tests passed */
- PASSED()
+ PASSED();
return 0;
diff --git a/test/farray.c b/test/farray.c
index d6610f2..355ecbb 100644
--- a/test/farray.c
+++ b/test/farray.c
@@ -500,7 +500,7 @@ test_create(hid_t fapl, H5FA_create_t *cparam, farray_test_param_t H5_ATTR_UNUSE
TEST_ERROR
} /* end if */
- PASSED()
+ PASSED();
}
#else /* NDEBUG */
SKIPPED();
@@ -516,7 +516,7 @@ test_create(hid_t fapl, H5FA_create_t *cparam, farray_test_param_t H5_ATTR_UNUSE
if(create_array(f, cparam, &fa, &fa_addr) < 0)
TEST_ERROR
- PASSED()
+ PASSED();
/* Verify the creation parameters */
TESTING("verify array creation parameters");
@@ -530,7 +530,7 @@ test_create(hid_t fapl, H5FA_create_t *cparam, farray_test_param_t H5_ATTR_UNUSE
TEST_ERROR
/* All tests passed */
- PASSED()
+ PASSED();
return 0;
@@ -597,7 +597,7 @@ test_reopen(hid_t fapl, H5FA_create_t *cparam, farray_test_param_t *tparam)
TEST_ERROR
/* All tests passed */
- PASSED()
+ PASSED();
return 0;
@@ -696,7 +696,7 @@ test_open_twice(hid_t fapl_id, H5FA_create_t *cparam, farray_test_param_t *tpara
TEST_ERROR
/* All tests passed */
- PASSED()
+ PASSED();
return 0;
@@ -829,7 +829,7 @@ test_open_twice_diff(hid_t fapl_id, H5FA_create_t *cparam, farray_test_param_t *
TEST_ERROR
/* All tests passed */
- PASSED()
+ PASSED();
return 0;
@@ -947,7 +947,7 @@ test_delete_open(hid_t fapl, H5FA_create_t *cparam, farray_test_param_t *tparam)
TEST_ERROR
/* All tests passed */
- PASSED()
+ PASSED();
return 0;
@@ -1487,7 +1487,7 @@ test_set_elmts(hid_t fapl, H5FA_create_t *cparam, farray_test_param_t *tparam,
TEST_ERROR
/* All tests passed */
- PASSED()
+ PASSED();
return 0;
@@ -1614,7 +1614,7 @@ test_skip_elmts(hid_t fapl, H5FA_create_t *cparam, farray_test_param_t *tparam,
TEST_ERROR
/* All tests passed */
- PASSED()
+ PASSED();
return 0;
diff --git a/test/fheap.c b/test/fheap.c
index 7772ff7..899c41f 100644
--- a/test/fheap.c
+++ b/test/fheap.c
@@ -1903,7 +1903,7 @@ test_create(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
HDmemset(&state, 0, sizeof(fheap_heap_state_t));
if(check_stats(fh, &state))
TEST_ERROR
- PASSED()
+ PASSED();
/* Query the type of address mapping */
TESTING("query heap creation parameters");
@@ -1935,7 +1935,7 @@ test_create(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
TEST_ERROR
/* All tests passed */
- PASSED()
+ PASSED();
return 0;
@@ -2087,7 +2087,7 @@ test_reopen(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
TEST_ERROR
/* All tests passed */
- PASSED()
+ PASSED();
return(0);
@@ -2260,7 +2260,7 @@ test_open_twice(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
TEST_ERROR
/* All tests passed */
- PASSED()
+ PASSED();
return 0;
@@ -2435,7 +2435,7 @@ test_delete_open(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
TEST_ERROR
/* All tests passed */
- PASSED()
+ PASSED();
return 0;
@@ -2781,7 +2781,7 @@ test_id_limits(hid_t fapl, H5HF_create_t *cparam, hid_t fcpl)
FAIL_STACK_ERROR
/* All tests passed */
- PASSED()
+ PASSED();
return 0;
@@ -2904,7 +2904,7 @@ test_filtered_create(hid_t fapl, H5HF_create_t *cparam, hid_t fcpl)
H5O_msg_reset(H5O_PLINE_ID, &test_cparam.pline);
/* All tests passed */
- PASSED()
+ PASSED();
return 0;
@@ -3044,7 +3044,7 @@ test_size(hid_t fapl, H5HF_create_t *cparam, hid_t fcpl)
FAIL_STACK_ERROR
/* All tests passed */
- PASSED()
+ PASSED();
return 0;
@@ -3181,7 +3181,7 @@ test_reopen_hdr(hid_t fapl, H5HF_create_t *cparam, hid_t fcpl)
FAIL_STACK_ERROR
/* All tests passed */
- PASSED()
+ PASSED();
return(0);
@@ -3292,7 +3292,7 @@ test_man_insert_weird(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpa
FAIL_STACK_ERROR
/* All tests passed */
- PASSED()
+ PASSED();
return(0);
@@ -3393,7 +3393,7 @@ test_man_insert_first(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpa
TEST_ERROR
/* All tests passed */
- PASSED()
+ PASSED();
return(0);
@@ -3487,7 +3487,7 @@ test_man_insert_second(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tp
TEST_ERROR
/* All tests passed */
- PASSED()
+ PASSED();
return(0);
@@ -3584,7 +3584,7 @@ test_man_insert_root_mult(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t
TEST_ERROR
/* All tests passed */
- PASSED()
+ PASSED();
return(0);
@@ -3689,7 +3689,7 @@ test_man_insert_force_indirect(hid_t fapl, H5HF_create_t *cparam, fheap_test_par
TEST_ERROR
/* All tests passed */
- PASSED()
+ PASSED();
return(0);
@@ -3794,7 +3794,7 @@ test_man_insert_fill_second(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_
TEST_ERROR
/* All tests passed */
- PASSED()
+ PASSED();
return(0);
@@ -3905,7 +3905,7 @@ test_man_insert_third_direct(hid_t fapl, H5HF_create_t *cparam, fheap_test_param
TEST_ERROR
/* All tests passed */
- PASSED()
+ PASSED();
return(0);
@@ -4000,7 +4000,7 @@ test_man_fill_first_row(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *t
TEST_ERROR
/* All tests passed */
- PASSED()
+ PASSED();
return(0);
@@ -4102,7 +4102,7 @@ test_man_start_second_row(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t
TEST_ERROR
/* All tests passed */
- PASSED()
+ PASSED();
return(0);
@@ -4201,7 +4201,7 @@ test_man_fill_second_row(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *
TEST_ERROR
/* All tests passed */
- PASSED()
+ PASSED();
return(0);
@@ -4311,7 +4311,7 @@ test_man_start_third_row(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *
TEST_ERROR
/* All tests passed */
- PASSED()
+ PASSED();
return(0);
@@ -4408,7 +4408,7 @@ test_man_fill_fourth_row(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *
TEST_ERROR
/* All tests passed */
- PASSED()
+ PASSED();
return(0);
@@ -4503,7 +4503,7 @@ test_man_fill_all_root_direct(hid_t fapl, H5HF_create_t *cparam, fheap_test_para
TEST_ERROR
/* All tests passed */
- PASSED()
+ PASSED();
return(0);
@@ -4603,7 +4603,7 @@ test_man_first_recursive_indirect(hid_t fapl, H5HF_create_t *cparam, fheap_test_
TEST_ERROR
/* All tests passed */
- PASSED()
+ PASSED();
return(0);
@@ -4712,7 +4712,7 @@ test_man_second_direct_recursive_indirect(hid_t fapl, H5HF_create_t *cparam, fhe
TEST_ERROR
/* All tests passed */
- PASSED()
+ PASSED();
return(0);
@@ -4813,7 +4813,7 @@ test_man_fill_first_recursive_indirect(hid_t fapl, H5HF_create_t *cparam, fheap_
TEST_ERROR
/* All tests passed */
- PASSED()
+ PASSED();
return(0);
@@ -4922,7 +4922,7 @@ test_man_second_recursive_indirect(hid_t fapl, H5HF_create_t *cparam, fheap_test
TEST_ERROR
/* All tests passed */
- PASSED()
+ PASSED();
return(0);
@@ -5029,7 +5029,7 @@ test_man_fill_second_recursive_indirect(hid_t fapl, H5HF_create_t *cparam, fheap
TEST_ERROR
/* All tests passed */
- PASSED()
+ PASSED();
return(0);
@@ -5128,7 +5128,7 @@ test_man_fill_recursive_indirect_row(hid_t fapl, H5HF_create_t *cparam, fheap_te
TEST_ERROR
/* All tests passed */
- PASSED()
+ PASSED();
return(0);
@@ -5236,7 +5236,7 @@ test_man_start_2nd_recursive_indirect(hid_t fapl, H5HF_create_t *cparam, fheap_t
TEST_ERROR
/* All tests passed */
- PASSED()
+ PASSED();
return(0);
@@ -5337,7 +5337,7 @@ test_man_recursive_indirect_two_deep(hid_t fapl, H5HF_create_t *cparam, fheap_te
TEST_ERROR
/* All tests passed */
- PASSED()
+ PASSED();
return(0);
@@ -5446,7 +5446,7 @@ test_man_start_3rd_recursive_indirect(hid_t fapl, H5HF_create_t *cparam, fheap_t
TEST_ERROR
/* All tests passed */
- PASSED()
+ PASSED();
return(0);
@@ -5556,7 +5556,7 @@ test_man_fill_first_3rd_recursive_indirect(hid_t fapl, H5HF_create_t *cparam, fh
TEST_ERROR
/* All tests passed */
- PASSED()
+ PASSED();
return(0);
@@ -5662,7 +5662,7 @@ test_man_fill_3rd_recursive_indirect_row(hid_t fapl, H5HF_create_t *cparam, fhea
TEST_ERROR
/* All tests passed */
- PASSED()
+ PASSED();
return(0);
@@ -5768,7 +5768,7 @@ test_man_fill_all_3rd_recursive_indirect(hid_t fapl, H5HF_create_t *cparam, fhea
TEST_ERROR
/* All tests passed */
- PASSED()
+ PASSED();
return(0);
@@ -5882,7 +5882,7 @@ test_man_start_4th_recursive_indirect(hid_t fapl, H5HF_create_t *cparam, fheap_t
TEST_ERROR
/* All tests passed */
- PASSED()
+ PASSED();
return(0);
@@ -6001,7 +6001,7 @@ test_man_fill_first_4th_recursive_indirect(hid_t fapl, H5HF_create_t *cparam, fh
TEST_ERROR
/* All tests passed */
- PASSED()
+ PASSED();
return(0);
@@ -6112,7 +6112,7 @@ test_man_fill_4th_recursive_indirect_row(hid_t fapl, H5HF_create_t *cparam, fhea
TEST_ERROR
/* All tests passed */
- PASSED()
+ PASSED();
return(0);
@@ -6223,7 +6223,7 @@ test_man_fill_all_4th_recursive_indirect(hid_t fapl, H5HF_create_t *cparam, fhea
TEST_ERROR
/* All tests passed */
- PASSED()
+ PASSED();
return(0);
@@ -6357,7 +6357,7 @@ test_man_start_5th_recursive_indirect(hid_t fapl, H5HF_create_t *cparam, fheap_t
TEST_ERROR
/* All tests passed */
- PASSED()
+ PASSED();
return(0);
@@ -6511,7 +6511,7 @@ HDfprintf(stderr, "Random # seed was: %lu\n", seed);
TEST_ERROR
/* All tests passed */
- PASSED()
+ PASSED();
return(0);
@@ -6675,7 +6675,7 @@ test_man_remove_one(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpara
TEST_ERROR
/* All tests passed */
- PASSED()
+ PASSED();
return(0);
@@ -6867,7 +6867,7 @@ test_man_remove_two(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpara
TEST_ERROR
/* All tests passed */
- PASSED()
+ PASSED();
return(0);
@@ -7035,7 +7035,7 @@ test_man_remove_one_larger(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t
TEST_ERROR
/* All tests passed */
- PASSED()
+ PASSED();
return(0);
@@ -7278,7 +7278,7 @@ HDfprintf(stderr, "file_size = %lu\n", (unsigned long)file_size);
TEST_ERROR
/* All tests passed */
- PASSED()
+ PASSED();
return(0);
@@ -7581,7 +7581,7 @@ HDfprintf(stderr, "file_size = %lu\n", (unsigned long)file_size);
TEST_ERROR
/* All tests passed */
- PASSED()
+ PASSED();
return(0);
@@ -7701,7 +7701,7 @@ test_man_incr_insert_remove(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_
TEST_ERROR
/* All tests passed */
- PASSED()
+ PASSED();
HDfree(heap_id);
HDfree(heap_id_data);
@@ -7780,7 +7780,7 @@ test_man_remove_root_direct(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_
H5MM_xfree(keep_ids.offs);
/* All tests passed */
- PASSED()
+ PASSED();
return(0);
@@ -7868,7 +7868,7 @@ test_man_remove_two_direct(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t
H5MM_xfree(keep_ids.offs);
/* All tests passed */
- PASSED()
+ PASSED();
return(0);
@@ -7938,7 +7938,7 @@ test_man_remove_first_row(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t
H5MM_xfree(keep_ids.offs);
/* All tests passed */
- PASSED()
+ PASSED();
return(0);
@@ -8010,7 +8010,7 @@ test_man_remove_first_two_rows(hid_t fapl, H5HF_create_t *cparam, fheap_test_par
H5MM_xfree(keep_ids.offs);
/* All tests passed */
- PASSED()
+ PASSED();
return(0);
@@ -8086,7 +8086,7 @@ test_man_remove_first_four_rows(hid_t fapl, H5HF_create_t *cparam, fheap_test_pa
H5MM_xfree(keep_ids.offs);
/* All tests passed */
- PASSED()
+ PASSED();
return(0);
@@ -8156,7 +8156,7 @@ test_man_remove_all_root_direct(hid_t fapl, H5HF_create_t *cparam, fheap_test_pa
H5MM_xfree(keep_ids.offs);
/* All tests passed */
- PASSED()
+ PASSED();
return(0);
@@ -8230,7 +8230,7 @@ test_man_remove_2nd_indirect(hid_t fapl, H5HF_create_t *cparam, fheap_test_param
H5MM_xfree(keep_ids.offs);
/* All tests passed */
- PASSED()
+ PASSED();
return(0);
@@ -8308,7 +8308,7 @@ test_man_remove_3rd_indirect(hid_t fapl, H5HF_create_t *cparam, fheap_test_param
H5MM_xfree(keep_ids.offs);
/* All tests passed */
- PASSED()
+ PASSED();
return(0);
@@ -8389,7 +8389,7 @@ test_man_skip_start_block(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t
H5MM_xfree(keep_ids.offs);
/* All tests passed */
- PASSED()
+ PASSED();
return(0);
@@ -8486,7 +8486,7 @@ test_man_skip_start_block_add_back(hid_t fapl, H5HF_create_t *cparam, fheap_test
H5MM_xfree(keep_ids.offs);
/* All tests passed */
- PASSED()
+ PASSED();
return(0);
@@ -8595,7 +8595,7 @@ test_man_skip_start_block_add_skipped(hid_t fapl, H5HF_create_t *cparam, fheap_t
H5MM_xfree(keep_ids.offs);
/* All tests passed */
- PASSED()
+ PASSED();
return(0);
@@ -8688,7 +8688,7 @@ test_man_skip_2nd_block(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *t
H5MM_xfree(keep_ids.offs);
/* All tests passed */
- PASSED()
+ PASSED();
return(0);
@@ -8830,7 +8830,7 @@ test_man_skip_2nd_block_add_skipped(hid_t fapl, H5HF_create_t *cparam, fheap_tes
H5MM_xfree(keep_ids.offs);
/* All tests passed */
- PASSED()
+ PASSED();
return(0);
@@ -8996,7 +8996,7 @@ test_man_fill_one_partial_skip_2nd_block_add_skipped(hid_t fapl, H5HF_create_t *
H5MM_xfree(keep_ids.offs);
/* All tests passed */
- PASSED()
+ PASSED();
return(0);
@@ -9125,7 +9125,7 @@ test_man_fill_row_skip_add_skipped(hid_t fapl, H5HF_create_t *cparam, fheap_test
H5MM_xfree(keep_ids.offs);
/* All tests passed */
- PASSED()
+ PASSED();
return(0);
@@ -9252,7 +9252,7 @@ test_man_skip_direct_skip_indirect_two_rows_add_skipped(hid_t fapl, H5HF_create_
H5MM_xfree(keep_ids.offs);
/* All tests passed */
- PASSED()
+ PASSED();
return(0);
@@ -9374,7 +9374,7 @@ test_man_fill_direct_skip_indirect_start_block_add_skipped(hid_t fapl, H5HF_crea
H5MM_xfree(keep_ids.offs);
/* All tests passed */
- PASSED()
+ PASSED();
return(0);
@@ -9501,7 +9501,7 @@ test_man_fill_direct_skip_2nd_indirect_start_block_add_skipped(hid_t fapl, H5HF_
H5MM_xfree(keep_ids.offs);
/* All tests passed */
- PASSED()
+ PASSED();
return(0);
@@ -9643,7 +9643,7 @@ HDfprintf(stderr, "obj_size = %Zu\n", obj_size);
H5MM_xfree(keep_ids.offs);
/* All tests passed */
- PASSED()
+ PASSED();
return(0);
@@ -9817,7 +9817,7 @@ HDfprintf(stderr, "obj_size = %Zu\n", obj_size);
H5MM_xfree(keep_ids.offs);
/* All tests passed */
- PASSED()
+ PASSED();
return(0);
@@ -9968,7 +9968,7 @@ test_man_fill_direct_skip_indirect_two_rows_add_skipped(hid_t fapl, H5HF_create_
H5MM_xfree(keep_ids.offs);
/* All tests passed */
- PASSED()
+ PASSED();
return(0);
@@ -10148,7 +10148,7 @@ test_man_fill_direct_skip_indirect_two_rows_skip_indirect_row_add_skipped(hid_t
H5MM_xfree(keep_ids.offs);
/* All tests passed */
- PASSED()
+ PASSED();
return(0);
@@ -10274,7 +10274,7 @@ test_man_fill_2nd_direct_skip_start_block_add_skipped(hid_t fapl, H5HF_create_t
H5MM_xfree(keep_ids.offs);
/* All tests passed */
- PASSED()
+ PASSED();
return(0);
@@ -10412,7 +10412,7 @@ test_man_fill_2nd_direct_skip_2nd_indirect_start_block_add_skipped(hid_t fapl, H
H5MM_xfree(keep_ids.offs);
/* All tests passed */
- PASSED()
+ PASSED();
return(0);
@@ -10562,7 +10562,7 @@ HDfprintf(stderr, "obj_size = %Zu\n", obj_size);
H5MM_xfree(keep_ids.offs);
/* All tests passed */
- PASSED()
+ PASSED();
return(0);
@@ -10723,7 +10723,7 @@ HDfprintf(stderr, "obj_size = %Zu\n", obj_size);
H5MM_xfree(keep_ids.offs);
/* All tests passed */
- PASSED()
+ PASSED();
return(0);
@@ -10884,7 +10884,7 @@ HDfprintf(stderr, "obj_size = %Zu\n", obj_size);
H5MM_xfree(keep_ids.offs);
/* All tests passed */
- PASSED()
+ PASSED();
return(0);
@@ -11052,7 +11052,7 @@ HDfprintf(stderr, "obj_size = %Zu\n", obj_size);
H5MM_xfree(keep_ids.offs);
/* All tests passed */
- PASSED()
+ PASSED();
return(0);
@@ -11211,7 +11211,7 @@ HDfprintf(stderr, "obj_size = %Zu\n", obj_size);
H5MM_xfree(keep_ids.offs);
/* All tests passed */
- PASSED()
+ PASSED();
return(0);
@@ -11388,7 +11388,7 @@ HDfprintf(stderr, "obj_size = %Zu\n", obj_size);
H5MM_xfree(keep_ids.offs);
/* All tests passed */
- PASSED()
+ PASSED();
return(0);
@@ -11600,7 +11600,7 @@ HDfprintf(stderr, "obj_size = %Zu\n", obj_size);
H5MM_xfree(keep_ids.offs);
/* All tests passed */
- PASSED()
+ PASSED();
return(0);
@@ -11796,7 +11796,7 @@ HDfprintf(stderr, "obj_size = %Zu\n", obj_size);
H5MM_xfree(keep_ids.offs);
/* All tests passed */
- PASSED()
+ PASSED();
return(0);
@@ -12028,7 +12028,7 @@ HDfprintf(stderr, "obj_size = %Zu\n", obj_size);
H5MM_xfree(keep_ids.offs);
/* All tests passed */
- PASSED()
+ PASSED();
return(0);
@@ -12162,7 +12162,7 @@ test_man_frag_simple(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpar
H5MM_xfree(keep_ids.offs);
/* All tests passed */
- PASSED()
+ PASSED();
return(0);
@@ -12331,7 +12331,7 @@ test_man_frag_direct(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpar
H5MM_xfree(keep_ids.offs);
/* All tests passed */
- PASSED()
+ PASSED();
return(0);
@@ -12443,7 +12443,7 @@ HDfprintf(stderr, "num_first_indirect_rows = %u\n", num_first_indirect_rows);
H5MM_xfree(keep_ids.offs);
/* All tests passed */
- PASSED()
+ PASSED();
return(0);
@@ -12561,7 +12561,7 @@ test_man_frag_3rd_direct(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *
H5MM_xfree(keep_ids.offs);
/* All tests passed */
- PASSED()
+ PASSED();
return(0);
@@ -12714,7 +12714,7 @@ HDfprintf(stderr, "file_size = %lu\n", (unsigned long)file_size);
H5MM_xfree(keep_ids.offs);
/* All tests passed */
- PASSED()
+ PASSED();
return(0);
@@ -12945,7 +12945,7 @@ HDfprintf(stderr, "file_size = %lu\n", (unsigned long)file_size);
H5MM_xfree(keep_ids.offs);
/* All tests passed */
- PASSED()
+ PASSED();
return(0);
@@ -13251,7 +13251,7 @@ HDfprintf(stderr, "file_size = %lu\n", (unsigned long)file_size);
H5MM_xfree(keep_ids.offs);
/* All tests passed */
- PASSED()
+ PASSED();
return(0);
@@ -13676,7 +13676,7 @@ HDfprintf(stderr, "file_size = %lu\n", (unsigned long)file_size);
H5MM_xfree(keep_ids.offs);
/* All tests passed */
- PASSED()
+ PASSED();
return(0);
@@ -13896,7 +13896,7 @@ HDfprintf(stderr, "empty_size = %lu, file_size = %lu\n", (unsigned long)empty_si
H5MM_xfree(heap_id);
/* All tests passed */
- PASSED()
+ PASSED();
return(0);
@@ -14049,7 +14049,7 @@ HDfprintf(stderr, "file_size = %lu\n", (unsigned long)file_size);
H5MM_xfree(keep_ids.offs);
/* All tests passed */
- PASSED()
+ PASSED();
return(0);
@@ -14280,7 +14280,7 @@ HDfprintf(stderr, "file_size = %lu\n", (unsigned long)file_size);
H5MM_xfree(keep_ids.offs);
/* All tests passed */
- PASSED()
+ PASSED();
return(0);
@@ -14885,7 +14885,7 @@ HDfprintf(stderr, "file_size = %lu\n", (unsigned long)file_size);
H5MM_xfree(keep_ids.offs);
/* All tests passed */
- PASSED()
+ PASSED();
return(0);
@@ -15073,7 +15073,7 @@ HDfprintf(stderr, "empty_size = %lu, file_size = %lu\n", (unsigned long)empty_si
H5O_msg_reset(H5O_PLINE_ID, &tmp_cparam.pline); /* Release the I/O pipeline filter information */
/* All tests passed */
- PASSED()
+ PASSED();
return(0);
@@ -15401,7 +15401,7 @@ HDfprintf(stderr, "empty_size = %lu, file_size = %lu\n", (unsigned long)empty_si
H5O_msg_reset(H5O_PLINE_ID, &tmp_cparam.pline); /* Release the I/O pipeline filter information */
/* All tests passed */
- PASSED()
+ PASSED();
return(0);
@@ -15601,7 +15601,7 @@ HDfprintf(stderr, "file_size = %lu\n", (unsigned long)file_size);
H5MM_xfree(keep_ids.offs);
/* All tests passed */
- PASSED()
+ PASSED();
return(0);
@@ -15820,7 +15820,7 @@ HDfprintf(stderr, "file_size = %lu\n", (unsigned long)file_size);
H5MM_xfree(keep_ids.offs);
/* All tests passed */
- PASSED()
+ PASSED();
return(0);
@@ -16108,7 +16108,7 @@ test_write(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
H5MM_xfree(rewrite_obj);
/* All tests passed */
- PASSED()
+ PASSED();
return(0);
@@ -16286,7 +16286,7 @@ test_bug1(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
H5MM_xfree(keep_ids.offs);
/* All tests passed */
- PASSED()
+ PASSED();
return(0);
diff --git a/test/flush2.c b/test/flush2.c
index 0f15903..a6acb41 100644
--- a/test/flush2.c
+++ b/test/flush2.c
@@ -266,7 +266,7 @@ main(void)
h5_fixname(FILENAME[0], fapl_id, filename, sizeof(filename));
check_second_dset = FALSE;
if(file_ok(filename, fapl_id, check_second_dset))
- PASSED()
+ PASSED();
else
TEST_ERROR
@@ -279,7 +279,7 @@ main(void)
if(clear_status_flags(filename, fapl_id) < 0)
TEST_ERROR
if(file_ok(filename, fapl_id, check_second_dset))
- PASSED()
+ PASSED();
else
TEST_ERROR
} /* end if */
@@ -305,7 +305,7 @@ main(void)
#endif
} /* end if */
else
- PASSED()
+ PASSED();
/* Turn the error stack back on */
if(H5Eset_auto2(H5E_DEFAULT, func, NULL) < 0)
FAIL_STACK_ERROR
@@ -332,7 +332,7 @@ main(void)
#endif
} /* end if */
else
- PASSED()
+ PASSED();
/* Turn the error stack back on */
if(H5Eset_auto2(H5E_DEFAULT, func, NULL) < 0)
FAIL_STACK_ERROR
@@ -348,7 +348,7 @@ main(void)
check_second_dset = TRUE;
h5_fixname(FILENAME[4], fapl_id, filename, sizeof(filename));
if(file_ok(filename, fapl_id, check_second_dset))
- PASSED()
+ PASSED();
else
TEST_ERROR
@@ -363,7 +363,7 @@ main(void)
if(clear_status_flags(filename, fapl_id) < 0)
TEST_ERROR
if(file_ok(filename, fapl_id, check_second_dset))
- PASSED()
+ PASSED();
else
TEST_ERROR
} /* end if */
@@ -391,7 +391,7 @@ main(void)
#endif
} /* end if */
else
- PASSED()
+ PASSED();
/* Turn the error stack back on */
if(H5Eset_auto2(H5E_DEFAULT, func, NULL) < 0)
FAIL_STACK_ERROR
diff --git a/test/freespace.c b/test/freespace.c
index 947b2ce..f9f1932 100644
--- a/test/freespace.c
+++ b/test/freespace.c
@@ -547,7 +547,7 @@ test_fs_create(hid_t fapl)
if(file_size != empty_size)
TEST_ERROR
- PASSED()
+ PASSED();
return 0;
@@ -674,7 +674,7 @@ test_fs_sect_add(hid_t fapl)
if (tmp_file_size <= (file_size+fr_meta_size))
TEST_ERROR
- PASSED()
+ PASSED();
TESTING("adding a section via H5FS_sect_add() to free-space with H5FS_CLS_GHOST_OBJ: test 2");
@@ -736,7 +736,7 @@ test_fs_sect_add(hid_t fapl)
if (tmp_file_size != (file_size+fr_meta_size))
TEST_ERROR
- PASSED()
+ PASSED();
TESTING("adding a section via H5FS_sect_add() to free-space: test 3");
@@ -805,7 +805,7 @@ test_fs_sect_add(hid_t fapl)
if(H5Fclose(file) < 0)
FAIL_STACK_ERROR
- PASSED()
+ PASSED();
TESTING("adding a section via H5FS_sect_add() to free-space: test 4");
@@ -884,7 +884,7 @@ test_fs_sect_add(hid_t fapl)
if(H5Fclose(file) < 0)
FAIL_STACK_ERROR
- PASSED()
+ PASSED();
return 0;
@@ -982,7 +982,7 @@ test_fs_sect_find(hid_t fapl)
FAIL_STACK_ERROR
frsp = NULL;
- PASSED()
+ PASSED();
TESTING("H5FS_sect_find() a section equal to requested-size from free-space");
@@ -1110,7 +1110,7 @@ test_fs_sect_find(hid_t fapl)
FAIL_STACK_ERROR
frsp = NULL;
- PASSED()
+ PASSED();
TESTING("H5FS_sect_find() a section greater than requested-size from free-space");
@@ -1190,7 +1190,7 @@ test_fs_sect_find(hid_t fapl)
FAIL_STACK_ERROR
frsp = NULL;
- PASSED()
+ PASSED();
TESTING("H5FS_sect_find(): cannot find a section with requested-size from free-space");
@@ -1253,7 +1253,7 @@ test_fs_sect_find(hid_t fapl)
if(H5Fclose(file) < 0)
FAIL_STACK_ERROR
- PASSED()
+ PASSED();
return 0;
@@ -1453,7 +1453,7 @@ test_fs_sect_merge(hid_t fapl)
if(H5Fclose(file) < 0)
FAIL_STACK_ERROR
- PASSED()
+ PASSED();
/*
* TEST 2
@@ -1555,7 +1555,7 @@ test_fs_sect_merge(hid_t fapl)
if(H5Fclose(file) < 0)
FAIL_STACK_ERROR
- PASSED()
+ PASSED();
/*
* TEST 3
@@ -1723,7 +1723,7 @@ test_fs_sect_merge(hid_t fapl)
if(H5Fclose(file) < 0)
FAIL_STACK_ERROR
- PASSED()
+ PASSED();
return 0;
@@ -1894,7 +1894,7 @@ test_fs_sect_shrink(hid_t fapl)
if(H5Fclose(file) < 0)
FAIL_STACK_ERROR
- PASSED()
+ PASSED();
TESTING("shrinking of sections when H5FS_sect_add() to free-space: test 2");
@@ -1996,7 +1996,7 @@ test_fs_sect_shrink(hid_t fapl)
if(H5Fclose(file) < 0)
FAIL_STACK_ERROR
- PASSED()
+ PASSED();
TESTING("shrinking of sections when H5FS_sect_add() to free-space: test 3");
@@ -2087,7 +2087,7 @@ test_fs_sect_shrink(hid_t fapl)
if(H5Fclose(file) < 0)
FAIL_STACK_ERROR
- PASSED()
+ PASSED();
return 0;
@@ -2240,7 +2240,7 @@ test_fs_sect_change_class(hid_t fapl)
if(H5Fclose(file) < 0)
FAIL_STACK_ERROR
- PASSED()
+ PASSED();
/*
* TEST 2
@@ -2362,7 +2362,7 @@ test_fs_sect_change_class(hid_t fapl)
if(H5Fclose(file) < 0)
FAIL_STACK_ERROR
- PASSED()
+ PASSED();
return 0;
@@ -2515,7 +2515,7 @@ test_fs_sect_extend(hid_t fapl)
FAIL_STACK_ERROR
fs_addr = HADDR_UNDEF;
- PASSED()
+ PASSED();
/*
* TEST 2
@@ -2588,7 +2588,7 @@ test_fs_sect_extend(hid_t fapl)
FAIL_STACK_ERROR
fs_addr = HADDR_UNDEF;
- PASSED()
+ PASSED();
/*
* Test 3
@@ -2662,7 +2662,7 @@ test_fs_sect_extend(hid_t fapl)
FAIL_STACK_ERROR
fs_addr = HADDR_UNDEF;
- PASSED()
+ PASSED();
/*
* TEST 4
@@ -2735,7 +2735,7 @@ test_fs_sect_extend(hid_t fapl)
FAIL_STACK_ERROR
fs_addr = HADDR_UNDEF;
- PASSED()
+ PASSED();
/* Close the file and dxpl */
if(H5Fclose(file) < 0)
@@ -2843,7 +2843,7 @@ test_fs_sect_iterate(hid_t fapl)
if(H5Fclose(file) < 0)
FAIL_STACK_ERROR
- PASSED()
+ PASSED();
return 0;
diff --git a/test/gen_new_super.c b/test/gen_new_super.c
index f6ce589..ed43a39 100644
--- a/test/gen_new_super.c
+++ b/test/gen_new_super.c
@@ -24,7 +24,7 @@
*/
#include <assert.h>
-#include "hdf5.h"
+#include "testhdf5.h"
#define TESTFILE "tsupern.h5"
#define ISTORE_IK 64
@@ -50,7 +50,7 @@ main(void)
{
hid_t file; /* File IDs for old & new files */
hid_t fcpl; /* File creation property list */
- herr_t ret; /* Generic return value */
+ herr_t H5_ATTR_NDEBUG_UNUSED ret;
/* Create a file creation property list */
fcpl = H5Pcreate(H5P_FILE_CREATE);
diff --git a/test/gen_nullspace.c b/test/gen_nullspace.c
index 9d76deb..e4e75ac 100644
--- a/test/gen_nullspace.c
+++ b/test/gen_nullspace.c
@@ -24,8 +24,8 @@
* put into the 'test' directory in the 1.6.x branch of the library.
*/
-#include "hdf5.h"
#include <assert.h>
+#include "testhdf5.h"
#define NULLFILE "tnullspace.h5"
#define NULLDATASET "null_dataset"
@@ -39,7 +39,7 @@ main(void)
hid_t sid; /* Dataspace ID */
hid_t did; /* Dataset ID */
hid_t attr; /* Attribute ID */
- herr_t ret; /* Generic return value */
+ herr_t H5_ATTR_NDEBUG_UNUSED ret; /* Generic return value */
/* Create the file */
fid = H5Fcreate(NULLFILE, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
diff --git a/test/gen_plist.c b/test/gen_plist.c
index 8f38b1a..8fc8a05 100644
--- a/test/gen_plist.c
+++ b/test/gen_plist.c
@@ -458,7 +458,7 @@ encode_plist(hid_t plist_id, int little_endian, int word_length, const char *fil
herr_t ret = 0;
void *temp_buf = NULL;
size_t temp_size = 0;
- ssize_t write_size;
+ ssize_t H5_ATTR_NDEBUG_UNUSED write_size;
char filename[1024];
/* Generate filename */
diff --git a/test/gen_specmetaread.c b/test/gen_specmetaread.c
index d06bd59..fd484d1 100644
--- a/test/gen_specmetaread.c
+++ b/test/gen_specmetaread.c
@@ -23,9 +23,10 @@
* the library on the trunk as of when this file is checked in.
*/
-#include "hdf5.h"
#include <assert.h>
+#include "testhdf5.h"
+
#define FILENAME "specmetaread.h5"
#define DIM 10
@@ -39,7 +40,7 @@ main(void)
hsize_t dim[1] = {DIM};
unsigned data[DIM];
unsigned u;
- herr_t ret; /* Generic return value */
+ herr_t H5_ATTR_NDEBUG_UNUSED ret;
/* Initialize the data */
for(u = 0; u < DIM; u++)
diff --git a/test/getname.c b/test/getname.c
index f677d78..c542ec5 100644
--- a/test/getname.c
+++ b/test/getname.c
@@ -2588,7 +2588,7 @@ test_obj_ref(hid_t fapl)
namelen = H5Rget_name(dataset, H5R_OBJECT, &wbuf[0], (char*)buf, sizeof(buf));
if(!((HDstrcmp(buf, "/Dataset3") == 0) &&(namelen == 9))) TEST_ERROR
- PASSED()
+ PASSED();
HDmemset(buf, 0, sizeof(buf));
TESTING("getting path to dataset in /Group1");
@@ -2600,7 +2600,7 @@ test_obj_ref(hid_t fapl)
*buf = '\0';
namelen = H5Rget_name(dataset, H5R_OBJECT, &wbuf[1], (char*)buf, sizeof(buf));
if(!((HDstrcmp(buf, "/Group1/Dataset2") == 0) &&(namelen == 16))) TEST_ERROR
- PASSED()
+ PASSED();
HDmemset(buf, 0, sizeof(buf));
TESTING("getting path to /Group1");
@@ -2612,7 +2612,7 @@ test_obj_ref(hid_t fapl)
*buf = '\0';
namelen = H5Rget_name(dataset, H5R_OBJECT, &wbuf[2], (char*)buf, sizeof(buf));
if(!((HDstrcmp(buf, "/Group1") == 0) &&(namelen == 7))) TEST_ERROR
- PASSED()
+ PASSED();
HDmemset(buf, 0, sizeof(buf));
TESTING("getting path to datatype in /Group1");
@@ -2624,7 +2624,7 @@ test_obj_ref(hid_t fapl)
*buf = '\0';
namelen = H5Rget_name(dataset, H5R_OBJECT, &wbuf[3], (char*)buf, sizeof(buf));
if(!((HDstrcmp(buf, "/Group1/Datatype1") == 0) &&(namelen == 17))) TEST_ERROR
- PASSED()
+ PASSED();
HDmemset(buf, 0, sizeof(buf));
TESTING("getting path to dataset in nested group");
@@ -2636,7 +2636,7 @@ test_obj_ref(hid_t fapl)
*buf = '\0';
namelen = H5Rget_name(dataset, H5R_OBJECT, &wbuf[4], (char*)buf, sizeof(buf));
if(!((HDstrcmp(buf, "/Group1/Group2/Dataset4") == 0) &&(namelen == 23))) TEST_ERROR
- PASSED()
+ PASSED();
HDmemset(buf, 0, sizeof(buf));
TESTING("getting path to nested group");
@@ -2648,7 +2648,7 @@ test_obj_ref(hid_t fapl)
*buf = '\0';
namelen = H5Rget_name(dataset, H5R_OBJECT, &wbuf[5], (char*)buf, sizeof(buf));
if(!((HDstrcmp(buf, "/Group1/Group2") == 0) &&(namelen == 14))) TEST_ERROR
- PASSED()
+ PASSED();
HDmemset(buf, 0, sizeof(buf));
TESTING("getting path to dataset created via hard link");
@@ -2660,7 +2660,7 @@ test_obj_ref(hid_t fapl)
*buf = '\0';
namelen = H5Rget_name(dataset, H5R_OBJECT, &wbuf[6], (char*)buf, sizeof(buf));
if(!((HDstrcmp(buf, "/Group1/Dataset5") == 0) &&(namelen == 16))) TEST_ERROR
- PASSED()
+ PASSED();
HDmemset(buf, 0, sizeof(buf));
TESTING("getting path to root group");
@@ -2672,7 +2672,7 @@ test_obj_ref(hid_t fapl)
*buf = '\0';
namelen = H5Rget_name(dataset, H5R_OBJECT, &wbuf[7], (char*)buf, sizeof(buf));
if(!((HDstrcmp(buf, "/") == 0) &&(namelen == 1))) TEST_ERROR
- PASSED()
+ PASSED();
/* Now we mount fid2 at /Group2 and look for dataset4. It shouldn't be found */
if(H5Fmount(fid1, "/Group1/Group2", fid2, H5P_DEFAULT) < 0)
@@ -2687,7 +2687,7 @@ test_obj_ref(hid_t fapl)
*buf = '\0';
namelen = H5Rget_name(dataset, H5R_OBJECT, &wbuf[4], (char*)buf, sizeof(buf));
if(namelen != 0) TEST_ERROR
- PASSED()
+ PASSED();
/* Now we try unlinking dataset2 from the file and searching for it. It shouldn't be found */
if((dataset2 = H5Rdereference2(dataset, H5P_DEFAULT, H5R_OBJECT, &wbuf[1])) < 0)
@@ -2703,7 +2703,7 @@ test_obj_ref(hid_t fapl)
*buf = '\0';
namelen = H5Rget_name(dataset, H5R_OBJECT, &wbuf[1], (char*)buf, sizeof(buf));
if(namelen != 0) TEST_ERROR
- PASSED()
+ PASSED();
/* Close disk dataspace */
if(H5Sclose(sid1) < 0)
@@ -2830,7 +2830,7 @@ test_reg_ref(hid_t fapl)
name_size1 = H5Rget_name(dsetr_id, H5R_DATASET_REGION, &ref_out[0], (char*)buf1, NAME_BUF_SIZE );
if(!((HDstrcmp(buf1, "/MATRIX") == 0) &&(name_size1 == 7))) TEST_ERROR
- PASSED()
+ PASSED();
TESTING("H5Iget_name to get name from region reference(hyperslab)");
@@ -2844,14 +2844,14 @@ test_reg_ref(hid_t fapl)
if(H5Dclose(dsetv_id) < 0) TEST_ERROR
- PASSED()
+ PASSED();
/* Get name of the dataset the second region reference points to using H5Rget_name */
TESTING("H5Rget_name to get name from region reference(pnt selec)");
*buf1 = '\0';
name_size1 = H5Rget_name(dsetr_id, H5R_DATASET_REGION, &ref_out[1], (char*)buf1, NAME_BUF_SIZE);
if(!((HDstrcmp(buf1, "/MATRIX") == 0) &&(name_size1 == 7))) TEST_ERROR
- PASSED()
+ PASSED();
TESTING("H5Iget_name to get name from region reference(pnt selec)");
@@ -2865,7 +2865,7 @@ test_reg_ref(hid_t fapl)
if(H5Dclose(dsetv_id) < 0) TEST_ERROR
- PASSED()
+ PASSED();
if(H5Dclose(dsetr_id) < 0)
TEST_ERROR
diff --git a/test/h5test.h b/test/h5test.h
index 15bb15c..e67e559 100644
--- a/test/h5test.h
+++ b/test/h5test.h
@@ -103,7 +103,7 @@ H5TEST_DLLVAR MPI_Info h5_io_info_g; /* MPI INFO object for IO */
*/
#define TESTING(WHAT) {HDprintf("Testing %-62s",WHAT); HDfflush(stdout);}
#define TESTING_2(WHAT) {HDprintf(" Testing %-60s",WHAT); HDfflush(stdout);}
-#define PASSED() {HDputs(" PASSED");HDfflush(stdout);}
+#define PASSED() do {HDputs(" PASSED");HDfflush(stdout);} while (0)
#define H5_FAILED() {HDputs("*FAILED*");HDfflush(stdout);}
#define H5_WARNING() {HDputs("*WARNING*");HDfflush(stdout);}
#define SKIPPED() {HDputs(" -SKIP-");HDfflush(stdout);}
diff --git a/test/hyperslab.c b/test/hyperslab.c
index 8ed9c22..e702023 100644
--- a/test/hyperslab.c
+++ b/test/hyperslab.c
@@ -265,7 +265,7 @@ test_fill(size_t nx, size_t ny, size_t nz,
} /* end for */
} /* end for */
- PASSED()
+ PASSED();
HDfree(dst);
@@ -545,7 +545,7 @@ test_copy(int mode,
} /* end for */
} /* end for */
- PASSED()
+ PASSED();
HDfree(src);
HDfree(dst);
@@ -666,7 +666,7 @@ test_multifill(size_t nx)
} /* end if */
} /* end for */
- PASSED()
+ PASSED();
HDfree(src);
HDfree(dst);
@@ -753,7 +753,7 @@ test_endian(size_t nx)
} /* end for */
} /* end for */
- PASSED()
+ PASSED();
HDfree(src);
HDfree(dst);
@@ -850,7 +850,7 @@ test_transpose(size_t nx, size_t ny)
} /* end for */
} /* end for */
- PASSED()
+ PASSED();
HDfree(src);
HDfree(dst);
@@ -943,7 +943,7 @@ test_sub_super(size_t nx, size_t ny)
} /* end if */
} /* end for */
} /* end for */
- PASSED()
+ PASSED();
/*
* Test replicating pixels to produce an image twice as large in each
@@ -1007,7 +1007,7 @@ test_sub_super(size_t nx, size_t ny)
} /* end for */
} /* end for */
- PASSED()
+ PASSED();
HDfree(full);
HDfree(half);
diff --git a/test/mf.c b/test/mf.c
index 141f5ec..7cfc954 100644
--- a/test/mf.c
+++ b/test/mf.c
@@ -318,7 +318,7 @@ test_mf_eoa(const char *env_h5_drvr, hid_t fapl)
if(H5Pclose(fapl_new) < 0)
FAIL_STACK_ERROR
- PASSED()
+ PASSED();
} /* end if */
else {
SKIPPED();
@@ -460,7 +460,7 @@ test_mf_eoa_shrink(const char *env_h5_drvr, hid_t fapl)
if(new_file_size != file_size)
TEST_ERROR
- PASSED()
+ PASSED();
} /* end if */
else {
SKIPPED();
@@ -508,7 +508,7 @@ test_mf_eoa_shrink(const char *env_h5_drvr, hid_t fapl)
if(new_file_size != (file_size + TBLOCK_SIZE30))
TEST_ERROR
- PASSED()
+ PASSED();
} /* end if */
else {
SKIPPED();
@@ -552,7 +552,7 @@ test_mf_eoa_shrink(const char *env_h5_drvr, hid_t fapl)
if(new_file_size != (file_size + TBLOCK_SIZE30))
TEST_ERROR
- PASSED()
+ PASSED();
} /* end if */
else {
SKIPPED();
@@ -600,7 +600,7 @@ test_mf_eoa_shrink(const char *env_h5_drvr, hid_t fapl)
if(H5Pclose(fapl_new) < 0)
FAIL_STACK_ERROR
- PASSED()
+ PASSED();
} /* end if */
else {
SKIPPED();
@@ -738,7 +738,7 @@ test_mf_eoa_extend(const char *env_h5_drvr, hid_t fapl)
if(new_file_size != (file_size + TBLOCK_SIZE30 + TBLOCK_SIZE50))
TEST_ERROR
- PASSED()
+ PASSED();
} /* end if */
else {
SKIPPED();
@@ -801,7 +801,7 @@ test_mf_eoa_extend(const char *env_h5_drvr, hid_t fapl)
if(H5Pclose(fapl_new) < 0)
FAIL_STACK_ERROR
- PASSED()
+ PASSED();
} /* end if */
else {
SKIPPED();
@@ -999,7 +999,7 @@ test_mf_tmp(const char *env_h5_drvr, hid_t fapl, hbool_t new_format)
if(new_file_size != file_size)
TEST_ERROR
- PASSED()
+ PASSED();
} /* end if */
else {
SKIPPED();
@@ -1093,7 +1093,7 @@ test_mf_fs_start(hid_t fapl)
if(H5Pclose(fapl_new) < 0)
FAIL_STACK_ERROR
- PASSED()
+ PASSED();
return(0);
@@ -1242,7 +1242,7 @@ test_mf_fs_alloc_free(hid_t fapl)
if (new_file_size != file_size)
TEST_ERROR
- PASSED()
+ PASSED();
TESTING("H5MF_alloc()/H5MF_xfree() of free-space manager:test 2");
@@ -1317,7 +1317,7 @@ test_mf_fs_alloc_free(hid_t fapl)
if (new_file_size != file_size)
TEST_ERROR
- PASSED()
+ PASSED();
TESTING("H5MF_alloc()/H5MF_xfree() of free-space manager:test 3");
@@ -1405,7 +1405,7 @@ test_mf_fs_alloc_free(hid_t fapl)
if(H5Pclose(fapl_new) < 0)
FAIL_STACK_ERROR
- PASSED()
+ PASSED();
return(0);
@@ -1598,7 +1598,7 @@ test_mf_fs_extend(hid_t fapl)
if (new_file_size != file_size)
TEST_ERROR
- PASSED()
+ PASSED();
TESTING("H5MF_try_extend() of free-space manager:test 2");
@@ -1700,7 +1700,7 @@ test_mf_fs_extend(hid_t fapl)
if (new_file_size != file_size)
TEST_ERROR
- PASSED()
+ PASSED();
TESTING("H5MF_try_extend() of free-space manager:test 3");
@@ -1802,7 +1802,7 @@ test_mf_fs_extend(hid_t fapl)
if (new_file_size != file_size)
TEST_ERROR
- PASSED()
+ PASSED();
TESTING("H5MF_try_extend() of free-space manager:test 4");
@@ -1911,7 +1911,7 @@ test_mf_fs_extend(hid_t fapl)
if(H5Pclose(fapl_new) < 0)
FAIL_STACK_ERROR
- PASSED()
+ PASSED();
return(0);
@@ -2023,7 +2023,7 @@ test_mf_fs_absorb(const char *env_h5_drvr, hid_t fapl)
if(H5Fclose(file) < 0)
FAIL_STACK_ERROR
- PASSED()
+ PASSED();
} /* end if */
else {
SKIPPED();
@@ -2084,7 +2084,7 @@ test_mf_fs_absorb(const char *env_h5_drvr, hid_t fapl)
if(H5Fclose(file) < 0)
FAIL_STACK_ERROR
- PASSED()
+ PASSED();
} /* end if */
else {
SKIPPED();
@@ -2226,7 +2226,7 @@ test_mf_aggr_alloc1(const char *env_h5_drvr, hid_t fapl)
if(H5Pclose(fcpl) < 0)
TEST_ERROR
- PASSED()
+ PASSED();
} /* end if */
else {
SKIPPED();
@@ -2368,7 +2368,7 @@ test_mf_aggr_alloc2(const char *env_h5_drvr, hid_t fapl)
if (new_file_size != file_size)
TEST_ERROR
- PASSED()
+ PASSED();
} /* end if */
else {
SKIPPED();
@@ -2528,7 +2528,7 @@ test_mf_aggr_alloc3(const char *env_h5_drvr, hid_t fapl)
if(new_file_size != file_size)
TEST_ERROR
- PASSED()
+ PASSED();
} /* end if */
else {
SKIPPED();
@@ -2695,7 +2695,7 @@ test_mf_aggr_alloc4(const char *env_h5_drvr, hid_t fapl)
if(new_file_size != file_size)
TEST_ERROR
- PASSED()
+ PASSED();
} /* end if */
else {
SKIPPED();
@@ -2818,7 +2818,7 @@ test_mf_aggr_alloc5(const char *env_h5_drvr, hid_t fapl)
if(new_file_size != file_size)
TEST_ERROR
- PASSED()
+ PASSED();
} /* end if */
else {
SKIPPED();
@@ -2974,7 +2974,7 @@ test_mf_aggr_alloc6(const char *env_h5_drvr, hid_t fapl)
if(new_file_size != file_size)
TEST_ERROR
- PASSED()
+ PASSED();
} /* end if */
else {
SKIPPED();
@@ -3158,7 +3158,7 @@ test_mf_aggr_alloc7(const char *env_h5_drvr, hid_t fapl)
if (file_size != empty_size)
TEST_ERROR
- PASSED()
+ PASSED();
} /* end if */
else {
SKIPPED();
@@ -3312,7 +3312,7 @@ test_mf_aggr_extend(const char *env_h5_drvr, hid_t fapl)
if (file_size != empty_size)
TEST_ERROR
- PASSED()
+ PASSED();
} /* end if */
else {
SKIPPED();
@@ -3382,7 +3382,7 @@ test_mf_aggr_extend(const char *env_h5_drvr, hid_t fapl)
if(file_size != empty_size)
TEST_ERROR
- PASSED()
+ PASSED();
} /* end if */
else {
SKIPPED();
@@ -3450,7 +3450,7 @@ test_mf_aggr_extend(const char *env_h5_drvr, hid_t fapl)
if(file_size != empty_size)
TEST_ERROR
- PASSED()
+ PASSED();
} /* end if */
else {
SKIPPED();
@@ -3559,7 +3559,7 @@ test_mf_aggr_absorb(const char *env_h5_drvr, hid_t fapl)
if(file_size != empty_size)
TEST_ERROR
- PASSED()
+ PASSED();
} /* end if */
else {
SKIPPED();
@@ -3618,7 +3618,7 @@ test_mf_aggr_absorb(const char *env_h5_drvr, hid_t fapl)
if(file_size != empty_size)
TEST_ERROR
- PASSED()
+ PASSED();
} /* end if */
else {
SKIPPED();
@@ -3680,7 +3680,7 @@ test_mf_aggr_absorb(const char *env_h5_drvr, hid_t fapl)
if(file_size != empty_size)
TEST_ERROR
- PASSED()
+ PASSED();
} /* end if */
else {
SKIPPED();
@@ -3847,7 +3847,7 @@ test_mf_align_eoa(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl)
if (new_file_size != file_size)
TEST_ERROR
- PASSED()
+ PASSED();
} /* end if */
else {
SKIPPED();
@@ -3902,7 +3902,7 @@ test_mf_align_eoa(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl)
if (new_file_size != (file_size-TBLOCK_SIZE50)) TEST_ERROR
- PASSED()
+ PASSED();
} /* end if */
else {
SKIPPED();
@@ -3958,7 +3958,7 @@ test_mf_align_eoa(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl)
if (new_file_size != (file_size+TBLOCK_SIZE30)) TEST_ERROR
- PASSED()
+ PASSED();
} /* end if */
else {
SKIPPED();
@@ -4095,7 +4095,7 @@ test_mf_align_fs(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl)
if(H5Fclose(file) < 0)
FAIL_STACK_ERROR
- PASSED()
+ PASSED();
TESTING("H5MF_alloc() of free-space manager with alignment: test 2");
@@ -4170,7 +4170,7 @@ test_mf_align_fs(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl)
if(H5Fclose(file) < 0)
FAIL_STACK_ERROR
- PASSED()
+ PASSED();
TESTING("H5MF_alloc() of free-space manager with alignment: test 3");
@@ -4245,7 +4245,7 @@ test_mf_align_fs(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl)
if(H5Fclose(file) < 0)
FAIL_STACK_ERROR
- PASSED()
+ PASSED();
} /* end if */
else {
SKIPPED();
@@ -4515,7 +4515,7 @@ test_mf_align_alloc1(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl)
if(H5Fclose(file) < 0)
FAIL_STACK_ERROR
- PASSED()
+ PASSED();
} /* end if */
else {
SKIPPED();
@@ -4801,7 +4801,7 @@ test_mf_align_alloc2(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl)
if(H5Fclose(file) < 0)
FAIL_STACK_ERROR
- PASSED()
+ PASSED();
} /* end if */
else {
SKIPPED();
@@ -5177,7 +5177,7 @@ test_mf_align_alloc3(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl)
if(H5Fclose(file) < 0)
FAIL_STACK_ERROR
- PASSED()
+ PASSED();
} /* end if */
else {
SKIPPED();
@@ -5386,7 +5386,7 @@ test_mf_align_alloc4(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl)
if(H5Fclose(file) < 0)
FAIL_STACK_ERROR
- PASSED()
+ PASSED();
} /* end if */
else {
SKIPPED();
@@ -5609,7 +5609,7 @@ test_mf_align_alloc5(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl)
if(H5Fclose(file) < 0)
FAIL_STACK_ERROR
- PASSED()
+ PASSED();
} /* end if */
else {
SKIPPED();
@@ -5915,7 +5915,7 @@ test_mf_align_alloc6(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl)
if(H5Fclose(file) < 0)
FAIL_STACK_ERROR
- PASSED()
+ PASSED();
} /* end if */
else {
SKIPPED();
@@ -6078,7 +6078,7 @@ test_mf_bug1(const char *env_h5_drvr, hid_t fapl)
* the previous */
if((addr2 - addr1) != (3 * align)) TEST_ERROR
- PASSED()
+ PASSED();
/* Close file */
if(H5Fclose(file) < 0)
@@ -6358,7 +6358,7 @@ test_mf_fs_persist_split(void)
if(H5Pclose(fcpl) < 0)
FAIL_STACK_ERROR
- PASSED()
+ PASSED();
return(0);
@@ -6711,7 +6711,7 @@ test_mf_fs_persist_multi(void)
if(H5Pclose(fcpl) < 0)
FAIL_STACK_ERROR
- PASSED()
+ PASSED();
return(0);
@@ -6878,7 +6878,7 @@ test_mf_fs_persist(const char *env_h5_drvr, hid_t fapl, hbool_t new_format)
if(H5Pclose(fapl2) < 0)
FAIL_STACK_ERROR
- PASSED()
+ PASSED();
} else {
SKIPPED();
@@ -7062,7 +7062,7 @@ test_mf_fs_gone(const char *env_h5_drvr, hid_t fapl, hbool_t new_format)
if(H5Pclose(fapl2) < 0)
FAIL_STACK_ERROR
- PASSED()
+ PASSED();
} else {
SKIPPED();
@@ -7235,7 +7235,7 @@ test_mf_strat_thres_persist(const char *env_h5_drvr, hid_t fapl, hbool_t new_for
if(H5Pclose(fapl2) < 0)
FAIL_STACK_ERROR
- PASSED()
+ PASSED();
return(0);
@@ -7420,7 +7420,7 @@ test_mf_strat_thres_gone(const char *env_h5_drvr, hid_t fapl, hbool_t new_format
if(H5Pclose(fapl2) < 0)
FAIL_STACK_ERROR
- PASSED()
+ PASSED();
return(0);
@@ -7509,7 +7509,7 @@ test_dichotomy(hid_t fapl)
if(H5Fclose(file) < 0)
FAIL_STACK_ERROR
- PASSED()
+ PASSED();
return(0);
@@ -7763,7 +7763,7 @@ test_page_alloc_xfree(const char *env_h5_drvr, hid_t fapl)
if(H5Pclose(fapl_new) < 0)
TEST_ERROR
- PASSED()
+ PASSED();
} else {
SKIPPED();
@@ -7887,7 +7887,7 @@ test_page_try_shrink(const char *env_h5_drvr, hid_t fapl)
if(H5Pclose(fcpl) < 0)
FAIL_STACK_ERROR
- PASSED()
+ PASSED();
} else {
SKIPPED();
@@ -8042,7 +8042,7 @@ test_page_small_try_extend(const char *env_h5_drvr, hid_t fapl)
if(H5Pclose(fcpl) < 0)
FAIL_STACK_ERROR
- PASSED()
+ PASSED();
} else {
SKIPPED();
@@ -8183,7 +8183,7 @@ test_page_large_try_extend(const char *env_h5_drvr, hid_t fapl)
if(H5Pclose(fcpl) < 0)
FAIL_STACK_ERROR
- PASSED()
+ PASSED();
} else {
SKIPPED();
@@ -8336,7 +8336,7 @@ test_page_large(const char *env_h5_drvr, hid_t fapl)
if(file_size % TBLOCK_SIZE4096)
TEST_ERROR
- PASSED()
+ PASSED();
} else {
SKIPPED();
@@ -8499,7 +8499,7 @@ test_page_small(const char *env_h5_drvr, hid_t fapl)
if(H5Pclose(fcpl) < 0)
FAIL_STACK_ERROR
- PASSED()
+ PASSED();
} else {
SKIPPED();
@@ -8805,7 +8805,7 @@ test_page_alignment(const char *env_h5_drvr, hid_t fapl)
if(H5Pclose(fapl_new) < 0)
TEST_ERROR
- PASSED()
+ PASSED();
} else {
SKIPPED();
diff --git a/test/ohdr.c b/test/ohdr.c
index 120935c..31a54d2 100644
--- a/test/ohdr.c
+++ b/test/ohdr.c
@@ -1142,7 +1142,7 @@ test_minimized_dset_ohdr_size_comparisons(hid_t fapl_id)
if(H5Dclose(dset_F_N_id) < 0) TEST_ERROR
if(H5Dclose(dset_F_Y_id) < 0) TEST_ERROR
- PASSED()
+ PASSED();
} /* compact and non-compact */
@@ -1274,7 +1274,7 @@ test_minimized_dset_ohdr_with_filter(hid_t fapl_id)
if(H5Dclose(dset_mZ_id) < 0) TEST_ERROR
if(H5Fclose(file_id) < 0) TEST_ERROR
- PASSED()
+ PASSED();
return SUCCEED;
error:
@@ -1448,7 +1448,7 @@ test_minimized_dset_ohdr_modification_times(hid_t _fapl_id)
if(H5Pclose(dcpl_mT_id) < 0) TEST_ERROR
if(H5Pclose(dcpl_mN_id) < 0) TEST_ERROR
- PASSED()
+ PASSED();
return SUCCEED;
error:
@@ -1563,7 +1563,7 @@ test_minimized_dset_ohdr_fillvalue_backwards_compatability(hid_t _fapl_id)
if(H5Dclose(dset_1_id) < 0) TEST_ERROR
if(H5Fclose(file_id) < 0) TEST_ERROR;
- PASSED()
+ PASSED();
return SUCCEED;
error:
diff --git a/test/page_buffer.c b/test/page_buffer.c
index 21ffbf5..a6b3561 100644
--- a/test/page_buffer.c
+++ b/test/page_buffer.c
@@ -529,7 +529,7 @@ test_args(hid_t orig_fapl, const char *env_h5_drvr)
if(H5Pclose(fapl) < 0)
FAIL_STACK_ERROR;
- PASSED()
+ PASSED();
return 0;
error:
@@ -803,7 +803,7 @@ test_raw_data_handling(hid_t orig_fapl, const char *env_h5_drvr)
FAIL_STACK_ERROR;
HDfree(data);
- PASSED()
+ PASSED();
return 0;
error:
@@ -1056,7 +1056,7 @@ test_lru_processing(hid_t orig_fapl, const char *env_h5_drvr)
FAIL_STACK_ERROR;
HDfree(data);
- PASSED()
+ PASSED();
return 0;
error:
@@ -1688,7 +1688,7 @@ test_min_threshold(hid_t orig_fapl, const char *env_h5_drvr)
HDfree(data);
- PASSED()
+ PASSED();
return 0;
@@ -1994,7 +1994,7 @@ test_stats_collection(hid_t orig_fapl, const char *env_h5_drvr)
HDfree(data);
- PASSED()
+ PASSED();
return 0;
error:
@@ -2108,7 +2108,7 @@ verify_page_buffering_disabled(hid_t orig_fapl, const char *env_h5_drvr)
if(H5Pclose(fapl) < 0)
FAIL_STACK_ERROR;
- PASSED()
+ PASSED();
return 0;
diff --git a/test/set_extent.c b/test/set_extent.c
index 17d439e..171fd05 100644
--- a/test/set_extent.c
+++ b/test/set_extent.c
@@ -2013,8 +2013,7 @@ static int test_external(hid_t fapl) {
if (H5Fclose(fid) < 0)
FAIL_STACK_ERROR
- PASSED()
- ;
+ PASSED();
return 0;
diff --git a/test/thread_id.c b/test/thread_id.c
index 8f6e2d5..818ab4a 100644
--- a/test/thread_id.c
+++ b/test/thread_id.c
@@ -18,7 +18,6 @@
* 3 No two threads share an ID during their lifetimes.
* 4 A thread's ID is available for reuse as soon as it is joined.
*/
-#include <err.h>
/*
* Include required headers. This file tests internal library functions,
@@ -26,11 +25,172 @@
*/
#include "testhdf5.h"
+static void my_errx(int, const char *, ...) H5_ATTR_FORMAT(printf, 2, 3);
+
+static void
+my_errx(int code, const char *fmt, ...)
+{
+ va_list ap;
+
+ (void)HDfprintf(stderr, "thread_id: ");
+ HDva_start(ap, fmt);
+ (void)HDvfprintf(stderr, fmt, ap);
+ HDva_end(ap);
+ (void)HDfputc('\n', stderr);
+ HDexit(code);
+}
+
#if defined(H5_HAVE_THREADSAFE) && !defined(H5_HAVE_WIN_THREADS)
+#if defined(H5_HAVE_DARWIN)
+
+typedef struct _pthread_barrierattr {
+ uint8_t unused;
+} pthread_barrierattr_t;
+
+typedef struct _pthread_barrier {
+ uint32_t magic;
+ unsigned int count;
+ uint64_t nentered;
+ pthread_cond_t cv;
+ pthread_mutex_t mtx;
+} pthread_barrier_t;
+
+int pthread_barrier_init(pthread_barrier_t *, const pthread_barrierattr_t *,
+ unsigned int);
+int pthread_barrier_wait(pthread_barrier_t *);
+int pthread_barrier_destroy(pthread_barrier_t *);
+
+static const uint32_t barrier_magic = 0xf00dd00f;
+
+int
+pthread_barrier_init(pthread_barrier_t *barrier,
+ const pthread_barrierattr_t *attr, unsigned int count)
+{
+ int rc;
+
+ if (count == 0)
+ return EINVAL;
+
+ if (attr != NULL)
+ return EINVAL;
+
+ memset(barrier, 0, sizeof(*barrier));
+
+ barrier->count = count;
+
+ if ((rc = pthread_cond_init(&barrier->cv, NULL)) != 0)
+ return rc;
+
+ if ((rc = pthread_mutex_init(&barrier->mtx, NULL)) != 0) {
+ (void)pthread_cond_destroy(&barrier->cv);
+ return rc;
+ }
+
+ barrier->magic = barrier_magic;
+
+ return 0;
+}
+
+static void
+barrier_lock(pthread_barrier_t *barrier)
+{
+ int rc;
+
+ if ((rc = pthread_mutex_lock(&barrier->mtx)) != 0) {
+ my_errx(EXIT_FAILURE, "%s: pthread_mutex_lock: %s", __func__,
+ strerror(rc));
+ }
+}
+
+static void
+barrier_unlock(pthread_barrier_t *barrier)
+{
+ int rc;
+
+ if ((rc = pthread_mutex_unlock(&barrier->mtx)) != 0) {
+ my_errx(EXIT_FAILURE, "%s: pthread_mutex_unlock: %s", __func__,
+ strerror(rc));
+ }
+}
+
+int
+pthread_barrier_destroy(pthread_barrier_t *barrier)
+{
+ int rc;
+
+ barrier_lock(barrier);
+ if (barrier->magic != barrier_magic)
+ rc = EINVAL;
+ else if (barrier->nentered % barrier->count != 0)
+ rc = EBUSY;
+ else {
+ rc = 0;
+ barrier->magic = ~barrier->magic;
+ }
+ barrier_unlock(barrier);
+
+ if (rc != 0)
+ return rc;
+
+ (void)pthread_cond_destroy(&barrier->cv);
+ (void)pthread_mutex_destroy(&barrier->mtx);
+
+ return 0;
+}
+
+int
+pthread_barrier_wait(pthread_barrier_t *barrier)
+{
+ int rc;
+ uint64_t threshold;
+
+ if (barrier == NULL)
+ return EINVAL;
+
+ barrier_lock(barrier);
+ if (barrier->magic != barrier_magic) {
+ rc = EINVAL;
+ goto out;
+ }
+ /* Compute the release `threshold`. All threads entering with count = 5
+ * and `nentered` in [0, 4] should be released once `nentered` reaches 5:
+ * call 5 the release `threshold`. All threads entering with count = 5
+ * and `nentered` in [5, 9] should be released once `nentered` reaches 10.
+ */
+ threshold = (barrier->nentered / barrier->count + 1) * barrier->count;
+ barrier->nentered++;
+ while (barrier->nentered < threshold) {
+ if ((rc = pthread_cond_wait(&barrier->cv, &barrier->mtx)) != 0)
+ goto out;
+ }
+ rc = pthread_cond_broadcast(&barrier->cv);
+out:
+ barrier_unlock(barrier);
+ return rc;
+}
+
+#endif /* H5_HAVE_DARWIN */
+
+static void my_err(int, const char *, ...) H5_ATTR_FORMAT(printf, 2, 3);
+
+static void
+my_err(int code, const char *fmt, ...)
+{
+ va_list ap;
+ int errno_copy = errno;
+
+ (void)HDfprintf(stderr, "thread_id: ");
+ HDva_start(ap, fmt);
+ (void)HDvfprintf(stderr, fmt, ap);
+ HDva_end(ap);
+ (void)HDfprintf(stderr, ": %s\n", HDstrerror(errno_copy));
+ HDexit(code);
+}
+
#define threads_failure(_call, _result) do { \
- errx(EXIT_FAILURE, "%s.%d: " #_call ": %s", __func__, \
- __LINE__, strerror(_result)); \
+ my_errx(EXIT_FAILURE, "%s.%d: " #_call ": %s", __func__, \
+ __LINE__, HDstrerror(_result)); \
} while (false)
#define NTHREADS 5
@@ -52,13 +212,13 @@ atomic_printf(const char *fmt, ...)
va_end(ap);
if (nprinted == -1)
- err(EXIT_FAILURE, "%s.%d: vsnprintf", __func__, __LINE__);
+ my_err(EXIT_FAILURE, "%s.%d: vsnprintf", __func__, __LINE__);
else if (nprinted >= (ssize_t)sizeof(buf))
- errx(EXIT_FAILURE, "%s.%d: vsnprintf overflowed", __func__, __LINE__);
+ my_errx(EXIT_FAILURE, "%s.%d: vsnprintf overflowed", __func__, __LINE__);
nwritten = write(STDOUT_FILENO, buf, (size_t)nprinted);
if (nwritten < nprinted) {
- errx(EXIT_FAILURE, "%s.%d: write error or short write",
+ my_errx(EXIT_FAILURE, "%s.%d: write error or short write",
__func__, __LINE__);
}
}
@@ -66,7 +226,15 @@ atomic_printf(const char *fmt, ...)
/* Each thread runs this routine. The routine fetches the current
* thread's ID, makes sure that it is in the expected range, makes
* sure that in this round of testing, no two threads shared the
- * same ID,
+ * same ID, and checks that each thread's ID is constant over its lifetime.
+ *
+ * main() checks that every ID in [1, NTHREADS] is used in each round
+ * of testing. All NTHREADS threads synchronize on a barrier after each
+ * has fetched its ID. The barrier guarantees that all threads' lifetimes
+ * overlap at least momentarily, so the IDs will be unique, and there
+ * will be NTHREADS of them. Further, since thread IDs are assigned
+ * starting with 1, and the number of threads with IDs alive never exceeds
+ * NTHREADS, the least ID has to be 1 and the greatest, NTHREADS.
*/
static void *
thread_main(void H5_ATTR_UNUSED *arg)
@@ -114,7 +282,7 @@ main(void)
* mutex, etc.
*/
if (H5open() != SUCCEED)
- errx(EXIT_FAILURE, "%s.%d: H5open failed", __func__, __LINE__);
+ my_errx(EXIT_FAILURE, "%s.%d: H5open failed", __func__, __LINE__);
if ((rc = pthread_mutex_init(&used_lock, NULL)) == -1)
threads_failure(pthread_mutex_init, rc);
@@ -144,7 +312,7 @@ main(void)
for (i = 0; i < NTHREADS; i++) {
if (!used[i]) // access synchronized by thread create/join
- errx(EXIT_FAILURE, "thread ID %d did not run.", i + 1);
+ my_errx(EXIT_FAILURE, "thread ID %d did not run.", i + 1);
}
}
if ((rc = pthread_barrier_destroy(&barrier)) != 0)
@@ -156,8 +324,7 @@ main(void)
int
main(void)
{
- errx(EXIT_FAILURE, "not implemented in this configuration.");
+ HDfprintf(stderr, "not implemented in this configuration.\n");
+ return EXIT_SUCCESS;
}
-
#endif /*H5_HAVE_THREADSAFE && !H5_HAVE_WIN_THREADS*/
-
diff --git a/test/ttsafe_cancel.c b/test/ttsafe_cancel.c
index dd52232..f6bcd0d 100644
--- a/test/ttsafe_cancel.c
+++ b/test/ttsafe_cancel.c
@@ -61,7 +61,7 @@ tts_cancel(void)
pthread_attr_t attribute;
hid_t dataset;
int buffer;
- int ret;
+ int H5_ATTR_NDEBUG_UNUSED ret;
/* make thread scheduling global */
ret=pthread_attr_init(&attribute);
diff --git a/testpar/CMakeLists.txt b/testpar/CMakeLists.txt
index 3e4957d..d88e27f 100644
--- a/testpar/CMakeLists.txt
+++ b/testpar/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required (VERSION 3.10)
+cmake_minimum_required (VERSION 3.12)
project (HDF5_TEST_PAR C)
#-----------------------------------------------------------------------------
diff --git a/testpar/t_init_term.c b/testpar/t_init_term.c
index 933fbd2..6176bb5 100644
--- a/testpar/t_init_term.c
+++ b/testpar/t_init_term.c
@@ -65,7 +65,7 @@ main (int argc, char **argv)
if(MAINPROCESS) {
if(0 == nerrors)
- PASSED()
+ PASSED();
else
H5_FAILED()
}
diff --git a/testpar/t_mpi.c b/testpar/t_mpi.c
index 670e02b..9e5d839 100644
--- a/testpar/t_mpi.c
+++ b/testpar/t_mpi.c
@@ -526,7 +526,7 @@ static int test_mpio_1wMr(char *filename, int special_request) {
* ==================================================*/
irank = 0;
for (i = 0; i < DIMSIZE; i++)
- H5_CHECKED_ASSIGN(writedata[i], uint8_t, irank * DIMSIZE + i, int)
+ writedata[i] = (uint8_t)(irank * DIMSIZE + i);
mpi_off = irank * DIMSIZE;
/* Only one process writes */
@@ -597,7 +597,7 @@ static int test_mpio_1wMr(char *filename, int special_request) {
return 1;
};
for (i = 0; i < DIMSIZE; i++) {
- H5_CHECKED_ASSIGN(expect_val, uint8_t, irank * DIMSIZE + i, int);
+ expect_val = (uint8_t)(irank * DIMSIZE + i);
if (readdata[i] != expect_val) {
PRINTID;
HDprintf("read data[%d:%d] got %02x, expect %02x\n", irank, i,
diff --git a/testpar/t_pflush2.c b/testpar/t_pflush2.c
index f58e5a5..f4589c8 100644
--- a/testpar/t_pflush2.c
+++ b/testpar/t_pflush2.c
@@ -189,7 +189,7 @@ main(int argc, char *argv[])
goto error;
}
else if(mpi_rank == 0) {
- PASSED()
+ PASSED();
}
/* Check the case where the file was not flushed. This should give an error
@@ -203,7 +203,7 @@ main(int argc, char *argv[])
h5_fixname(FILENAME[1], fapl_id2, name, sizeof(name));
if(check_test_file(name, fapl_id2)) {
if(mpi_rank == 0)
- PASSED()
+ PASSED();
}
else {
H5_FAILED()
diff --git a/testpar/t_prestart.c b/testpar/t_prestart.c
index cf974e8..71a8277 100644
--- a/testpar/t_prestart.c
+++ b/testpar/t_prestart.c
@@ -128,7 +128,7 @@ main (int argc, char **argv)
if(MAINPROCESS) {
if(0 == nerrors)
- PASSED()
+ PASSED();
else
H5_FAILED()
}
diff --git a/testpar/t_pshutdown.c b/testpar/t_pshutdown.c
index ddbae9e..55073c8 100644
--- a/testpar/t_pshutdown.c
+++ b/testpar/t_pshutdown.c
@@ -116,7 +116,7 @@ main (int argc, char **argv)
if(MAINPROCESS) {
if(0 == nerrors)
- PASSED()
+ PASSED();
else
H5_FAILED()
}
diff --git a/tools/CMakeLists.txt b/tools/CMakeLists.txt
index aa09aa6..f453ad5 100644
--- a/tools/CMakeLists.txt
+++ b/tools/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required (VERSION 3.10)
+cmake_minimum_required (VERSION 3.12)
project (HDF5_TOOLS C)
add_subdirectory (lib)
diff --git a/tools/lib/CMakeLists.txt b/tools/lib/CMakeLists.txt
index 2acfab0..9ce7538 100644
--- a/tools/lib/CMakeLists.txt
+++ b/tools/lib/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required (VERSION 3.10)
+cmake_minimum_required (VERSION 3.12)
project (HDF5_TOOLS_LIB C)
#-----------------------------------------------------------------------------
diff --git a/tools/lib/h5tools_dump.c b/tools/lib/h5tools_dump.c
index 3cca910..96545c8 100644
--- a/tools/lib/h5tools_dump.c
+++ b/tools/lib/h5tools_dump.c
@@ -3978,16 +3978,16 @@ h5tools_dump_subsetting_header(FILE *stream, const h5tool_format_t *info, h5tool
void
h5tools_dump_data(FILE *stream, const h5tool_format_t *info, h5tools_context_t *ctx, hid_t obj_id, int obj_data)
{
- H5S_class_t space_type;
- int ndims;
- size_t i;
- hid_t space = H5I_INVALID_HID;
- hid_t f_type = H5I_INVALID_HID;
- hid_t new_obj_id = H5I_INVALID_HID;
- hid_t new_obj_sid = H5I_INVALID_HID;
- hsize_t total_size[H5S_MAX_RANK];
- hsize_t elmt_counter = 0; /*counts the # elements printed. */
- int status = -1;
+ H5S_class_t space_type;
+ int ndims;
+ size_t i;
+ hid_t space = H5I_INVALID_HID;
+ hid_t f_type = H5I_INVALID_HID;
+ hid_t new_obj_id = H5I_INVALID_HID;
+ hid_t new_obj_sid = H5I_INVALID_HID;
+ hsize_t total_size[H5S_MAX_RANK];
+ hsize_t elmt_counter = 0; /*counts the # elements printed. */
+ int status = -1;
h5tools_context_t datactx; /* print context */
h5tools_str_t buffer; /* string into which to render */
hsize_t curr_pos = 0; /* total data element position */
@@ -4061,21 +4061,21 @@ h5tools_dump_data(FILE *stream, const h5tool_format_t *info, h5tools_context_t *
datactx.need_prefix = TRUE;
if (NULL != (ref_buf = (H5R_ref_t *)HDcalloc(MAX(sizeof(unsigned), sizeof(H5R_ref_t)), (size_t)ndims))) {
- if(obj_data) {
- if(H5Dread(obj_id, H5T_STD_REF, H5S_ALL, H5S_ALL, H5P_DEFAULT, ref_buf) < 0) {
+ if (obj_data) {
+ if (H5Dread(obj_id, H5T_STD_REF, H5S_ALL, H5S_ALL, H5P_DEFAULT, ref_buf) < 0) {
HDfree(ref_buf);
H5TOOLS_INFO("H5Dread reference failed");
H5TOOLS_GOTO_DONE_NO_RET();
}
}
else {
- if(H5Aread(obj_id, H5T_STD_REF, ref_buf) < 0) {
+ if (H5Aread(obj_id, H5T_STD_REF, ref_buf) < 0) {
HDfree(ref_buf);
H5TOOLS_INFO("H5Aread reference failed");
H5TOOLS_GOTO_DONE_NO_RET();
}
}
- for(i = 0; i < (size_t)ndims; i++, datactx.cur_elmt++, elmt_counter++) {
+ for (i = 0; i < (size_t)ndims; i++, datactx.cur_elmt++, elmt_counter++) {
H5O_type_t obj_type = -1; /* Object type */
H5R_type_t ref_type; /* Reference type */
diff --git a/tools/libtest/CMakeLists.txt b/tools/libtest/CMakeLists.txt
index 5f53272..7246e66 100644
--- a/tools/libtest/CMakeLists.txt
+++ b/tools/libtest/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required (VERSION 3.10)
+cmake_minimum_required (VERSION 3.12)
project (HDF5_TOOLS_LIBTEST C)
#-----------------------------------------------------------------------------
diff --git a/tools/src/CMakeLists.txt b/tools/src/CMakeLists.txt
index 757c9cd..8c3e361 100644
--- a/tools/src/CMakeLists.txt
+++ b/tools/src/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required (VERSION 3.10)
+cmake_minimum_required (VERSION 3.12)
project (HDF5_TOOLS_SRC C)
#-- Add the h5diff and test executables
diff --git a/tools/src/h5copy/CMakeLists.txt b/tools/src/h5copy/CMakeLists.txt
index 85233ef..29888f2 100644
--- a/tools/src/h5copy/CMakeLists.txt
+++ b/tools/src/h5copy/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required (VERSION 3.10)
+cmake_minimum_required (VERSION 3.12)
project (HDF5_TOOLS_SRC_H5COPY C)
# --------------------------------------------------------------------
diff --git a/tools/src/h5diff/CMakeLists.txt b/tools/src/h5diff/CMakeLists.txt
index 2009a14..93e99cf 100644
--- a/tools/src/h5diff/CMakeLists.txt
+++ b/tools/src/h5diff/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required (VERSION 3.10)
+cmake_minimum_required (VERSION 3.12)
project (HDF5_TOOLS_SRC_H5DIFF C)
# --------------------------------------------------------------------
diff --git a/tools/src/h5dump/CMakeLists.txt b/tools/src/h5dump/CMakeLists.txt
index 383b04e..dbf92cf 100644
--- a/tools/src/h5dump/CMakeLists.txt
+++ b/tools/src/h5dump/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required (VERSION 3.10)
+cmake_minimum_required (VERSION 3.12)
project (HDF5_TOOLS_SRC_H5DUMP C)
# --------------------------------------------------------------------
diff --git a/tools/src/h5format_convert/CMakeLists.txt b/tools/src/h5format_convert/CMakeLists.txt
index 540be8c..70c07ee 100644
--- a/tools/src/h5format_convert/CMakeLists.txt
+++ b/tools/src/h5format_convert/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required (VERSION 3.10)
+cmake_minimum_required (VERSION 3.12)
project (HDF5_TOOLS_SRC_H5FC C)
# --------------------------------------------------------------------
diff --git a/tools/src/h5import/CMakeLists.txt b/tools/src/h5import/CMakeLists.txt
index dd7921d..a52467e 100644
--- a/tools/src/h5import/CMakeLists.txt
+++ b/tools/src/h5import/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required (VERSION 3.10)
+cmake_minimum_required (VERSION 3.12)
project (HDF5_TOOLS_SRC_H5IMPORT C)
# --------------------------------------------------------------------
diff --git a/tools/src/h5jam/CMakeLists.txt b/tools/src/h5jam/CMakeLists.txt
index f430417..69d4c4d 100644
--- a/tools/src/h5jam/CMakeLists.txt
+++ b/tools/src/h5jam/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required (VERSION 3.10)
+cmake_minimum_required (VERSION 3.12)
project (HDF5_TOOLS_SRC_H5JAM C)
# --------------------------------------------------------------------
diff --git a/tools/src/h5ls/CMakeLists.txt b/tools/src/h5ls/CMakeLists.txt
index ffbb1c7..7be33b5 100644
--- a/tools/src/h5ls/CMakeLists.txt
+++ b/tools/src/h5ls/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required (VERSION 3.10)
+cmake_minimum_required (VERSION 3.12)
project (HDF5_TOOLS_SRC_H5LS C)
#-----------------------------------------------------------------------------
diff --git a/tools/src/h5repack/CMakeLists.txt b/tools/src/h5repack/CMakeLists.txt
index 4a1430e..967e8d7 100644
--- a/tools/src/h5repack/CMakeLists.txt
+++ b/tools/src/h5repack/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required (VERSION 3.10)
+cmake_minimum_required (VERSION 3.12)
project (HDF5_TOOLS_SRC_H5REPACK C)
# --------------------------------------------------------------------
diff --git a/tools/src/h5repack/h5repack_refs.c b/tools/src/h5repack/h5repack_refs.c
index e6a747d..2685823 100644
--- a/tools/src/h5repack/h5repack_refs.c
+++ b/tools/src/h5repack/h5repack_refs.c
@@ -530,9 +530,16 @@ static int copy_refs_attr(hid_t loc_in,
ref_comp_size = NULL;
}
}
+ /* This line below needs to be moved in this loop instead of inserting outside. Otherwise,
+ ref_comp_field_n may be >0 for the next attribute, which may not be
+ the reference type and will be accidently treated as the reference type.
+ It will then cause the H5Acreate2 failed since that attribute is already created.
+ KY 2020-02-07
+ */
+ is_ref_comp = (ref_comp_field_n > 0);
+
}
- is_ref_comp = (ref_comp_field_n > 0);
if (!(is_ref || is_ref_vlen || is_ref_array || is_ref_comp)) {
if (H5Tclose(mtype_id) < 0)
diff --git a/tools/src/h5stat/CMakeLists.txt b/tools/src/h5stat/CMakeLists.txt
index 55c675f..f6cc542 100644
--- a/tools/src/h5stat/CMakeLists.txt
+++ b/tools/src/h5stat/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required (VERSION 3.10)
+cmake_minimum_required (VERSION 3.12)
project (HDF5_TOOLS_SRC_H5STAT C)
# --------------------------------------------------------------------
diff --git a/tools/src/misc/CMakeLists.txt b/tools/src/misc/CMakeLists.txt
index 6b41d7f..16e4555 100644
--- a/tools/src/misc/CMakeLists.txt
+++ b/tools/src/misc/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required (VERSION 3.10)
+cmake_minimum_required (VERSION 3.12)
project (HDF5_TOOLS_SRC_MISC C)
# --------------------------------------------------------------------
diff --git a/tools/test/CMakeLists.txt b/tools/test/CMakeLists.txt
index f4106fc..a43a848 100644
--- a/tools/test/CMakeLists.txt
+++ b/tools/test/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required (VERSION 3.10)
+cmake_minimum_required (VERSION 3.12)
project (HDF5_TOOLS_TEST C)
#-- Add the h5diff tests
diff --git a/tools/test/h5copy/CMakeLists.txt b/tools/test/h5copy/CMakeLists.txt
index 028935f..034c8d3 100644
--- a/tools/test/h5copy/CMakeLists.txt
+++ b/tools/test/h5copy/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required (VERSION 3.10)
+cmake_minimum_required (VERSION 3.12)
project (HDF5_TOOLS_TEST_H5COPY C)
# --------------------------------------------------------------------
diff --git a/tools/test/h5diff/CMakeLists.txt b/tools/test/h5diff/CMakeLists.txt
index 82e09c6..e4bfc99 100644
--- a/tools/test/h5diff/CMakeLists.txt
+++ b/tools/test/h5diff/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required (VERSION 3.10)
+cmake_minimum_required (VERSION 3.12)
project (HDF5_TOOLS_TEST_H5DIFF C)
# --------------------------------------------------------------------
diff --git a/tools/test/h5dump/CMakeLists.txt b/tools/test/h5dump/CMakeLists.txt
index b9e4ef5..cfc542f 100644
--- a/tools/test/h5dump/CMakeLists.txt
+++ b/tools/test/h5dump/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required (VERSION 3.10)
+cmake_minimum_required (VERSION 3.12)
project (HDF5_TOOLS_TEST_H5DUMP C)
#-----------------------------------------------------------------------------
diff --git a/tools/test/h5dump/CMakeTests.cmake b/tools/test/h5dump/CMakeTests.cmake
index 187328e..91d3ea9 100644
--- a/tools/test/h5dump/CMakeTests.cmake
+++ b/tools/test/h5dump/CMakeTests.cmake
@@ -558,14 +558,12 @@
-P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake"
)
set_tests_properties (H5DUMP-${resultfile} PROPERTIES DEPENDS "H5DUMP-${resultfile}-clear-objects")
- if(NOT CMAKE_VERSION VERSION_LESS "3.14.0")
- add_test (
- NAME H5DUMP-${resultfile}-output-cmp
- COMMAND ${CMAKE_COMMAND} -E compare_files --ignore-eol ${resultfile}.txt ${resultfile}.exp
- )
- set_tests_properties (H5DUMP-${resultfile}-output-cmp PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std")
- set_tests_properties (H5DUMP-${resultfile}-output-cmp PROPERTIES DEPENDS H5DUMP-${resultfile})
- endif ()
+ add_test (
+ NAME H5DUMP-${resultfile}-output-cmp
+ COMMAND ${CMAKE_COMMAND} -E compare_files ${CMAKE_IGNORE_EOL} ${resultfile}.txt ${resultfile}.exp
+ )
+ set_tests_properties (H5DUMP-${resultfile}-output-cmp PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std")
+ set_tests_properties (H5DUMP-${resultfile}-output-cmp PROPERTIES DEPENDS H5DUMP-${resultfile})
endif ()
endmacro ()
@@ -601,20 +599,18 @@
-P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake"
)
set_tests_properties (H5DUMP-${resultfile} PROPERTIES DEPENDS "H5DUMP-${resultfile}-clear-objects")
- if(NOT CMAKE_VERSION VERSION_LESS "3.14.0")
- add_test (
- NAME H5DUMP-${resultfile}-output-cmp
- COMMAND ${CMAKE_COMMAND} -E compare_files --ignore-eol ${resultfile}.txt ${resultfile}.exp
- )
- set_tests_properties (H5DUMP-${resultfile}-output-cmp PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std")
- set_tests_properties (H5DUMP-${resultfile}-output-cmp PROPERTIES DEPENDS H5DUMP-${resultfile})
- add_test (
- NAME H5DUMP-${resultfile}-output-cmp-ddl
- COMMAND ${CMAKE_COMMAND} -E compare_files --ignore-eol ${ddlfile}.txt ${ddlfile}.exp
- )
- set_tests_properties (H5DUMP-${resultfile}-output-cmp-ddl PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std")
- set_tests_properties (H5DUMP-${resultfile}-output-cmp-ddl PROPERTIES DEPENDS H5DUMP-${resultfile}-output-cmp)
- endif ()
+ add_test (
+ NAME H5DUMP-${resultfile}-output-cmp
+ COMMAND ${CMAKE_COMMAND} -E compare_files ${CMAKE_IGNORE_EOL} ${resultfile}.txt ${resultfile}.exp
+ )
+ set_tests_properties (H5DUMP-${resultfile}-output-cmp PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std")
+ set_tests_properties (H5DUMP-${resultfile}-output-cmp PROPERTIES DEPENDS H5DUMP-${resultfile})
+ add_test (
+ NAME H5DUMP-${resultfile}-output-cmp-ddl
+ COMMAND ${CMAKE_COMMAND} -E compare_files ${CMAKE_IGNORE_EOL} ${ddlfile}.txt ${ddlfile}.exp
+ )
+ set_tests_properties (H5DUMP-${resultfile}-output-cmp-ddl PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std")
+ set_tests_properties (H5DUMP-${resultfile}-output-cmp-ddl PROPERTIES DEPENDS H5DUMP-${resultfile}-output-cmp)
endif ()
endmacro ()
@@ -631,14 +627,12 @@
)
set_tests_properties (H5DUMP-output-${resultfile} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std")
set_tests_properties (H5DUMP-output-${resultfile} PROPERTIES DEPENDS H5DUMP-output-${resultfile}-clear-objects)
- if(NOT CMAKE_VERSION VERSION_LESS "3.14.0")
- add_test (
- NAME H5DUMP-output-cmp-${resultfile}
- COMMAND ${CMAKE_COMMAND} -E compare_files --ignore-eol ${resultfile}.txt ${resultfile}.exp
- )
- set_tests_properties (H5DUMP-output-cmp-${resultfile} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std")
- set_tests_properties (H5DUMP-output-cmp-${resultfile} PROPERTIES DEPENDS H5DUMP-output-${resultfile})
- endif ()
+ add_test (
+ NAME H5DUMP-output-cmp-${resultfile}
+ COMMAND ${CMAKE_COMMAND} -E compare_files ${CMAKE_IGNORE_EOL} ${resultfile}.txt ${resultfile}.exp
+ )
+ set_tests_properties (H5DUMP-output-cmp-${resultfile} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std")
+ set_tests_properties (H5DUMP-output-cmp-${resultfile} PROPERTIES DEPENDS H5DUMP-output-${resultfile})
endif ()
endmacro ()
diff --git a/tools/test/h5dump/h5dumpgentest.c b/tools/test/h5dump/h5dumpgentest.c
index e68e622..550b182 100644
--- a/tools/test/h5dump/h5dumpgentest.c
+++ b/tools/test/h5dump/h5dumpgentest.c
@@ -3093,7 +3093,7 @@ static void gent_array1(void)
hsize_t sdims1[] = {SPACE1_DIM1};
hsize_t tdims1[] = {ARRAY1_DIM1};
int i,j; /* counting variables */
- herr_t ret; /* Generic return value */
+ herr_t ret H5_ATTR_NDEBUG_UNUSED; /* Generic return value */
/* Allocate and initialize array data to write */
for(i=0; i<SPACE1_DIM1; i++)
@@ -6312,7 +6312,7 @@ static int gent_ldouble(void)
return 0;
- error:
+error:
HDprintf("error !\n");
return -1;
@@ -7567,6 +7567,7 @@ gent_attr_intsize(void)
H5Gclose(root);
H5Fclose(fid);
}
+
static void
gent_nodata(void)
{
diff --git a/tools/test/h5format_convert/CMakeLists.txt b/tools/test/h5format_convert/CMakeLists.txt
index 9e49c4f..99420d8 100644
--- a/tools/test/h5format_convert/CMakeLists.txt
+++ b/tools/test/h5format_convert/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required (VERSION 3.10)
+cmake_minimum_required (VERSION 3.12)
project (HDF5_TOOLS_TEST_H5FC C)
# --------------------------------------------------------------------
diff --git a/tools/test/h5import/CMakeLists.txt b/tools/test/h5import/CMakeLists.txt
index a77ba00..f3991c5 100644
--- a/tools/test/h5import/CMakeLists.txt
+++ b/tools/test/h5import/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required (VERSION 3.10)
+cmake_minimum_required (VERSION 3.12)
project (HDF5_TOOLS_TEST_H5IMPORT C)
# --------------------------------------------------------------------
diff --git a/tools/test/h5jam/CMakeLists.txt b/tools/test/h5jam/CMakeLists.txt
index f00e781..78160d3 100644
--- a/tools/test/h5jam/CMakeLists.txt
+++ b/tools/test/h5jam/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required (VERSION 3.10)
+cmake_minimum_required (VERSION 3.12)
project (HDF5_TOOLS_TEST_H5JAM C)
# --------------------------------------------------------------------
diff --git a/tools/test/h5ls/CMakeLists.txt b/tools/test/h5ls/CMakeLists.txt
index abbe6d0..3993277 100644
--- a/tools/test/h5ls/CMakeLists.txt
+++ b/tools/test/h5ls/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required (VERSION 3.10)
+cmake_minimum_required (VERSION 3.12)
project (HDF5_TOOLS_TEST_H5LS C)
#-----------------------------------------------------------------------------
diff --git a/tools/test/h5repack/CMakeLists.txt b/tools/test/h5repack/CMakeLists.txt
index 5722354..6f0b284 100644
--- a/tools/test/h5repack/CMakeLists.txt
+++ b/tools/test/h5repack/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required (VERSION 3.10)
+cmake_minimum_required (VERSION 3.12)
project (HDF5_TOOLS_TEST_H5REPACK C)
# --------------------------------------------------------------------
diff --git a/tools/test/h5repack/CMakeTests.cmake b/tools/test/h5repack/CMakeTests.cmake
index e654bce..4823d07 100644
--- a/tools/test/h5repack/CMakeTests.cmake
+++ b/tools/test/h5repack/CMakeTests.cmake
@@ -638,12 +638,16 @@
macro (ADD_H5_TEST_META testname testfile)
# Remove any output file left over from previous test run
add_test (
- NAME H5REPACK_META-${testname}_N-clear-objects
+ NAME H5REPACK_META-${testname}-clear-objects
COMMAND ${CMAKE_COMMAND} -E remove
testfiles/out-${testname}_N.${testname}.h5
+ testfiles/out-${testname}_N.${testname}.out
+ testfiles/out-${testname}_N.${testname}.out.err
testfiles/out-${testname}_M.${testname}.h5
+ testfiles/out-${testname}_M.${testname}.out
+ testfiles/out-${testname}_M.${testname}.out.err
)
- set_tests_properties (H5REPACK_META-${testname}_N-clear-objects PROPERTIES
+ set_tests_properties (H5REPACK_META-${testname}-clear-objects PROPERTIES
FIXTURES_REQUIRED clear_h5repack
)
add_test (
@@ -651,21 +655,61 @@
COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5repack${tgt_file_ext}> ${PROJECT_BINARY_DIR}/testfiles/${testfile} ${PROJECT_BINARY_DIR}/testfiles/out-${testname}_N.${testname}.h5
)
set_tests_properties (H5REPACK_META-${testname}_N PROPERTIES
- DEPENDS H5REPACK_META-${testname}_N-clear-objects
+ DEPENDS H5REPACK_META-${testname}-clear-objects
+ )
+ add_test (
+ NAME H5REPACK_META-${testname}_N_DFF
+ COMMAND "${CMAKE_COMMAND}"
+ -D "TEST_EMULATOR=${CMAKE_CROSSCOMPILING_EMULATOR}"
+ -D "TEST_PROGRAM=$<TARGET_FILE:h5diff${tgt_file_ext}>"
+ -D "TEST_ARGS:STRING=-v;${testfile};out-${testname}_N.${testname}.h5"
+ -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles"
+ -D "TEST_OUTPUT=out-${testname}_N.${testname}.out"
+ -D "TEST_EXPECT=0"
+ -D "TEST_REFERENCE=out-${testname}_N.${testname}.txt"
+ -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake"
+ )
+ set_tests_properties (H5REPACK_META-${testname}_N_DFF PROPERTIES
+ DEPENDS H5REPACK_META-${testname}_N
)
add_test (
NAME H5REPACK_META-${testname}_M
COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5repack${tgt_file_ext}> ${ARGN} ${PROJECT_BINARY_DIR}/testfiles/${testfile} ${PROJECT_BINARY_DIR}/testfiles/out-${testname}_M.${testname}.h5
)
set_tests_properties (H5REPACK_META-${testname}_M PROPERTIES
- DEPENDS H5REPACK_META-${testname}_N
+ DEPENDS H5REPACK_META-${testname}_N_DFF
)
-
- add_test (NAME H5REPACK_META-${testname} COMMAND ${CMAKE_COMMAND} -E compare_files ${CMAKE_IGNORE_EOL} ${PROJECT_BINARY_DIR}/testfiles/out-${testname}_N.${testname}.h5 ${PROJECT_BINARY_DIR}/testfiles/out-${testname}_M.${testname}.h5)
- set_tests_properties (H5REPACK_META-${testname} PROPERTIES
- WILL_FAIL "true"
+ add_test (
+ NAME H5REPACK_META-${testname}_M_DFF
+ COMMAND "${CMAKE_COMMAND}"
+ -D "TEST_EMULATOR=${CMAKE_CROSSCOMPILING_EMULATOR}"
+ -D "TEST_PROGRAM=$<TARGET_FILE:h5diff${tgt_file_ext}>"
+ -D "TEST_ARGS:STRING=-v;${testfile};out-${testname}_M.${testname}.h5"
+ -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles"
+ -D "TEST_OUTPUT=out-${testname}_M.${testname}.out"
+ -D "TEST_EXPECT=0"
+ -D "TEST_REFERENCE=out-${testname}_M.${testname}.txt"
+ -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake"
+ )
+ set_tests_properties (H5REPACK_META-${testname}_M_DFF PROPERTIES
DEPENDS H5REPACK_META-${testname}_M
)
+ add_test (NAME H5REPACK_META-${testname}
+ COMMAND "${CMAKE_COMMAND}"
+ -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles"
+ -D "TEST_ONEFILE=out-${testname}_N.${testname}.out"
+ -D "TEST_TWOFILE=out-${testname}_M.${testname}.h5"
+ -D "TEST_FUNCTION=LTEQ"
+ -P "${HDF_RESOURCES_DIR}/fileCompareTest.cmake"
+ )
+ if (CMAKE_VERSION VERSION_LESS "3.14.0")
+ set_tests_properties (H5REPACK_META-${testname} PROPERTIES
+ DISABLED "true"
+ )
+ endif ()
+ set_tests_properties (H5REPACK_META-${testname} PROPERTIES
+ DEPENDS H5REPACK_META-${testname}_M_DFF
+ )
endmacro ()
macro (ADD_H5_UD_TEST testname resultcode resultfile)
diff --git a/tools/test/h5stat/CMakeLists.txt b/tools/test/h5stat/CMakeLists.txt
index 0e2ee5e..f50a747 100644
--- a/tools/test/h5stat/CMakeLists.txt
+++ b/tools/test/h5stat/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required (VERSION 3.10)
+cmake_minimum_required (VERSION 3.12)
project (HDF5_TOOLS_TEST_H5STAT C)
# --------------------------------------------------------------------
diff --git a/tools/test/misc/CMakeLists.txt b/tools/test/misc/CMakeLists.txt
index 089a302..060c15b 100644
--- a/tools/test/misc/CMakeLists.txt
+++ b/tools/test/misc/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required (VERSION 3.10)
+cmake_minimum_required (VERSION 3.12)
project (HDF5_TOOLS_TEST_MISC C)
# --------------------------------------------------------------------
diff --git a/tools/test/misc/h5clear_gentest.c b/tools/test/misc/h5clear_gentest.c
index 1411c21..d5f415e 100644
--- a/tools/test/misc/h5clear_gentest.c
+++ b/tools/test/misc/h5clear_gentest.c
@@ -170,7 +170,7 @@ gen_enhance_files(hbool_t user)
hid_t did = H5I_INVALID_HID; /* Dataset ID */
hsize_t dim[1]; /* Dimension sizes */
int data[NUM_ELMTS]; /* Buffer for data */
- int fd = -1; /* The file descriptor ID */
+ int fd = H5I_INVALID_HID; /* The file descriptor ID */
int64_t eoa; /* The EOA value */
uint32_t chksum; /* The chksum value */
int i = 0 , j = 0, u = 0; /* Local index variable */
diff --git a/tools/test/misc/vds/CMakeLists.txt b/tools/test/misc/vds/CMakeLists.txt
index 092cabc..71261c4 100644
--- a/tools/test/misc/vds/CMakeLists.txt
+++ b/tools/test/misc/vds/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required (VERSION 3.10)
+cmake_minimum_required (VERSION 3.12)
project (HDF5_TOOLS_TEST_MISC_VDS C)
MACRO (ADD_H5_GENERATOR genfile)
diff --git a/tools/test/perform/CMakeLists.txt b/tools/test/perform/CMakeLists.txt
index d788ffa..6780c06 100644
--- a/tools/test/perform/CMakeLists.txt
+++ b/tools/test/perform/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required (VERSION 3.10)
+cmake_minimum_required (VERSION 3.12)
project (HDF5_TOOLS_TEST_PERFORM C)
# --------------------------------------------------------------------
@@ -179,10 +179,10 @@ if (H5_HAVE_PARALLEL AND HDF5_TEST_PARALLEL)
target_include_directories (h5perf_alone PRIVATE "${HDF5_SRC_DIR};${HDF5_BINARY_DIR};${HDF5_TOOLS_DIR}/lib;$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>")
if (NOT BUILD_SHARED_LIBS)
TARGET_C_PROPERTIES (h5perf_alone STATIC)
- target_link_libraries (h5perf_alone PRIVATE ${HDF5_LIB_TARGET} "$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_LIBRARIES}>")
+ target_link_libraries (h5perf_alone PRIVATE ${HDF5_LIB_TARGET} ${LINK_LIBS} "$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_LIBRARIES}>")
else ()
TARGET_C_PROPERTIES (h5perf_alone SHARED)
- target_link_libraries (h5perf_alone PRIVATE ${HDF5_LIBSH_TARGET} "$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_LIBRARIES}>")
+ target_link_libraries (h5perf_alone PRIVATE ${HDF5_LIBSH_TARGET} ${LINK_LIBS} "$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_LIBRARIES}>")
endif ()
set_target_properties (h5perf_alone PROPERTIES FOLDER perform)
set_property (TARGET h5perf_alone