From 698ee8e4394257de1911b400fc9ac5ba337d9099 Mon Sep 17 00:00:00 2001 From: Larry Knox Date: Wed, 2 Oct 2024 12:28:19 -0500 Subject: [PATCH 01/15] Set develop branch version to 1.17.0. (#4912) --- README.md | 2 +- config/cmake/scripts/HDF5config.cmake | 2 +- configure.ac | 2 +- java/src/hdf/hdf5lib/H5.java | 4 ++-- java/test/TestH5.java | 4 ++-- release_docs/NEWSLETTER.txt | 2 +- release_docs/RELEASE.txt | 2 +- src/H5public.h | 6 +++--- .../h5repack_layout.h5-plugin_version_test.ddl | 14 +++++++------- 9 files changed, 19 insertions(+), 19 deletions(-) diff --git a/README.md b/README.md index f6daf8549c0..37c45ad022d 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -HDF5 version 1.15.0 currently under development +HDF5 version 1.17.0 currently under development ![HDF5 Logo](doxygen/img/HDF5.png) diff --git a/config/cmake/scripts/HDF5config.cmake b/config/cmake/scripts/HDF5config.cmake index 3461422f0e1..7aeb69b2cd9 100644 --- a/config/cmake/scripts/HDF5config.cmake +++ b/config/cmake/scripts/HDF5config.cmake @@ -37,7 +37,7 @@ cmake_minimum_required (VERSION 3.18) # CTEST_SOURCE_NAME - source folder ############################################################################## -set (CTEST_SOURCE_VERSION "1.15.0") +set (CTEST_SOURCE_VERSION "1.17.0") set (CTEST_SOURCE_VERSEXT "") ############################################################################## diff --git a/configure.ac b/configure.ac index c51e19ddca3..8d1e3556226 100644 --- a/configure.ac +++ b/configure.ac @@ -22,7 +22,7 @@ AC_PREREQ([2.71]) ## NOTE: Do not forget to change the version number here when we do a ## release!!! ## -AC_INIT([HDF5], [1.15.0], [help@hdfgroup.org]) +AC_INIT([HDF5], [1.17.0], [help@hdfgroup.org]) AC_CONFIG_SRCDIR([src/H5.c]) AC_CONFIG_HEADERS([src/H5config.h]) diff --git a/java/src/hdf/hdf5lib/H5.java b/java/src/hdf/hdf5lib/H5.java index 388ba18f87a..9d64e7ffcc4 100644 --- a/java/src/hdf/hdf5lib/H5.java +++ b/java/src/hdf/hdf5lib/H5.java @@ -231,7 +231,7 @@ * which prints out the HDF5 error stack, as described in the HDF5 C API @ref H5Eprint(). This * may be used by Java exception handlers to print out the HDF5 error stack.
* - * @version HDF5 1.15.0
+ * @version HDF5 1.17.0
* See also: * @ref HDFARRAY hdf.hdf5lib.HDFArray
* @ref HDF5CONST hdf.hdf5lib.HDF5Constants
@@ -273,7 +273,7 @@ public class H5 implements java.io.Serializable { * * Make sure to update the versions number when a different library is used. */ - public final static int LIB_VERSION[] = {1, 15, 0}; + public final static int LIB_VERSION[] = {1, 17, 0}; /** * @ingroup JH5 diff --git a/java/test/TestH5.java b/java/test/TestH5.java index d3ce84426ca..bfe2cc59540 100644 --- a/java/test/TestH5.java +++ b/java/test/TestH5.java @@ -313,7 +313,7 @@ public void testH5set_free_list_limits() @Test public void testH5get_libversion() { - int libversion[] = {1, 15, 0}; + int libversion[] = {1, 17, 0}; try { H5.H5get_libversion(libversion); @@ -354,7 +354,7 @@ public void testH5get_libversion_null_param() @Test public void testH5check_version() { - int majnum = 1, minnum = 15, relnum = 0; + int majnum = 1, minnum = 17, relnum = 0; try { H5.H5check_version(majnum, minnum, relnum); diff --git a/release_docs/NEWSLETTER.txt b/release_docs/NEWSLETTER.txt index 3884718c6ed..9e06758f16d 100644 --- a/release_docs/NEWSLETTER.txt +++ b/release_docs/NEWSLETTER.txt @@ -1,4 +1,4 @@ -HDF5 version 1.15.0 currently under development +HDF5 version 1.17.0 currently under development Features included for the next major release: ---------------------------------------------------------------------------- diff --git a/release_docs/RELEASE.txt b/release_docs/RELEASE.txt index 75c463a5d7a..6459e806cff 100644 --- a/release_docs/RELEASE.txt +++ b/release_docs/RELEASE.txt @@ -1,4 +1,4 @@ -HDF5 version 1.15.0 currently under development +HDF5 version 1.17.0 currently under development ================================================================================ diff --git a/src/H5public.h b/src/H5public.h index 9dd18cd5ff7..460aca5f1e1 100644 --- a/src/H5public.h +++ b/src/H5public.h @@ -79,7 +79,7 @@ /** * For minor interface/format changes */ -#define H5_VERS_MINOR 15 +#define H5_VERS_MINOR 17 /** * For tweaks, bug-fixes, or development */ @@ -91,11 +91,11 @@ /** * Short version string */ -#define H5_VERS_STR "1.15.0" +#define H5_VERS_STR "1.17.0" /** * Full version string */ -#define H5_VERS_INFO "HDF5 library version: 1.15.0" +#define H5_VERS_INFO "HDF5 library version: 1.17.0" #define H5check() H5check_version(H5_VERS_MAJOR, H5_VERS_MINOR, H5_VERS_RELEASE) diff --git a/tools/test/h5repack/expected/h5repack_layout.h5-plugin_version_test.ddl b/tools/test/h5repack/expected/h5repack_layout.h5-plugin_version_test.ddl index d7aa1c3b0c5..fe10a5588df 100644 --- a/tools/test/h5repack/expected/h5repack_layout.h5-plugin_version_test.ddl +++ b/tools/test/h5repack/expected/h5repack_layout.h5-plugin_version_test.ddl @@ -11,7 +11,7 @@ GROUP "/" { USER_DEFINED_FILTER { FILTER_ID 260 COMMENT dynlib4 - PARAMS { 9 1 15 0 } + PARAMS { 9 1 17 0 } } } FILLVALUE { @@ -33,7 +33,7 @@ GROUP "/" { USER_DEFINED_FILTER { FILTER_ID 260 COMMENT dynlib4 - PARAMS { 9 1 15 0 } + PARAMS { 9 1 17 0 } } } FILLVALUE { @@ -55,7 +55,7 @@ GROUP "/" { USER_DEFINED_FILTER { FILTER_ID 260 COMMENT dynlib4 - PARAMS { 9 1 15 0 } + PARAMS { 9 1 17 0 } } } FILLVALUE { @@ -77,7 +77,7 @@ GROUP "/" { USER_DEFINED_FILTER { FILTER_ID 260 COMMENT dynlib4 - PARAMS { 9 1 15 0 } + PARAMS { 9 1 17 0 } } } FILLVALUE { @@ -99,7 +99,7 @@ GROUP "/" { USER_DEFINED_FILTER { FILTER_ID 260 COMMENT dynlib4 - PARAMS { 9 1 15 0 } + PARAMS { 9 1 17 0 } } } FILLVALUE { @@ -121,7 +121,7 @@ GROUP "/" { USER_DEFINED_FILTER { FILTER_ID 260 COMMENT dynlib4 - PARAMS { 9 1 15 0 } + PARAMS { 9 1 17 0 } } } FILLVALUE { @@ -143,7 +143,7 @@ GROUP "/" { USER_DEFINED_FILTER { FILTER_ID 260 COMMENT dynlib4 - PARAMS { 9 1 15 0 } + PARAMS { 9 1 17 0 } } } FILLVALUE { From 07756c87f53868866f6f7af50d957ca7fef7bce2 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Wed, 2 Oct 2024 16:18:09 -0500 Subject: [PATCH 02/15] Update develop to 1.18 API --- .github/workflows/main-cmake-spc.yml | 60 +++++++++++++++++++ .github/workflows/publish-release.yml | 4 ++ CMakeLists.txt | 20 +++++-- HDF5Examples/C/TUTR/testh5cc.sh.in | 20 ++++++- c++/src/H5FaccProp.cpp | 8 +++ config/cmake/H5pubconf.h.in | 3 + config/cmake/HDF5ExampleCache.cmake | 2 + configure.ac | 13 ++-- fortran/src/H5_f.c | 1 + fortran/src/H5_ff.F90 | 1 + fortran/src/H5f90global.F90 | 2 + fortran/test/tH5P_F03.F90 | 7 +++ java/src/hdf/hdf5lib/HDF5Constants.java | 4 ++ java/src/jni/h5Constants.c | 5 ++ release_docs/INSTALL_CMake.txt | 2 +- src/H5Aint.c | 1 + src/H5Dlayout.c | 1 + src/H5Fpublic.h | 3 +- src/H5Fsuper.c | 1 + src/H5Ofill.c | 1 + src/H5Ofsinfo.c | 1 + src/H5Oint.c | 1 + src/H5Opline.c | 1 + src/H5Ppublic.h | 30 ++++++++++ src/H5S.c | 1 + src/H5Shyper.c | 1 + src/H5Spoint.c | 1 + src/H5T.c | 1 + src/H5trace.c | 6 +- test/h5test.c | 1 + test/tfile.c | 1 + tools/src/h5repack/h5repack.h | 3 +- tools/src/h5repack/h5repack_main.c | 3 +- .../test/h5repack/expected/h5repack-help.txt | 3 +- 34 files changed, 196 insertions(+), 17 deletions(-) diff --git a/.github/workflows/main-cmake-spc.yml b/.github/workflows/main-cmake-spc.yml index df9ccff495c..1ab59563cc8 100644 --- a/.github/workflows/main-cmake-spc.yml +++ b/.github/workflows/main-cmake-spc.yml @@ -199,6 +199,66 @@ jobs: run: ctest . --parallel 2 -C Debug -V working-directory: ${{ runner.workspace }}/build + build_v1_14: + name: "gcc DBG v1.12 default API" + runs-on: ubuntu-latest + steps: + # SETUP + - name: Install Linux Dependencies + run: | + sudo apt-get update + sudo apt-get install ninja-build doxygen graphviz + sudo apt install libssl3 libssl-dev libcurl4 libcurl4-openssl-dev + sudo apt install gcc-12 g++-12 gfortran-12 + echo "CC=gcc-12" >> $GITHUB_ENV + echo "CXX=g++-12" >> $GITHUB_ENV + echo "FC=gfortran-12" >> $GITHUB_ENV + + # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it + - name: Get Sources + uses: actions/checkout@v4.1.7 + + # + # CMAKE CONFIGURE + # + - name: CMake Configure + run: | + mkdir "${{ runner.workspace }}/build" + cd "${{ runner.workspace }}/build" + cmake -C $GITHUB_WORKSPACE/config/cmake/cacheinit.cmake \ + -G Ninja \ + -DCMAKE_BUILD_TYPE=Debug \ + -DBUILD_SHARED_LIBS=ON \ + -DHDF5_ENABLE_ALL_WARNINGS=ON \ + -DHDF5_ENABLE_PARALLEL:BOOL=OFF \ + -DHDF5_BUILD_CPP_LIB:BOOL=ON \ + -DHDF5_BUILD_FORTRAN=ON \ + -DHDF5_BUILD_JAVA=ON \ + -DHDF5_BUILD_DOC=OFF \ + -DLIBAEC_USE_LOCALCONTENT=OFF \ + -DZLIB_USE_LOCALCONTENT=OFF \ + -DHDF5_ENABLE_MIRROR_VFD:BOOL=ON \ + -DHDF5_ENABLE_DIRECT_VFD:BOOL=ON \ + -DHDF5_ENABLE_ROS3_VFD:BOOL=ON \ + -DH5_NO_DEPRECATED_SYMBOLS:BOOL=OFF \ + -DDEFAULT_API_VERSION:STRING=v114 \ + $GITHUB_WORKSPACE + shell: bash + + # + # BUILD + # + - name: CMake Build + run: cmake --build . --parallel 3 --config Debug + working-directory: ${{ runner.workspace }}/build + + # + # RUN TESTS + # + - name: CMake Run Tests + run: ctest . --parallel 2 -C Debug -V + working-directory: ${{ runner.workspace }}/build + build_zlibng: name: "gcc use zlib-ng filter" runs-on: ubuntu-latest diff --git a/.github/workflows/publish-release.yml b/.github/workflows/publish-release.yml index dd7f4bfbc86..1164ab17c23 100644 --- a/.github/workflows/publish-release.yml +++ b/.github/workflows/publish-release.yml @@ -58,3 +58,7 @@ jobs: run: | aws s3 sync ./${{ inputs.file_name }}.doxygen s3://${{ secrets.AWS_S3_BUCKET }}/${{ vars.TARGET_PATH }}/${{ inputs.target_dir }}/documentation/doxygen --delete + - name: Sync userguide to latest S3 bucket + run: | + aws s3 sync ./${{ inputs.file_name }}.doxygen s3://${{ secrets.AWS_S3_BUCKET }}/documentation/latest --delete + diff --git a/CMakeLists.txt b/CMakeLists.txt index affac20dbc7..91e2bcdfede 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -856,9 +856,9 @@ if (HDF5_ENABLE_SUBFILING_VFD) endif() -#option (DEFAULT_API_VERSION "Enable v1.16 API (v16, v18, v110, v112, v114, v116)" "v116") -set (DEFAULT_API_VERSION "v116" CACHE STRING "Enable v1.16 API (v16, v18, v110, v112, v114, v116)") -set_property (CACHE DEFAULT_API_VERSION PROPERTY STRINGS v16 v18 v110 v112 v114 v116) +#option (DEFAULT_API_VERSION "Enable v1.16 API (v16, v18, v110, v112, v114, v116, v118)" "v116") +set (DEFAULT_API_VERSION "v116" CACHE STRING "Enable v1.16 API (v16, v18, v110, v112, v114, v116, v118)") +set_property (CACHE DEFAULT_API_VERSION PROPERTY STRINGS v16 v18 v110 v112 v114 v116 v118) #----------------------------------------------------------------------------- # Option to use 1.6.x API #----------------------------------------------------------------------------- @@ -902,14 +902,22 @@ endif () #----------------------------------------------------------------------------- # Option to use 1.16.x API #----------------------------------------------------------------------------- -if (NOT DEFAULT_API_VERSION) - set (DEFAULT_API_VERSION "v116") -endif () set (H5_USE_116_API_DEFAULT 0) if (DEFAULT_API_VERSION MATCHES "v116") set (H5_USE_116_API_DEFAULT 1) endif () +#----------------------------------------------------------------------------- +# Option to use 1.18.x API +#----------------------------------------------------------------------------- +if (NOT DEFAULT_API_VERSION) + set (DEFAULT_API_VERSION "v118") +endif () +set (H5_USE_118_API_DEFAULT 0) +if (DEFAULT_API_VERSION MATCHES "v118") + set (H5_USE_118_API_DEFAULT 1) +endif () + #----------------------------------------------------------------------------- # Include user macros #----------------------------------------------------------------------------- diff --git a/HDF5Examples/C/TUTR/testh5cc.sh.in b/HDF5Examples/C/TUTR/testh5cc.sh.in index f95108ddb99..a825604ea48 100644 --- a/HDF5Examples/C/TUTR/testh5cc.sh.in +++ b/HDF5Examples/C/TUTR/testh5cc.sh.in @@ -44,6 +44,7 @@ H5_USE_110_API_DEFAULT=`grep '#define H5_USE_110_API_DEFAULT ' ../src/H5pubconf. H5_USE_112_API_DEFAULT=`grep '#define H5_USE_112_API_DEFAULT ' ../src/H5pubconf.h` H5_USE_114_API_DEFAULT=`grep '#define H5_USE_114_API_DEFAULT ' ../src/H5pubconf.h` H5_USE_116_API_DEFAULT=`grep '#define H5_USE_116_API_DEFAULT ' ../src/H5pubconf.h` +H5_USE_118_API_DEFAULT=`grep '#define H5_USE_118_API_DEFAULT ' ../src/H5pubconf.h` # setup my machine information. myos=`uname -s` @@ -483,6 +484,8 @@ elif [ -n "$H5_USE_114_API_DEFAULT" ]; then echo "H5_USE_114_API_DEFAULT is defined." elif [ -n "$H5_USE_116_API_DEFAULT" ]; then echo "H5_USE_116_API_DEFAULT is defined." +elif [ -n "$H5_USE_118_API_DEFAULT" ]; then + echo "H5_USE_118_API_DEFAULT is defined." else echo "No H5 API_DEFAULT is defined." fi @@ -523,17 +526,32 @@ elif [ -n "$H5_USE_114_API_DEFAULT" ]; then TOOLTEST -DH5_USE_110_API_DEFAULT $v110main TOOLTEST -DH5_USE_112_API_DEFAULT $v112main TOOLTEST $v114main +elif [ -n "$H5_USE_116_API_DEFAULT" ]; then + echo "Testing HDF5 with 118_API_DEFAULT" + TOOLTEST -DH5_USE_16_API_DEFAULT $v16main + TOOLTEST -DH5_USE_18_API_DEFAULT $v18main + TOOLTEST -DH5_USE_110_API_DEFAULT $v110main + TOOLTEST -DH5_USE_112_API_DEFAULT $v112main + TOOLTEST -DH5_USE_114_API_DEFAULT $v114main + TOOLTEST -DH5_USE_116_API_DEFAULT $v114main + TOOLTEST $v18main + TOOLTEST $v110main + TOOLTEST $v112main + TOOLTEST $v114main + TOOLTEST $v116main else - echo "Testing HDF5 with 116_API_DEFAULT" + echo "Testing HDF5 with 118_API_DEFAULT" TOOLTEST -DH5_USE_16_API_DEFAULT $v16main TOOLTEST -DH5_USE_18_API_DEFAULT $v18main TOOLTEST -DH5_USE_110_API_DEFAULT $v110main TOOLTEST -DH5_USE_112_API_DEFAULT $v112main TOOLTEST -DH5_USE_114_API_DEFAULT $v114main + TOOLTEST -DH5_USE_116_API_DEFAULT $v114main TOOLTEST $v18main TOOLTEST $v110main TOOLTEST $v112main TOOLTEST $v114main + TOOLTEST $v116main fi # Group 6: # HDF5 program that depends on input args. diff --git a/c++/src/H5FaccProp.cpp b/c++/src/H5FaccProp.cpp index dc4b949b5b3..12af96db666 100644 --- a/c++/src/H5FaccProp.cpp +++ b/c++/src/H5FaccProp.cpp @@ -713,6 +713,8 @@ FileAccPropList::getFileLocking(hbool_t &use_file_locking, hbool_t &ignore_when_ /// \li \c H5F_LIBVER_110 /// \li \c H5F_LIBVER_112 /// \li \c H5F_LIBVER_114 +/// \li \c H5F_LIBVER_116 +/// \li \c H5F_LIBVER_118 /// \li \c H5F_LIBVER_LATEST /// /// Valid values of \a libver_high are as follows: @@ -720,6 +722,8 @@ FileAccPropList::getFileLocking(hbool_t &use_file_locking, hbool_t &ignore_when_ /// \li \c H5F_LIBVER_110 /// \li \c H5F_LIBVER_112 /// \li \c H5F_LIBVER_114 +/// \li \c H5F_LIBVER_116 +/// \li \c H5F_LIBVER_118 /// \li \c H5F_LIBVER_LATEST (Default) /// /// For more detail, please refer to the H5Pset_libver_bounds API in @@ -751,6 +755,8 @@ FileAccPropList::setLibverBounds(H5F_libver_t libver_low, H5F_libver_t libver_hi /// \li \c H5F_LIBVER_110 /// \li \c H5F_LIBVER_112 /// \li \c H5F_LIBVER_114 +/// \li \c H5F_LIBVER_116 +/// \li \c H5F_LIBVER_118 /// \li \c H5F_LIBVER_LATEST /// /// and \a libver_high: @@ -758,6 +764,8 @@ FileAccPropList::setLibverBounds(H5F_libver_t libver_low, H5F_libver_t libver_hi /// \li \c H5F_LIBVER_110 /// \li \c H5F_LIBVER_112 /// \li \c H5F_LIBVER_114 +/// \li \c H5F_LIBVER_116 +/// \li \c H5F_LIBVER_118 /// \li \c H5F_LIBVER_LATEST //-------------------------------------------------------------------------- void diff --git a/config/cmake/H5pubconf.h.in b/config/cmake/H5pubconf.h.in index c3e92eba66b..9f0d0bc1505 100644 --- a/config/cmake/H5pubconf.h.in +++ b/config/cmake/H5pubconf.h.in @@ -607,6 +607,9 @@ /* Define using v1.16 public API symbols by default */ #cmakedefine H5_USE_116_API_DEFAULT @H5_USE_116_API_DEFAULT@ +/* Define using v1.18 public API symbols by default */ +#cmakedefine H5_USE_118_API_DEFAULT @H5_USE_118_API_DEFAULT@ + /* Define if the library will use file locking */ #cmakedefine H5_USE_FILE_LOCKING @H5_USE_FILE_LOCKING@ diff --git a/config/cmake/HDF5ExampleCache.cmake b/config/cmake/HDF5ExampleCache.cmake index 99232cc06ca..219d1c59902 100644 --- a/config/cmake/HDF5ExampleCache.cmake +++ b/config/cmake/HDF5ExampleCache.cmake @@ -38,6 +38,8 @@ elseif (DEFAULT_API_VERSION MATCHES "v114") set (H5_USE_114_API ON) elseif (DEFAULT_API_VERSION MATCHES "v116") set (H5_USE_116_API ON) +elseif (DEFAULT_API_VERSION MATCHES "v118") + set (H5_USE_118_API ON) endif () message (STATUS "HDF5 H5_LIBVER_DIR: ${H5_LIBVER_DIR} HDF5_API_VERSION: ${DEFAULT_API_VERSION}") diff --git a/configure.ac b/configure.ac index 8d1e3556226..714d647004a 100644 --- a/configure.ac +++ b/configure.ac @@ -4233,10 +4233,10 @@ esac AC_SUBST([DEFAULT_API_VERSION]) AC_MSG_CHECKING([which version of public symbols to use by default]) AC_ARG_WITH([default-api-version], - [AS_HELP_STRING([--with-default-api-version=(default|v16|v18|v110|v112|v114|v116)], + [AS_HELP_STRING([--with-default-api-version=(default|v16|v18|v110|v112|v114|v116|v118)], [Specify default release version of public symbols - [default=v116]])],, - [withval=v116]) + [default=v118]])],, + [withval=v118]) ## Allowing "default" allows the GitHub CI to check that we didn't forget ## to change the defaults when creating a new major version @@ -4270,6 +4270,11 @@ elif test "X$withval" = "Xv116" -o "X$withval" = "Xdefault"; then DEFAULT_API_VERSION=v116 AC_DEFINE([USE_116_API_DEFAULT], [1], [Define using v1.16 public API symbols by default]) +elif test "X$withval" = "Xv118" -o "X$withval" = "Xdefault"; then + AC_MSG_RESULT([v118]) + DEFAULT_API_VERSION=v118 + AC_DEFINE([USE_118_API_DEFAULT], [1], + [Define using v1.18 public API symbols by default]) else AC_MSG_ERROR([invalid version of public symbols given]) fi @@ -4279,7 +4284,7 @@ fi ## if the user insists on doing this via the --enable-unsupported configure ## flag, we'll let them. if test "X${ALLOW_UNSUPPORTED}" != "Xyes"; then - if test "X${DEFAULT_API_VERSION}" != "Xv116" -a "X${DEPRECATED_SYMBOLS}" = "Xno" ; then + if test "X${DEFAULT_API_VERSION}" != "Xv118" -a "X${DEPRECATED_SYMBOLS}" = "Xno" ; then AC_MSG_ERROR([Removing old public API symbols not allowed when using them as default public API symbols. Use --enable-unsupported to override this error.]) fi fi diff --git a/fortran/src/H5_f.c b/fortran/src/H5_f.c index 3b278bbbc54..4dd54b0118f 100644 --- a/fortran/src/H5_f.c +++ b/fortran/src/H5_f.c @@ -540,6 +540,7 @@ h5init_flags_c(int_f *h5d_flags, size_t_f *h5d_size_flags, int_f *h5e_flags, hid h5f_flags[28] = (int_f)H5F_LIBVER_V112; h5f_flags[29] = (int_f)H5F_LIBVER_V114; h5f_flags[30] = (int_f)H5F_LIBVER_V116; + h5f_flags[31] = (int_f)H5F_LIBVER_V118; /* * H5FD flags diff --git a/fortran/src/H5_ff.F90 b/fortran/src/H5_ff.F90 index f4bb211e0d1..ad32bfc7b1f 100644 --- a/fortran/src/H5_ff.F90 +++ b/fortran/src/H5_ff.F90 @@ -380,6 +380,7 @@ END FUNCTION h5init1_flags_c H5F_LIBVER_V112_F = H5F_flags(29) H5F_LIBVER_V114_F = H5F_flags(30) H5F_LIBVER_V116_F = H5F_flags(31) + H5F_LIBVER_V118_F = H5F_flags(32) ! ! H5generic flags ! diff --git a/fortran/src/H5f90global.F90 b/fortran/src/H5f90global.F90 index 6d8697da699..ee2c6ab3aec 100644 --- a/fortran/src/H5f90global.F90 +++ b/fortran/src/H5f90global.F90 @@ -237,6 +237,7 @@ MODULE H5GLOBAL !DEC$ATTRIBUTES DLLEXPORT :: H5F_LIBVER_V112_F !DEC$ATTRIBUTES DLLEXPORT :: H5F_LIBVER_V114_F !DEC$ATTRIBUTES DLLEXPORT :: H5F_LIBVER_V116_F + !DEC$ATTRIBUTES DLLEXPORT :: H5F_LIBVER_V118_F !DEC$ATTRIBUTES DLLEXPORT :: H5F_FSPACE_STRATEGY_FSM_AGGR_F !DEC$ATTRIBUTES DLLEXPORT :: H5F_FSPACE_STRATEGY_PAGE_F !DEC$ATTRIBUTES DLLEXPORT :: H5F_FSPACE_STRATEGY_AGGR_F @@ -271,6 +272,7 @@ MODULE H5GLOBAL INTEGER :: H5F_LIBVER_V112_F !< H5F_LIBVER_V112 INTEGER :: H5F_LIBVER_V114_F !< H5F_LIBVER_V114 INTEGER :: H5F_LIBVER_V116_F !< H5F_LIBVER_V116 + INTEGER :: H5F_LIBVER_V118_F !< H5F_LIBVER_V118 INTEGER :: H5F_FSPACE_STRATEGY_FSM_AGGR_F !< H5F_FSPACE_STRATEGY_FSM_AGGR INTEGER :: H5F_FSPACE_STRATEGY_PAGE_F !< H5F_FSPACE_STRATEGY_PAGE INTEGER :: H5F_FSPACE_STRATEGY_AGGR_F !< H5F_FSPACE_STRATEGY_AGGR diff --git a/fortran/test/tH5P_F03.F90 b/fortran/test/tH5P_F03.F90 index 95b634e6782..f411338ccc8 100644 --- a/fortran/test/tH5P_F03.F90 +++ b/fortran/test/tH5P_F03.F90 @@ -235,6 +235,13 @@ SUBROUTINE test_create(total_error) CALL VERIFY("***ERROR: Returned wrong low libver_bounds", low, H5F_LIBVER_V116_F, total_error) CALL VERIFY("***ERROR: Returned wrong high libver_bounds", high, H5F_LIBVER_V116_F, total_error) + CALL h5pset_libver_bounds_f(fapl, H5F_LIBVER_V118_F, H5F_LIBVER_V118_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_V118_F, total_error) + CALL VERIFY("***ERROR: Returned wrong high libver_bounds", high, H5F_LIBVER_V118_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) diff --git a/java/src/hdf/hdf5lib/HDF5Constants.java b/java/src/hdf/hdf5lib/HDF5Constants.java index 55b6f4be913..0260ce879e9 100644 --- a/java/src/hdf/hdf5lib/HDF5Constants.java +++ b/java/src/hdf/hdf5lib/HDF5Constants.java @@ -575,6 +575,8 @@ public class HDF5Constants { /** */ public static final int H5F_LIBVER_V116 = H5F_LIBVER_V116(); /** */ + public static final int H5F_LIBVER_V118 = H5F_LIBVER_V118(); + /** */ public static final int H5F_LIBVER_NBOUNDS = H5F_LIBVER_NBOUNDS(); /** */ public static final int H5F_LIBVER_LATEST = H5F_LIBVER_LATEST(); @@ -2060,6 +2062,8 @@ public class HDF5Constants { private static native final int H5F_LIBVER_V116(); + private static native final int H5F_LIBVER_V118(); + private static native final int H5F_LIBVER_NBOUNDS(); private static native final int H5F_LIBVER_LATEST(); diff --git a/java/src/jni/h5Constants.c b/java/src/jni/h5Constants.c index aeec71fb9f4..41cd6344033 100644 --- a/java/src/jni/h5Constants.c +++ b/java/src/jni/h5Constants.c @@ -1309,6 +1309,11 @@ Java_hdf_hdf5lib_HDF5Constants_H5F_1LIBVER_1V116(JNIEnv *env, jclass cls) return H5F_LIBVER_V116; } JNIEXPORT jint JNICALL +Java_hdf_hdf5lib_HDF5Constants_H5F_1LIBVER_1V118(JNIEnv *env, jclass cls) +{ + return H5F_LIBVER_V118; +} +JNIEXPORT jint JNICALL Java_hdf_hdf5lib_HDF5Constants_H5F_1LIBVER_1NBOUNDS(JNIEnv *env, jclass cls) { return H5F_LIBVER_NBOUNDS; diff --git a/release_docs/INSTALL_CMake.txt b/release_docs/INSTALL_CMake.txt index b2bd84c20f3..1dcbbfe09fb 100644 --- a/release_docs/INSTALL_CMake.txt +++ b/release_docs/INSTALL_CMake.txt @@ -888,7 +888,7 @@ HDF5_STRICT_FORMAT_CHECKS "Whether to perform strict file format checks" 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 -DEFAULT_API_VERSION "Enable default API (v16, v18, v110, v112, v114, v116)" "v116" +DEFAULT_API_VERSION "Enable default API (v16, v18, v110, v112, v114, v116, v118)" "v118" HDF5_USE_FOLDERS "Enable folder grouping of projects in IDEs." ON HDF5_MSVC_NAMING_CONVENTION "Use MSVC Naming conventions for Shared Libraries" OFF HDF5_MINGW_STATIC_GCC_LIBS "Statically link libgcc/libstdc++" OFF diff --git a/src/H5Aint.c b/src/H5Aint.c index a459402f589..1f1f12437b7 100644 --- a/src/H5Aint.c +++ b/src/H5Aint.c @@ -96,6 +96,7 @@ const unsigned H5O_attr_ver_bounds[] = { H5O_ATTR_VERSION_3, /* H5F_LIBVER_V112 */ H5O_ATTR_VERSION_3, /* H5F_LIBVER_V114 */ H5O_ATTR_VERSION_3, /* H5F_LIBVER_V116 */ + H5O_ATTR_VERSION_3, /* H5F_LIBVER_V118 */ H5O_ATTR_VERSION_LATEST /* H5F_LIBVER_LATEST */ }; diff --git a/src/H5Dlayout.c b/src/H5Dlayout.c index bd3765e2236..ae2b9aa4a74 100644 --- a/src/H5Dlayout.c +++ b/src/H5Dlayout.c @@ -49,6 +49,7 @@ const unsigned H5O_layout_ver_bounds[] = { H5O_LAYOUT_VERSION_4, /* H5F_LIBVER_V112 */ H5O_LAYOUT_VERSION_4, /* H5F_LIBVER_V114 */ H5O_LAYOUT_VERSION_4, /* H5F_LIBVER_V116 */ + H5O_LAYOUT_VERSION_4, /* H5F_LIBVER_V118 */ H5O_LAYOUT_VERSION_LATEST /* H5F_LIBVER_LATEST */ }; diff --git a/src/H5Fpublic.h b/src/H5Fpublic.h index 1e5a84cdb09..9eaecb59b38 100644 --- a/src/H5Fpublic.h +++ b/src/H5Fpublic.h @@ -189,10 +189,11 @@ typedef enum H5F_libver_t { H5F_LIBVER_V112 = 3, /**< Use the latest v112 format for storing objects */ H5F_LIBVER_V114 = 4, /**< Use the latest v114 format for storing objects */ H5F_LIBVER_V116 = 5, /**< Use the latest v116 format for storing objects */ + H5F_LIBVER_V118 = 6, /**< Use the latest v116 format for storing objects */ H5F_LIBVER_NBOUNDS /**< Sentinel */ } H5F_libver_t; -#define H5F_LIBVER_LATEST H5F_LIBVER_V116 +#define H5F_LIBVER_LATEST H5F_LIBVER_V118 /** * File space handling strategy diff --git a/src/H5Fsuper.c b/src/H5Fsuper.c index 6c4e7d57ef2..39c92f34b17 100644 --- a/src/H5Fsuper.c +++ b/src/H5Fsuper.c @@ -72,6 +72,7 @@ static const unsigned HDF5_superblock_ver_bounds[] = { HDF5_SUPERBLOCK_VERSION_3, /* H5F_LIBVER_V112 */ HDF5_SUPERBLOCK_VERSION_3, /* H5F_LIBVER_V114 */ HDF5_SUPERBLOCK_VERSION_3, /* H5F_LIBVER_V116 */ + HDF5_SUPERBLOCK_VERSION_3, /* H5F_LIBVER_V118 */ HDF5_SUPERBLOCK_VERSION_LATEST /* H5F_LIBVER_LATEST */ }; diff --git a/src/H5Ofill.c b/src/H5Ofill.c index 1b56be12580..2b1faac30ca 100644 --- a/src/H5Ofill.c +++ b/src/H5Ofill.c @@ -154,6 +154,7 @@ const unsigned H5O_fill_ver_bounds[] = { H5O_FILL_VERSION_3, /* H5F_LIBVER_V112 */ H5O_FILL_VERSION_3, /* H5F_LIBVER_V114 */ H5O_FILL_VERSION_3, /* H5F_LIBVER_V116 */ + H5O_FILL_VERSION_3, /* H5F_LIBVER_V118 */ H5O_FILL_VERSION_LATEST /* H5F_LIBVER_LATEST */ }; diff --git a/src/H5Ofsinfo.c b/src/H5Ofsinfo.c index 6e559792530..674e3ff05ff 100644 --- a/src/H5Ofsinfo.c +++ b/src/H5Ofsinfo.c @@ -70,6 +70,7 @@ static const unsigned H5O_fsinfo_ver_bounds[] = { H5O_FSINFO_VERSION_1, /* H5F_LIBVER_V112 */ H5O_FSINFO_VERSION_1, /* H5F_LIBVER_V114 */ H5O_FSINFO_VERSION_1, /* H5F_LIBVER_V116 */ + H5O_FSINFO_VERSION_1, /* H5F_LIBVER_V118 */ H5O_FSINFO_VERSION_LATEST /* H5F_LIBVER_LATEST */ }; #define N_FSINFO_VERSION_BOUNDS H5F_LIBVER_NBOUNDS diff --git a/src/H5Oint.c b/src/H5Oint.c index 6a35a656085..4256f9cc79f 100644 --- a/src/H5Oint.c +++ b/src/H5Oint.c @@ -128,6 +128,7 @@ const unsigned H5O_obj_ver_bounds[] = { H5O_VERSION_2, /* H5F_LIBVER_V112 */ H5O_VERSION_2, /* H5F_LIBVER_V114 */ H5O_VERSION_2, /* H5F_LIBVER_V116 */ + H5O_VERSION_2, /* H5F_LIBVER_V118 */ H5O_VERSION_LATEST /* H5F_LIBVER_LATEST */ }; diff --git a/src/H5Opline.c b/src/H5Opline.c index 19af5442cb7..3e5eb4d7318 100644 --- a/src/H5Opline.c +++ b/src/H5Opline.c @@ -89,6 +89,7 @@ const unsigned H5O_pline_ver_bounds[] = { H5O_PLINE_VERSION_2, /* H5F_LIBVER_V112 */ H5O_PLINE_VERSION_2, /* H5F_LIBVER_V114 */ H5O_PLINE_VERSION_2, /* H5F_LIBVER_V116 */ + H5O_PLINE_VERSION_2, /* H5F_LIBVER_V118 */ H5O_PLINE_VERSION_LATEST /* H5F_LIBVER_LATEST */ }; diff --git a/src/H5Ppublic.h b/src/H5Ppublic.h index a718c3d3621..273250017a3 100644 --- a/src/H5Ppublic.h +++ b/src/H5Ppublic.h @@ -5061,6 +5061,36 @@ H5_DLL herr_t H5Pset_gc_references(hid_t fapl_id, unsigned gc_ref); * objects created with this setting. * * + * \p low=#H5F_LIBVER_V116
+ * \p high= + * + * \li The library will create objects with the latest format + * versions available to library release 1.16.x. + * \li The library will allow objects to be created with the latest + * format versions available to library release specified + * in the \p high value. + * \li API calls that create objects or features that are available + * to versions of the library greater than version specified in + * \p high will fail. + * \li Earlier versions of the library may not be able to access + * objects created with this setting. + * + * + * \p low=#H5F_LIBVER_V118
+ * \p high= + * + * \li The library will create objects with the latest format + * versions available to library release 1.18.x. + * \li The library will allow objects to be created with the latest + * format versions available to library release specified + * in the \p high value. + * \li API calls that create objects or features that are available + * to versions of the library greater than version specified in + * \p high will fail. + * \li Earlier versions of the library may not be able to access + * objects created with this setting. + * + * * \p low=high * * \li The library will create objects with the latest format diff --git a/src/H5S.c b/src/H5S.c index d6611654729..373115661b6 100644 --- a/src/H5S.c +++ b/src/H5S.c @@ -62,6 +62,7 @@ const unsigned H5O_sdspace_ver_bounds[] = { H5O_SDSPACE_VERSION_2, /* H5F_LIBVER_V112 */ H5O_SDSPACE_VERSION_2, /* H5F_LIBVER_V114 */ H5O_SDSPACE_VERSION_2, /* H5F_LIBVER_V116 */ + H5O_SDSPACE_VERSION_2, /* H5F_LIBVER_V118 */ H5O_SDSPACE_VERSION_LATEST /* H5F_LIBVER_LATEST */ }; diff --git a/src/H5Shyper.c b/src/H5Shyper.c index bc5d6c3db96..ce161b01046 100644 --- a/src/H5Shyper.c +++ b/src/H5Shyper.c @@ -242,6 +242,7 @@ static const unsigned H5O_sds_hyper_ver_bounds[] = { H5S_HYPER_VERSION_3, /* H5F_LIBVER_V112 */ H5S_HYPER_VERSION_3, /* H5F_LIBVER_V114 */ H5S_HYPER_VERSION_3, /* H5F_LIBVER_V116 */ + H5S_HYPER_VERSION_3, /* H5F_LIBVER_V118 */ H5S_HYPER_VERSION_3 /* H5F_LIBVER_LATEST */ }; diff --git a/src/H5Spoint.c b/src/H5Spoint.c index e102969657b..6853dc3932a 100644 --- a/src/H5Spoint.c +++ b/src/H5Spoint.c @@ -127,6 +127,7 @@ static const unsigned H5O_sds_point_ver_bounds[] = { H5S_POINT_VERSION_2, /* H5F_LIBVER_V112 */ H5S_POINT_VERSION_2, /* H5F_LIBVER_V114 */ H5S_POINT_VERSION_2, /* H5F_LIBVER_V116 */ + H5S_POINT_VERSION_2, /* H5F_LIBVER_V118 */ H5S_POINT_VERSION_2 /* H5F_LIBVER_LATEST */ }; diff --git a/src/H5T.c b/src/H5T.c index dcf0a679fed..754f3762155 100644 --- a/src/H5T.c +++ b/src/H5T.c @@ -610,6 +610,7 @@ const unsigned H5O_dtype_ver_bounds[] = { H5O_DTYPE_VERSION_4, /* H5F_LIBVER_V112 */ H5O_DTYPE_VERSION_4, /* H5F_LIBVER_V114 */ H5O_DTYPE_VERSION_4, /* H5F_LIBVER_V116 */ + H5O_DTYPE_VERSION_4, /* H5F_LIBVER_V118 */ H5O_DTYPE_VERSION_LATEST /* H5F_LIBVER_LATEST */ }; diff --git a/src/H5trace.c b/src/H5trace.c index d21d82b6664..9b27e072980 100644 --- a/src/H5trace.c +++ b/src/H5trace.c @@ -1453,7 +1453,11 @@ H5_trace_args(H5RS_str_t *rs, const char *type, va_list ap) break; case H5F_LIBVER_V116: - HDcompile_assert(H5F_LIBVER_LATEST == H5F_LIBVER_V116); + H5RS_acat(rs, "H5F_LIBVER_V116"); + break; + + case H5F_LIBVER_V118: + HDcompile_assert(H5F_LIBVER_LATEST == H5F_LIBVER_V118); H5RS_acat(rs, "H5F_LIBVER_LATEST"); break; diff --git a/test/h5test.c b/test/h5test.c index b9d228bc4f7..828d83f40f4 100644 --- a/test/h5test.c +++ b/test/h5test.c @@ -107,6 +107,7 @@ const char *LIBVER_NAMES[] = {"earliest", /* H5F_LIBVER_EARLIEST = 0 */ "v112", /* H5F_LIBVER_V112 = 3 */ "v114", /* H5F_LIBVER_V114 = 4 */ "v116", /* H5F_LIBVER_V116 = 5 */ + "v118", /* H5F_LIBVER_V118 = 6 */ "latest", /* H5F_LIBVER_LATEST */ NULL}; diff --git a/test/tfile.c b/test/tfile.c index f12dc6a079c..0915ef78ba3 100644 --- a/test/tfile.c +++ b/test/tfile.c @@ -6203,6 +6203,7 @@ test_libver_bounds_super_create(hid_t fapl, hid_t fcpl, htri_t is_swmr, htri_t n case H5F_LIBVER_V112: case H5F_LIBVER_V114: case H5F_LIBVER_V116: + case H5F_LIBVER_V118: ok = (f->shared->sblock->super_vers == HDF5_SUPERBLOCK_VERSION_3); VERIFY(ok, true, "HDF5_superblock_ver_bounds"); break; diff --git a/tools/src/h5repack/h5repack.h b/tools/src/h5repack/h5repack.h index 2977ffab6db..db515456a28 100644 --- a/tools/src/h5repack/h5repack.h +++ b/tools/src/h5repack/h5repack.h @@ -119,7 +119,8 @@ * \li 3 This is #H5F_LIBVER_V112 in #H5F_libver_t struct * \li 4 This is #H5F_LIBVER_V114 in #H5F_libver_t struct * \li 5 This is #H5F_LIBVER_V116 in #H5F_libver_t struct - * \li #H5F_LIBVER_LATEST is aliased to #H5F_LIBVER_V116 for this release + * \li 5 This is #H5F_LIBVER_V118 in #H5F_libver_t struct + * \li #H5F_LIBVER_LATEST is aliased to #H5F_LIBVER_V118 for this release * * \subsubsection subsubsec_cltools_h5repack_options_fs File Strategy Settings * FS_STRATEGY is a string indicating the file space strategy used: diff --git a/tools/src/h5repack/h5repack_main.c b/tools/src/h5repack/h5repack_main.c index 9fb85f13cdd..baf60535dc9 100644 --- a/tools/src/h5repack/h5repack_main.c +++ b/tools/src/h5repack/h5repack_main.c @@ -229,8 +229,9 @@ usage(const char *prog) PRINTVALSTREAM(rawoutstream, " 3: This is H5F_LIBVER_V112 in H5F_libver_t struct\n"); PRINTVALSTREAM(rawoutstream, " 4: This is H5F_LIBVER_V114 in H5F_libver_t struct\n"); PRINTVALSTREAM(rawoutstream, " 5: This is H5F_LIBVER_V116 in H5F_libver_t struct\n"); + PRINTVALSTREAM(rawoutstream, " 6: This is H5F_LIBVER_V118 in H5F_libver_t struct\n"); PRINTVALSTREAM(rawoutstream, - " (H5F_LIBVER_LATEST is aliased to H5F_LIBVER_V116 for this release\n"); + " (H5F_LIBVER_LATEST is aliased to H5F_LIBVER_V118 for this release\n"); PRINTVALSTREAM(rawoutstream, "\n"); PRINTVALSTREAM(rawoutstream, " FS_STRATEGY is a string indicating the file space strategy used:\n"); PRINTVALSTREAM(rawoutstream, " FSM_AGGR:\n"); diff --git a/tools/test/h5repack/expected/h5repack-help.txt b/tools/test/h5repack/expected/h5repack-help.txt index 50242ef4853..718215260eb 100644 --- a/tools/test/h5repack/expected/h5repack-help.txt +++ b/tools/test/h5repack/expected/h5repack-help.txt @@ -93,7 +93,8 @@ usage: h5repack [OPTIONS] file1 file2 3: This is H5F_LIBVER_V112 in H5F_libver_t struct 4: This is H5F_LIBVER_V114 in H5F_libver_t struct 5: This is H5F_LIBVER_V116 in H5F_libver_t struct - (H5F_LIBVER_LATEST is aliased to H5F_LIBVER_V116 for this release + 6: This is H5F_LIBVER_V118 in H5F_libver_t struct + (H5F_LIBVER_LATEST is aliased to H5F_LIBVER_V118 for this release FS_STRATEGY is a string indicating the file space strategy used: FSM_AGGR: From 4acc7073596b2d8563d99856118f23ba0350084d Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Wed, 2 Oct 2024 16:26:12 -0500 Subject: [PATCH 03/15] Correct publish path --- .github/workflows/publish-release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/publish-release.yml b/.github/workflows/publish-release.yml index 1164ab17c23..19e01999487 100644 --- a/.github/workflows/publish-release.yml +++ b/.github/workflows/publish-release.yml @@ -60,5 +60,5 @@ jobs: - name: Sync userguide to latest S3 bucket run: | - aws s3 sync ./${{ inputs.file_name }}.doxygen s3://${{ secrets.AWS_S3_BUCKET }}/documentation/latest --delete + aws s3 sync ./${{ inputs.file_name }}.doxygen s3://${{ secrets.AWS_S3_BUCKET }}/documentation/hdf5/latest --delete From f4105bec7c82de2448f84c0cefbc98b4906cb7d4 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Wed, 2 Oct 2024 16:45:26 -0500 Subject: [PATCH 04/15] Fix typo --- src/H5Fpublic.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/H5Fpublic.h b/src/H5Fpublic.h index 9eaecb59b38..53dfaa78c31 100644 --- a/src/H5Fpublic.h +++ b/src/H5Fpublic.h @@ -189,7 +189,7 @@ typedef enum H5F_libver_t { H5F_LIBVER_V112 = 3, /**< Use the latest v112 format for storing objects */ H5F_LIBVER_V114 = 4, /**< Use the latest v114 format for storing objects */ H5F_LIBVER_V116 = 5, /**< Use the latest v116 format for storing objects */ - H5F_LIBVER_V118 = 6, /**< Use the latest v116 format for storing objects */ + H5F_LIBVER_V118 = 6, /**< Use the latest v118 format for storing objects */ H5F_LIBVER_NBOUNDS /**< Sentinel */ } H5F_libver_t; From 22650f7cbda86611db786e8c345e5a785ba29935 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Wed, 2 Oct 2024 16:49:44 -0500 Subject: [PATCH 05/15] add missing filename --- test/chunk_info.c | 1 + 1 file changed, 1 insertion(+) diff --git a/test/chunk_info.c b/test/chunk_info.c index fc3168e1b8f..d033f62ecf8 100644 --- a/test/chunk_info.c +++ b/test/chunk_info.c @@ -50,6 +50,7 @@ static const char *FILENAME[] = {"tchunk_info_earliest", "tchunk_info_v112", "tchunk_info_v114", "tchunk_info_v116", + "tchunk_info_v118", NULL}; /* File to be used in test_failed_attempts */ From 861e5ab6005641d3df8fcc874224e1e20d956b01 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Wed, 2 Oct 2024 17:09:27 -0500 Subject: [PATCH 06/15] Correct default version --- CMakeLists.txt | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 91e2bcdfede..2dc3af4a8ef 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -856,8 +856,7 @@ if (HDF5_ENABLE_SUBFILING_VFD) endif() -#option (DEFAULT_API_VERSION "Enable v1.16 API (v16, v18, v110, v112, v114, v116, v118)" "v116") -set (DEFAULT_API_VERSION "v116" CACHE STRING "Enable v1.16 API (v16, v18, v110, v112, v114, v116, v118)") +set (DEFAULT_API_VERSION "v118" CACHE STRING "Enable v1.16 API (v16, v18, v110, v112, v114, v116, v118)") set_property (CACHE DEFAULT_API_VERSION PROPERTY STRINGS v16 v18 v110 v112 v114 v116 v118) #----------------------------------------------------------------------------- # Option to use 1.6.x API From d2faa1bf50195b2c769f9b1ed9df755cfe52e9b0 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Wed, 2 Oct 2024 17:12:47 -0500 Subject: [PATCH 07/15] Correct size of array --- fortran/src/H5_ff.F90 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fortran/src/H5_ff.F90 b/fortran/src/H5_ff.F90 index ad32bfc7b1f..d8c18374045 100644 --- a/fortran/src/H5_ff.F90 +++ b/fortran/src/H5_ff.F90 @@ -56,7 +56,7 @@ MODULE H5LIB ! ! H5F flags declaration ! - INTEGER, PARAMETER :: H5F_FLAGS_LEN = 31 + INTEGER, PARAMETER :: H5F_FLAGS_LEN = 32 INTEGER, DIMENSION(1:H5F_FLAGS_LEN) :: H5F_flags ! ! H5generic flags declaration From a429e46b9d6e5e6f785dfe5dccb450e1adae70fb Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Wed, 2 Oct 2024 17:13:51 -0500 Subject: [PATCH 08/15] Correct comment in h5repack help --- tools/src/h5repack/h5repack.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/src/h5repack/h5repack.h b/tools/src/h5repack/h5repack.h index db515456a28..cdfeb86b5d4 100644 --- a/tools/src/h5repack/h5repack.h +++ b/tools/src/h5repack/h5repack.h @@ -119,7 +119,7 @@ * \li 3 This is #H5F_LIBVER_V112 in #H5F_libver_t struct * \li 4 This is #H5F_LIBVER_V114 in #H5F_libver_t struct * \li 5 This is #H5F_LIBVER_V116 in #H5F_libver_t struct - * \li 5 This is #H5F_LIBVER_V118 in #H5F_libver_t struct + * \li 6 This is #H5F_LIBVER_V118 in #H5F_libver_t struct * \li #H5F_LIBVER_LATEST is aliased to #H5F_LIBVER_V118 for this release * * \subsubsection subsubsec_cltools_h5repack_options_fs File Strategy Settings From 6ede7e5fb2c49b9ae24a72c6dc32919163d85a2a Mon Sep 17 00:00:00 2001 From: github-actions <41898282+github-actions[bot]@users.noreply.github.com> Date: Wed, 2 Oct 2024 22:19:37 +0000 Subject: [PATCH 09/15] Committing clang-format changes --- test/chunk_info.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/test/chunk_info.c b/test/chunk_info.c index d033f62ecf8..991d4640cad 100644 --- a/test/chunk_info.c +++ b/test/chunk_info.c @@ -44,14 +44,9 @@ #endif /* Test file names, using H5F_libver_t as indices */ -static const char *FILENAME[] = {"tchunk_info_earliest", - "tchunk_info_v18", - "tchunk_info_v110", - "tchunk_info_v112", - "tchunk_info_v114", - "tchunk_info_v116", - "tchunk_info_v118", - NULL}; +static const char *FILENAME[] = { + "tchunk_info_earliest", "tchunk_info_v18", "tchunk_info_v110", "tchunk_info_v112", + "tchunk_info_v114", "tchunk_info_v116", "tchunk_info_v118", NULL}; /* File to be used in test_failed_attempts */ #define FILTERMASK_FILE "tflt_msk" From f19af2f2f6f58bf669f25aada2e0f6cf46697a61 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Wed, 2 Oct 2024 17:24:14 -0500 Subject: [PATCH 10/15] And missing API versions --- .github/workflows/main-cmake-spc.yml | 122 ++++++++++++++++++++++++++- 1 file changed, 121 insertions(+), 1 deletion(-) diff --git a/.github/workflows/main-cmake-spc.yml b/.github/workflows/main-cmake-spc.yml index 1ab59563cc8..b83c80beb9f 100644 --- a/.github/workflows/main-cmake-spc.yml +++ b/.github/workflows/main-cmake-spc.yml @@ -77,6 +77,66 @@ jobs: # # - name: CMake Run Tests # run: ctest . --parallel 2 -C Debug -V +# working-directory: ${{ runner.workspace }}/build + + build_v1_8: + name: "gcc DBG v1.8 default API" + runs-on: ubuntu-latest + steps: + # SETUP + - name: Install Linux Dependencies + run: | + sudo apt-get update + sudo apt-get install ninja-build doxygen graphviz + sudo apt install libssl3 libssl-dev libcurl4 libcurl4-openssl-dev + sudo apt install gcc-12 g++-12 gfortran-12 + echo "CC=gcc-12" >> $GITHUB_ENV + echo "CXX=g++-12" >> $GITHUB_ENV + echo "FC=gfortran-12" >> $GITHUB_ENV + + # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it + - name: Get Sources + uses: actions/checkout@v4.1.7 + + # + # CMAKE CONFIGURE + # + - name: CMake Configure + run: | + mkdir "${{ runner.workspace }}/build" + cd "${{ runner.workspace }}/build" + cmake -C $GITHUB_WORKSPACE/config/cmake/cacheinit.cmake \ + -G Ninja \ + -DCMAKE_BUILD_TYPE=Debug \ + -DBUILD_SHARED_LIBS=ON \ + -DHDF5_ENABLE_ALL_WARNINGS=ON \ + -DHDF5_ENABLE_PARALLEL:BOOL=OFF \ + -DHDF5_BUILD_CPP_LIB:BOOL=ON \ + -DHDF5_BUILD_FORTRAN=ON \ + -DHDF5_BUILD_JAVA=ON \ + -DHDF5_BUILD_DOC=OFF \ + -DLIBAEC_USE_LOCALCONTENT=OFF \ + -DZLIB_USE_LOCALCONTENT=OFF \ + -DHDF5_ENABLE_MIRROR_VFD:BOOL=ON \ + -DHDF5_ENABLE_DIRECT_VFD:BOOL=ON \ + -DHDF5_ENABLE_ROS3_VFD:BOOL=ON \ + -DH5_NO_DEPRECATED_SYMBOLS:BOOL=OFF \ + -DDEFAULT_API_VERSION:STRING=v18 \ + $GITHUB_WORKSPACE + shell: bash + + # + # BUILD + # + - name: CMake Build + run: cmake --build . --parallel 3 --config Debug + working-directory: ${{ runner.workspace }}/build + + # + # RUN TESTS - disable until some tests are fixed + # +# - name: CMake Run Tests +# run: ctest . --parallel 2 -C Debug -V # working-directory: ${{ runner.workspace }}/build build_v1_10: @@ -200,7 +260,7 @@ jobs: working-directory: ${{ runner.workspace }}/build build_v1_14: - name: "gcc DBG v1.12 default API" + name: "gcc DBG v1.14 default API" runs-on: ubuntu-latest steps: # SETUP @@ -259,6 +319,66 @@ jobs: run: ctest . --parallel 2 -C Debug -V working-directory: ${{ runner.workspace }}/build + build_v1_16: + name: "gcc DBG v1.16 default API" + runs-on: ubuntu-latest + steps: + # SETUP + - name: Install Linux Dependencies + run: | + sudo apt-get update + sudo apt-get install ninja-build doxygen graphviz + sudo apt install libssl3 libssl-dev libcurl4 libcurl4-openssl-dev + sudo apt install gcc-12 g++-12 gfortran-12 + echo "CC=gcc-12" >> $GITHUB_ENV + echo "CXX=g++-12" >> $GITHUB_ENV + echo "FC=gfortran-12" >> $GITHUB_ENV + + # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it + - name: Get Sources + uses: actions/checkout@v4.1.7 + + # + # CMAKE CONFIGURE + # + - name: CMake Configure + run: | + mkdir "${{ runner.workspace }}/build" + cd "${{ runner.workspace }}/build" + cmake -C $GITHUB_WORKSPACE/config/cmake/cacheinit.cmake \ + -G Ninja \ + -DCMAKE_BUILD_TYPE=Debug \ + -DBUILD_SHARED_LIBS=ON \ + -DHDF5_ENABLE_ALL_WARNINGS=ON \ + -DHDF5_ENABLE_PARALLEL:BOOL=OFF \ + -DHDF5_BUILD_CPP_LIB:BOOL=ON \ + -DHDF5_BUILD_FORTRAN=ON \ + -DHDF5_BUILD_JAVA=ON \ + -DHDF5_BUILD_DOC=OFF \ + -DLIBAEC_USE_LOCALCONTENT=OFF \ + -DZLIB_USE_LOCALCONTENT=OFF \ + -DHDF5_ENABLE_MIRROR_VFD:BOOL=ON \ + -DHDF5_ENABLE_DIRECT_VFD:BOOL=ON \ + -DHDF5_ENABLE_ROS3_VFD:BOOL=ON \ + -DH5_NO_DEPRECATED_SYMBOLS:BOOL=OFF \ + -DDEFAULT_API_VERSION:STRING=v116 \ + $GITHUB_WORKSPACE + shell: bash + + # + # BUILD + # + - name: CMake Build + run: cmake --build . --parallel 3 --config Debug + working-directory: ${{ runner.workspace }}/build + + # + # RUN TESTS + # + - name: CMake Run Tests + run: ctest . --parallel 2 -C Debug -V + working-directory: ${{ runner.workspace }}/build + build_zlibng: name: "gcc use zlib-ng filter" runs-on: ubuntu-latest From b5aecf32e23ca4bba04db40f45da5a8be005897c Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Wed, 2 Oct 2024 17:28:03 -0500 Subject: [PATCH 11/15] Correct test script --- HDF5Examples/C/TUTR/testh5cc.sh.in | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/HDF5Examples/C/TUTR/testh5cc.sh.in b/HDF5Examples/C/TUTR/testh5cc.sh.in index a825604ea48..4b888c1d2a0 100644 --- a/HDF5Examples/C/TUTR/testh5cc.sh.in +++ b/HDF5Examples/C/TUTR/testh5cc.sh.in @@ -527,17 +527,12 @@ elif [ -n "$H5_USE_114_API_DEFAULT" ]; then TOOLTEST -DH5_USE_112_API_DEFAULT $v112main TOOLTEST $v114main elif [ -n "$H5_USE_116_API_DEFAULT" ]; then - echo "Testing HDF5 with 118_API_DEFAULT" + echo "Testing HDF5 with 116_API_DEFAULT" TOOLTEST -DH5_USE_16_API_DEFAULT $v16main TOOLTEST -DH5_USE_18_API_DEFAULT $v18main TOOLTEST -DH5_USE_110_API_DEFAULT $v110main TOOLTEST -DH5_USE_112_API_DEFAULT $v112main TOOLTEST -DH5_USE_114_API_DEFAULT $v114main - TOOLTEST -DH5_USE_116_API_DEFAULT $v114main - TOOLTEST $v18main - TOOLTEST $v110main - TOOLTEST $v112main - TOOLTEST $v114main TOOLTEST $v116main else echo "Testing HDF5 with 118_API_DEFAULT" @@ -546,7 +541,7 @@ else TOOLTEST -DH5_USE_110_API_DEFAULT $v110main TOOLTEST -DH5_USE_112_API_DEFAULT $v112main TOOLTEST -DH5_USE_114_API_DEFAULT $v114main - TOOLTEST -DH5_USE_116_API_DEFAULT $v114main + TOOLTEST -DH5_USE_116_API_DEFAULT $v116main TOOLTEST $v18main TOOLTEST $v110main TOOLTEST $v112main From 45bba552f19c43d233e8116aacc36e65d0a355c3 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Wed, 2 Oct 2024 17:35:06 -0500 Subject: [PATCH 12/15] Correct configure.ac option --- configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 714d647004a..af6c974a2a0 100644 --- a/configure.ac +++ b/configure.ac @@ -4265,7 +4265,7 @@ elif test "X$withval" = "Xv114"; then DEFAULT_API_VERSION=v114 AC_DEFINE([USE_114_API_DEFAULT], [1], [Define using v1.14 public API symbols by default]) -elif test "X$withval" = "Xv116" -o "X$withval" = "Xdefault"; then +elif test "X$withval" = "Xv116"; then AC_MSG_RESULT([v116]) DEFAULT_API_VERSION=v116 AC_DEFINE([USE_116_API_DEFAULT], [1], From 7343d1990b693ca63e179a46a3a50f508fda728e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 2 Oct 2024 21:45:50 -0500 Subject: [PATCH 13/15] Bump github/codeql-action in the github-actions group (#4910) Updates `github/codeql-action` from 3.26.6 to 3.26.10 --- .github/workflows/scorecard.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/scorecard.yml b/.github/workflows/scorecard.yml index d59f8c9bc6b..d3f9fa0f986 100644 --- a/.github/workflows/scorecard.yml +++ b/.github/workflows/scorecard.yml @@ -67,6 +67,6 @@ jobs: # Upload the results to GitHub's code scanning dashboard. - name: "Upload to code-scanning" - uses: github/codeql-action/upload-sarif@4dd16135b69a43b6c8efb853346f8437d92d3c93 # v3.26.6 + uses: github/codeql-action/upload-sarif@e2b3eafc8d227b0241d48be5f425d47c2d750a13 # v3.26.10 with: sarif_file: results.sarif From e8f6bb6272cd93bf7699716ae8975b394e0e25d9 Mon Sep 17 00:00:00 2001 From: Scot Breitenfeld Date: Wed, 2 Oct 2024 21:46:35 -0500 Subject: [PATCH 14/15] add Fortran H5DO reference to RM table (#4909) --- doxygen/dox/ReferenceManual.dox | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doxygen/dox/ReferenceManual.dox b/doxygen/dox/ReferenceManual.dox index fa1b9f931fe..d7b5bf6f613 100644 --- a/doxygen/dox/ReferenceManual.dox +++ b/doxygen/dox/ReferenceManual.dox @@ -103,7 +103,7 @@ The functions provided by the HDF5 API are grouped into the following -HDF5 Optimizations APIs (H5DO)@ref H5DO "C""C++""Fortran""Java"Bypassing default HDF5 behavior in order to optimize for specific use cases. +HDF5 Optimizations APIs (H5DO)@ref H5DO "C""C++"@ref FH5DO "Fortran""Java"Bypassing default HDF5 behavior in order to optimize for specific use cases. From 626f6398504208973dbd7ba6aaa24af07543071b Mon Sep 17 00:00:00 2001 From: Quincey Koziol Date: Wed, 2 Oct 2024 21:55:37 -0500 Subject: [PATCH 15/15] Remove H5E_clear_stack() from H5SM code (#4861) Introduces 'try' flag for H5B2_modify() call --- src/H5Adense.c | 6 +++--- src/H5B2.c | 21 +++++++++++++-------- src/H5B2private.h | 2 +- src/H5SM.c | 43 +++++++++++++++++++++++++------------------ src/H5SMpkg.h | 18 ------------------ test/btree2.c | 14 +++++++------- 6 files changed, 49 insertions(+), 55 deletions(-) diff --git a/src/H5Adense.c b/src/H5Adense.c index 52a6244d7be..143fa9b3646 100644 --- a/src/H5Adense.c +++ b/src/H5Adense.c @@ -633,8 +633,8 @@ H5A__dense_write_bt2_cb(void *_record, void *_op_data, bool *changed) udata.found_op_data = NULL; /* Modify record for creation order index */ - if (H5B2_modify(bt2_corder, &udata, H5A__dense_write_bt2_cb2, &op_data->attr->sh_loc.u.heap_id) < - 0) + if (H5B2_modify(bt2_corder, &udata, false, H5A__dense_write_bt2_cb2, + &op_data->attr->sh_loc.u.heap_id) < 0) HGOTO_ERROR(H5E_ATTR, H5E_CANTINSERT, FAIL, "unable to modify record in v2 B-tree"); } /* end if */ @@ -763,7 +763,7 @@ H5A__dense_write(H5F_t *f, const H5O_ainfo_t *ainfo, H5A_t *attr) op_data.corder_bt2_addr = ainfo->corder_bt2_addr; /* Modify attribute through 'name' tracking v2 B-tree */ - if (H5B2_modify(bt2_name, &udata, H5A__dense_write_bt2_cb, &op_data) < 0) + if (H5B2_modify(bt2_name, &udata, false, H5A__dense_write_bt2_cb, &op_data) < 0) HGOTO_ERROR(H5E_ATTR, H5E_CANTINSERT, FAIL, "unable to modify record in v2 B-tree"); done: diff --git a/src/H5B2.c b/src/H5B2.c index f49689911dc..d3eceff756e 100644 --- a/src/H5B2.c +++ b/src/H5B2.c @@ -1115,7 +1115,7 @@ H5B2_neighbor(H5B2_t *bt2, H5B2_compare_t range, void *udata, H5B2_found_t op, v *------------------------------------------------------------------------- */ herr_t -H5B2_modify(H5B2_t *bt2, void *udata, H5B2_modify_t op, void *op_data) +H5B2_modify(H5B2_t *bt2, void *udata, bool try, H5B2_modify_t op, void *op_data) { H5B2_hdr_t *hdr; /* Pointer to the B-tree header */ H5B2_node_ptr_t curr_node_ptr; /* Node pointer info for current node */ @@ -1142,8 +1142,13 @@ H5B2_modify(H5B2_t *bt2, void *udata, H5B2_modify_t op, void *op_data) curr_node_ptr = hdr->root; /* Check for empty tree */ - if (0 == curr_node_ptr.node_nrec) - HGOTO_ERROR(H5E_BTREE, H5E_NOTFOUND, FAIL, "B-tree has no records"); + if (0 == curr_node_ptr.node_nrec) { + /* Don't fail if the caller set the 'try' flag */ + if (try) + HGOTO_DONE(SUCCEED); + else + HGOTO_ERROR(H5E_BTREE, H5E_NOTFOUND, FAIL, "B-tree has no records"); + } /* end if */ /* Current depth of the tree */ depth = hdr->depth; @@ -1277,11 +1282,11 @@ H5B2_modify(H5B2_t *bt2, void *udata, H5B2_modify_t op, void *op_data) if (H5AC_unprotect(hdr->f, H5AC_BT2_LEAF, curr_node_ptr.addr, leaf, H5AC__NO_FLAGS_SET) < 0) HGOTO_ERROR(H5E_BTREE, H5E_CANTUNPROTECT, FAIL, "unable to release B-tree node"); - /* Note: don't push error on stack, leave that to next higher level, - * since many times the B-tree is searched in order to determine - * if an object exists in the B-tree or not. - */ - HGOTO_DONE(FAIL); + /* Don't fail if the caller set the 'try' flag */ + if (try) + HGOTO_DONE(SUCCEED); + else + HGOTO_ERROR(H5E_BTREE, H5E_NOTFOUND, FAIL, "record not found"); } else { /* Make callback for current record */ diff --git a/src/H5B2private.h b/src/H5B2private.h index f3f1eaf8a65..bf06a8bd846 100644 --- a/src/H5B2private.h +++ b/src/H5B2private.h @@ -131,7 +131,7 @@ H5_DLL herr_t H5B2_iterate(H5B2_t *bt2, H5B2_operator_t op, void *op_data); H5_DLL herr_t H5B2_find(H5B2_t *bt2, void *udata, bool *found, H5B2_found_t op, void *op_data); H5_DLL herr_t H5B2_index(H5B2_t *bt2, H5_iter_order_t order, hsize_t idx, H5B2_found_t op, void *op_data); H5_DLL herr_t H5B2_neighbor(H5B2_t *bt2, H5B2_compare_t range, void *udata, H5B2_found_t op, void *op_data); -H5_DLL herr_t H5B2_modify(H5B2_t *bt2, void *udata, H5B2_modify_t op, void *op_data); +H5_DLL herr_t H5B2_modify(H5B2_t *bt2, void *udata, bool try, H5B2_modify_t op, void *op_data); H5_DLL herr_t H5B2_update(H5B2_t *bt2, void *udata, H5B2_modify_t op, void *op_data); H5_DLL herr_t H5B2_remove(H5B2_t *b2, void *udata, H5B2_remove_t op, void *op_data); H5_DLL herr_t H5B2_remove_by_idx(H5B2_t *bt2, H5_iter_order_t order, hsize_t idx, H5B2_remove_t op, diff --git a/src/H5SM.c b/src/H5SM.c index 1c2d4e6caa7..59abd24e679 100644 --- a/src/H5SM.c +++ b/src/H5SM.c @@ -45,6 +45,13 @@ typedef struct H5SM_read_udata_t { void *encoding_buf; /* The encoded message (out) */ } H5SM_read_udata_t; +/* Typedef to increment a reference count in the B-tree */ +typedef struct { + H5SM_mesg_key_t *key; /* IN: key for message being incremented */ + bool found; /* OUT: if message was found */ + H5O_fheap_id_t fheap_id; /* OUT: fheap ID of record */ +} H5SM_incr_ref_opdata_t; + /********************/ /* Local Prototypes */ /********************/ @@ -1141,9 +1148,9 @@ H5SM_try_share(H5F_t *f, H5O_t *open_oh, unsigned defer_flags, unsigned type_id, static herr_t H5SM__incr_ref(void *record, void *_op_data, bool *changed) { - H5SM_sohm_t *message = (H5SM_sohm_t *)record; - H5SM_incr_ref_opdata *op_data = (H5SM_incr_ref_opdata *)_op_data; - herr_t ret_value = SUCCEED; + H5SM_sohm_t *message = (H5SM_sohm_t *)record; + H5SM_incr_ref_opdata_t *op_data = (H5SM_incr_ref_opdata_t *)_op_data; + herr_t ret_value = SUCCEED; FUNC_ENTER_PACKAGE @@ -1174,9 +1181,9 @@ H5SM__incr_ref(void *record, void *_op_data, bool *changed) /* If we got here, the message has changed */ *changed = true; - /* Check for retrieving the heap ID */ - if (op_data) - op_data->fheap_id = message->u.heap_loc.fheap_id; + /* Set the heap ID and indicate it was found */ + op_data->fheap_id = message->u.heap_loc.fheap_id; + op_data->found = true; done: FUNC_LEAVE_NOAPI(ret_value) @@ -1326,24 +1333,24 @@ H5SM__write_mesg(H5F_t *f, H5O_t *open_oh, H5SM_index_header_t *header, bool def HGOTO_ERROR(H5E_SOHM, H5E_NOTFOUND, FAIL, "can't search for message in index"); } /* end if */ else { - H5SM_incr_ref_opdata op_data; + H5SM_incr_ref_opdata_t op_data; /* Set up callback info */ - op_data.key = &key; + op_data.key = &key; + op_data.found = false; - /* If this returns failure, it means that the message wasn't found. */ - /* If it succeeds, set the heap_id in the shared struct. It will - * return a heap ID, since a message with a reference count greater - * than 1 is always shared in the heap. + /* Set the heap_id in the shared struct, if the message was found. + * It will return a heap ID, since a message with a reference count + * greater than 1 is always shared in the heap. */ - if (H5B2_modify(bt2, &key, H5SM__incr_ref, &op_data) >= 0) { + if (H5B2_modify(bt2, &key, true, H5SM__incr_ref, &op_data) < 0) + HGOTO_ERROR(H5E_SOHM, H5E_CANTMODIFY, FAIL, "B-tree modification failed"); + if (op_data.found) { shared.u.heap_id = op_data.fheap_id; found = true; } /* end if */ - else - H5E_clear_stack(); /*ignore error*/ - } /* end else */ - } /* end else */ + } /* end else */ + } /* end else */ if (found) { /* If the message was found, it's shared in the heap (now). Set up a @@ -1807,7 +1814,7 @@ H5SM__delete_from_index(H5F_t *f, H5O_t *open_oh, H5SM_index_header_t *header, c /* If this returns failure, it means that the message wasn't found. * If it succeeds, a copy of the modified message will be returned. */ - if (H5B2_modify(bt2, &key, H5SM__decr_ref, &message) < 0) + if (H5B2_modify(bt2, &key, false, H5SM__decr_ref, &message) < 0) HGOTO_ERROR(H5E_SOHM, H5E_NOTFOUND, FAIL, "message not in index"); /* Point to the message */ diff --git a/src/H5SMpkg.h b/src/H5SMpkg.h index 4ff4c7da81f..dbeafc15139 100644 --- a/src/H5SMpkg.h +++ b/src/H5SMpkg.h @@ -201,24 +201,6 @@ typedef struct { * heap ID, the heap ID will be 0. */ } H5SM_mesg_key_t; -/* - * Data exchange structure to pass through the fractal heap layer for the - * H5HF_op function when computing a hash value for a message. - */ -typedef struct { - /* downward (internal) */ - unsigned type_id; /* Message type */ - - /* upward */ - uint32_t hash; /* Hash value */ -} H5SM_fh_ud_gh_t; - -/* Typedef to increment a reference count in the B-tree */ -typedef struct { - H5SM_mesg_key_t *key; /* IN: key for message being incremented */ - H5O_fheap_id_t fheap_id; /* OUT: fheap ID of record */ -} H5SM_incr_ref_opdata; - /* v2 B-tree client callback context */ typedef struct H5SM_bt2_ctx_t { uint8_t sizeof_addr; /* Size of file addresses */ diff --git a/test/btree2.c b/test/btree2.c index 7653da5ec6e..1fb4d882d5e 100644 --- a/test/btree2.c +++ b/test/btree2.c @@ -9575,7 +9575,7 @@ test_modify(hid_t fapl, const H5B2_create_t *cparam, const bt2_test_param_t *tpa modify = 4; H5E_BEGIN_TRY { - ret = H5B2_modify(bt2, &record, modify_cb, &modify); + ret = H5B2_modify(bt2, &record, false, modify_cb, &modify); } H5E_END_TRY /* Should fail */ @@ -9600,7 +9600,7 @@ test_modify(hid_t fapl, const H5B2_create_t *cparam, const bt2_test_param_t *tpa /* Attempt to modify a record in a leaf node */ record = 4330; modify = 4331; - if (H5B2_modify(bt2, &record, modify_cb, &modify) < 0) + if (H5B2_modify(bt2, &record, false, modify_cb, &modify) < 0) FAIL_STACK_ERROR; /* Check status of B-tree */ @@ -9626,7 +9626,7 @@ test_modify(hid_t fapl, const H5B2_create_t *cparam, const bt2_test_param_t *tpa found = HSIZET_MAX; H5E_BEGIN_TRY { - ret = H5B2_modify(bt2, &record, modify_cb, &modify); + ret = H5B2_modify(bt2, &record, false, modify_cb, &modify); } H5E_END_TRY /* Should fail */ @@ -9651,7 +9651,7 @@ test_modify(hid_t fapl, const H5B2_create_t *cparam, const bt2_test_param_t *tpa /* Attempt to modify a record in an internal node */ record = 5350; modify = 5352; - if (H5B2_modify(bt2, &record, modify_cb, &modify) < 0) + if (H5B2_modify(bt2, &record, false, modify_cb, &modify) < 0) FAIL_STACK_ERROR; /* Check status of B-tree */ @@ -9677,7 +9677,7 @@ test_modify(hid_t fapl, const H5B2_create_t *cparam, const bt2_test_param_t *tpa found = 5350; H5E_BEGIN_TRY { - ret = H5B2_modify(bt2, &record, modify_cb, &modify); + ret = H5B2_modify(bt2, &record, false, modify_cb, &modify); } H5E_END_TRY /* Should fail */ @@ -9702,7 +9702,7 @@ test_modify(hid_t fapl, const H5B2_create_t *cparam, const bt2_test_param_t *tpa /* Attempt to modify a record in a root node */ record = 9445; modify = 9448; - if (H5B2_modify(bt2, &record, modify_cb, &modify) < 0) + if (H5B2_modify(bt2, &record, false, modify_cb, &modify) < 0) FAIL_STACK_ERROR; /* Check status of B-tree */ @@ -9728,7 +9728,7 @@ test_modify(hid_t fapl, const H5B2_create_t *cparam, const bt2_test_param_t *tpa found = 9445; H5E_BEGIN_TRY { - ret = H5B2_modify(bt2, &record, modify_cb, &modify); + ret = H5B2_modify(bt2, &record, false, modify_cb, &modify); } H5E_END_TRY /* Should fail */