diff --git a/.github/workflows/abi-report.yml b/.github/workflows/abi-report.yml index 5faa1f297b2..2fa63d1bd0d 100644 --- a/.github/workflows/abi-report.yml +++ b/.github/workflows/abi-report.yml @@ -51,7 +51,7 @@ jobs: - name: Get published binary (Linux) uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 with: - name: tgz-ubuntu-2204_gcc-binary + name: tgz-ubuntu-2404_gcc-binary path: ${{ github.workspace }} - name: List files for the space (Linux) @@ -59,7 +59,7 @@ jobs: ls -l ${{ github.workspace }} - name: Uncompress gh binary (Linux) - run: tar -zxvf ${{ github.workspace }}/${{ inputs.file_base }}-ubuntu-2204_gcc.tar.gz + run: tar -zxvf ${{ github.workspace }}/${{ inputs.file_base }}-ubuntu-2404_gcc.tar.gz - name: Uncompress hdf5 binary (Linux) run: | @@ -84,8 +84,8 @@ jobs: run: | mkdir "${{ github.workspace }}/hdf5R" cd "${{ github.workspace }}/hdf5R" - wget -q https://github.com/HDFGroup/hdf5/releases/download/hdf5_${{ inputs.file_ref }}/hdf5-${{ steps.convert-hdf5lib-refname.outputs.HDF5R_DOTS }}-ubuntu-2204_gcc.tar.gz - tar zxf hdf5-${{ steps.convert-hdf5lib-refname.outputs.HDF5R_DOTS }}-ubuntu-2204_gcc.tar.gz + wget -q https://github.com/HDFGroup/hdf5/releases/download/hdf5_${{ inputs.file_ref }}/hdf5-${{ steps.convert-hdf5lib-refname.outputs.HDF5R_DOTS }}-ubuntu-2404_gcc.tar.gz + tar zxf hdf5-${{ steps.convert-hdf5lib-refname.outputs.HDF5R_DOTS }}-ubuntu-2404_gcc.tar.gz - name: List files for the space (Linux) run: | diff --git a/.github/workflows/cmake-bintest.yml b/.github/workflows/cmake-bintest.yml index 3952cf80fa8..df681b4af9c 100644 --- a/.github/workflows/cmake-bintest.yml +++ b/.github/workflows/cmake-bintest.yml @@ -109,7 +109,7 @@ jobs: - name: Get published binary (Linux) uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 with: - name: tgz-ubuntu-2204_gcc-${{ inputs.build_mode }}-binary + name: tgz-ubuntu-2404_gcc-${{ inputs.build_mode }}-binary path: ${{ github.workspace }} - name: Uncompress hdf5 binary (Linux) diff --git a/.github/workflows/cmake-ctest.yml b/.github/workflows/cmake-ctest.yml index 77e490269fc..7d0add0fc57 100644 --- a/.github/workflows/cmake-ctest.yml +++ b/.github/workflows/cmake-ctest.yml @@ -266,21 +266,21 @@ jobs: cp ${{ runner.workspace }}/hdf5/build/${{ inputs.preset_name }}-GNUC/README.md ${{ runner.workspace }}/build/hdf5 cp ${{ runner.workspace }}/hdf5/build/${{ inputs.preset_name }}-GNUC/*.tar.gz ${{ runner.workspace }}/build/hdf5 cd "${{ runner.workspace }}/build" - tar -zcvf ${{ steps.set-file-base.outputs.FILE_BASE }}-ubuntu-2204_gcc.tar.gz hdf5 + tar -zcvf ${{ steps.set-file-base.outputs.FILE_BASE }}-ubuntu-2404_gcc.tar.gz hdf5 shell: bash - name: Publish deb binary (Linux) id: publish-ctest-deb-binary run: | mkdir "${{ runner.workspace }}/builddeb" - cp ${{ runner.workspace }}/hdf5/build/${{ inputs.preset_name }}-GNUC/*.deb ${{ runner.workspace }}/builddeb/${{ steps.set-file-base.outputs.FILE_BASE }}-ubuntu-2204_gcc.deb + cp ${{ runner.workspace }}/hdf5/build/${{ inputs.preset_name }}-GNUC/*.deb ${{ runner.workspace }}/builddeb/${{ steps.set-file-base.outputs.FILE_BASE }}-ubuntu-2404_gcc.deb shell: bash - name: Publish rpm binary (Linux) id: publish-ctest-rpm-binary run: | mkdir "${{ runner.workspace }}/buildrpm" - cp ${{ runner.workspace }}/hdf5/build/${{ inputs.preset_name }}-GNUC/*.rpm ${{ runner.workspace }}/buildrpm/${{ steps.set-file-base.outputs.FILE_BASE }}-ubuntu-2204_gcc.rpm + cp ${{ runner.workspace }}/hdf5/build/${{ inputs.preset_name }}-GNUC/*.rpm ${{ runner.workspace }}/buildrpm/${{ steps.set-file-base.outputs.FILE_BASE }}-ubuntu-2404_gcc.rpm shell: bash - name: List files in the space (Linux) @@ -292,22 +292,22 @@ jobs: - name: Save published binary (Linux) uses: actions/upload-artifact@v4 with: - name: tgz-ubuntu-2204_gcc-binary - path: ${{ runner.workspace }}/build/${{ steps.set-file-base.outputs.FILE_BASE }}-ubuntu-2204_gcc.tar.gz + name: tgz-ubuntu-2404_gcc-binary + path: ${{ runner.workspace }}/build/${{ steps.set-file-base.outputs.FILE_BASE }}-ubuntu-2404_gcc.tar.gz if-no-files-found: error # 'warn' or 'ignore' are also available, defaults to `warn` - name: Save published binary deb (Linux) uses: actions/upload-artifact@v4 with: - name: deb-ubuntu-2204_gcc-binary - path: ${{ runner.workspace }}/builddeb/${{ steps.set-file-base.outputs.FILE_BASE }}-ubuntu-2204_gcc.deb + name: deb-ubuntu-2404_gcc-binary + path: ${{ runner.workspace }}/builddeb/${{ steps.set-file-base.outputs.FILE_BASE }}-ubuntu-2404_gcc.deb if-no-files-found: error # 'warn' or 'ignore' are also available, defaults to `warn` - name: Save published binary rpm (Linux) uses: actions/upload-artifact@v4 with: - name: rpm-ubuntu-2204_gcc-binary - path: ${{ runner.workspace }}/buildrpm/${{ steps.set-file-base.outputs.FILE_BASE }}-ubuntu-2204_gcc.rpm + name: rpm-ubuntu-2404_gcc-binary + path: ${{ runner.workspace }}/buildrpm/${{ steps.set-file-base.outputs.FILE_BASE }}-ubuntu-2404_gcc.rpm if-no-files-found: error # 'warn' or 'ignore' are also available, defaults to `warn` # Save doxygen files created by ctest script @@ -589,7 +589,7 @@ jobs: cp ${{ runner.workspace }}/hdf5/build/${{ inputs.preset_name }}-GNUC-S3/README.md ${{ runner.workspace }}/build/hdf5 cp ${{ runner.workspace }}/hdf5/build/${{ inputs.preset_name }}-GNUC-S3/*.tar.gz ${{ runner.workspace }}/build/hdf5 cd "${{ runner.workspace }}/build" - tar -zcvf ${{ steps.set-file-base.outputs.FILE_BASE }}-ubuntu-2204_gcc_s3.tar.gz hdf5 + tar -zcvf ${{ steps.set-file-base.outputs.FILE_BASE }}-ubuntu-2404_gcc_s3.tar.gz hdf5 shell: bash - name: List files in the space (Linux S3) @@ -601,8 +601,8 @@ jobs: - name: Save published binary (Linux S3) uses: actions/upload-artifact@v4 with: - name: tgz-ubuntu-2204_gcc_s3-binary - path: ${{ runner.workspace }}/build/${{ steps.set-file-base.outputs.FILE_BASE }}-ubuntu-2204_gcc_s3.tar.gz + name: tgz-ubuntu-2404_gcc_s3-binary + path: ${{ runner.workspace }}/build/${{ steps.set-file-base.outputs.FILE_BASE }}-ubuntu-2404_gcc_s3.tar.gz if-no-files-found: error # 'warn' or 'ignore' are also available, defaults to `warn` ####### intel builds @@ -812,7 +812,7 @@ jobs: cp ${{ runner.workspace }}/hdf5/build/${{ inputs.preset_name }}-Intel/README.md ${{ runner.workspace }}/build/hdf5 cp ${{ runner.workspace }}/hdf5/build/${{ inputs.preset_name }}-Intel/*.tar.gz ${{ runner.workspace }}/build/hdf5 cd "${{ runner.workspace }}/build" - tar -zcvf ${{ steps.set-file-base.outputs.FILE_BASE }}-ubuntu-2204_intel.tar.gz hdf5 + tar -zcvf ${{ steps.set-file-base.outputs.FILE_BASE }}-ubuntu-2404_intel.tar.gz hdf5 shell: bash - name: List files in the space (Linux_intel) @@ -824,6 +824,6 @@ jobs: - name: Save published binary (Linux_intel) uses: actions/upload-artifact@v4 with: - name: tgz-ubuntu-2204_intel-binary - path: ${{ runner.workspace }}/build/${{ steps.set-file-base.outputs.FILE_BASE }}-ubuntu-2204_intel.tar.gz + name: tgz-ubuntu-2404_intel-binary + path: ${{ runner.workspace }}/build/${{ steps.set-file-base.outputs.FILE_BASE }}-ubuntu-2404_intel.tar.gz if-no-files-found: error # 'warn' or 'ignore' are also available, defaults to `warn` diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml index 8c16fbef02f..6f8acab31ce 100644 --- a/.github/workflows/cmake.yml +++ b/.github/workflows/cmake.yml @@ -129,8 +129,14 @@ jobs: name: "CMake TestExpress Workflows" uses: ./.github/workflows/testxpr-cmake.yml -# call-release-cmake-julia: -# name: "CMake Julia Workflows" -# uses: ./.github/workflows/julia-cmake.yml -# with: -# build_mode: "Release" + # call-release-cmake-julia: + # name: "CMake Julia Workflows" + # uses: ./.github/workflows/julia-cmake.yml + # with: + # build_mode: "Release" + + call-release-cmake-msys2: + name: "CMake Msys2 Workflows" + uses: ./.github/workflows/msys2-cmake.yml + with: + build_mode: "Release" \ No newline at end of file diff --git a/.github/workflows/h5py.yml b/.github/workflows/h5py.yml index f8da6c4f7e2..dd9d2fb2084 100644 --- a/.github/workflows/h5py.yml +++ b/.github/workflows/h5py.yml @@ -24,8 +24,8 @@ jobs: sed -i 's/hdf5@1.10.6:1.14/hdf5@1.10.6:/g' \ ./spack/var/spack/repos/builtin/packages/py-h5py/package.py . ./spack/share/spack/setup-env.sh - ./spack/bin/spack spec py-h5py@master+mpi ^hdf5@develop-1.17 - ./spack/bin/spack install py-h5py@master+mpi ^hdf5@develop-1.17 + ./spack/bin/spack spec py-h5py@master+mpi ^hdf5@develop-2.0 + ./spack/bin/spack install py-h5py@master+mpi ^hdf5@develop-2.0 ./spack/bin/spack install py-pytest ./spack/bin/spack install py-ipython ./spack/bin/spack install py-pytest-mpi diff --git a/.github/workflows/main-cmake-spc.yml b/.github/workflows/main-cmake-spc.yml index a814cf1a09d..416bac4e8a6 100644 --- a/.github/workflows/main-cmake-spc.yml +++ b/.github/workflows/main-cmake-spc.yml @@ -293,20 +293,20 @@ jobs: run: ctest . --parallel 2 -C Debug -V working-directory: ${{ runner.workspace }}/build - build_v1_16: - name: "gcc DBG v1.16 default API" + build_v2_0: + name: "gcc DBG v2.0.0 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 + 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 @@ -333,7 +333,7 @@ jobs: -DHDF5_ENABLE_DIRECT_VFD:BOOL=ON \ -DHDF5_ENABLE_ROS3_VFD:BOOL=ON \ -DH5_NO_DEPRECATED_SYMBOLS:BOOL=OFF \ - -DHDF5_DEFAULT_API_VERSION:STRING=v116 \ + -DHDF5_DEFAULT_API_VERSION:STRING=v200 \ $GITHUB_WORKSPACE shell: bash @@ -354,13 +354,13 @@ jobs: # 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 + 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 diff --git a/.github/workflows/main-cmake.yml b/.github/workflows/main-cmake.yml index 9bb0cd093d3..e2757e5550b 100644 --- a/.github/workflows/main-cmake.yml +++ b/.github/workflows/main-cmake.yml @@ -285,7 +285,7 @@ jobs: - name: Save published binary (linux) uses: actions/upload-artifact@v4 with: - name: tgz-ubuntu-2204_gcc-${{ inputs.build_mode }}-binary + name: tgz-ubuntu-2404_gcc-${{ inputs.build_mode }}-binary path: ${{ runner.workspace }}/build/HDF5-*-Linux.tar.gz if-no-files-found: error # 'warn' or 'ignore' are also available, defaults to `warn` if: ${{ (matrix.os == 'ubuntu-latest') && (inputs.thread_safety != 'TS') && (inputs.concurrent != 'CC') && ( inputs.build_mode != 'Debug') }} diff --git a/.github/workflows/msys2-cmake.yml b/.github/workflows/msys2-cmake.yml new file mode 100644 index 00000000000..7cbd7890f1c --- /dev/null +++ b/.github/workflows/msys2-cmake.yml @@ -0,0 +1,91 @@ +name: hdf5 dev CMake MSys2 CI + +# Triggers the workflow on a call from another workflow +on: + workflow_call: + inputs: + build_mode: + description: "release vs. debug build" + required: true + type: string + +permissions: + contents: read + +jobs: + + CMake_build_and_test: + + # The type of runner that the job will run on + runs-on: windows-latest + strategy: + matrix: + include: + - { icon: '⬛', sys: mingw32 } + - { icon: '🟦', sys: mingw64 } + - { icon: '🟨', sys: ucrt64 } + - { icon: '🟧', sys: clang64 } + name: ${{ matrix.icon }} MSYS2-${{ matrix.sys }}-${{ inputs.build_mode }} + defaults: + run: + shell: msys2 {0} + + steps: + - name: '${{ matrix.icon }} Setup MSYS2' + uses: msys2/setup-msys2@v2 + with: + msystem: ${{matrix.sys}} + update: true + install: >- + base-devel + git + gcc + make + development + pacboy: >- + toolchain:p + cmake:p + ninja:p + + - name: Set git to use LF + run: | + git config --global core.autocrlf input + + - name: Get Sources + uses: actions/checkout@v4.1.1 + + - 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=${{ inputs.build_mode }} \ + -DCMAKE_TOOLCHAIN_FILE="" \ + -DHDF5_GENERATE_HEADERS=OFF \ + -DBUILD_SHARED_LIBS=ON \ + -DHDF5_ENABLE_ALL_WARNINGS=ON \ + -DHDF5_ENABLE_PARALLEL:BOOL=OFF \ + -DHDF5_BUILD_CPP_LIB:BOOL=OFF \ + -DHDF5_BUILD_FORTRAN=OFF \ + -DHDF5_BUILD_JAVA=OFF \ + -DHDF5_BUILD_DOC=OFF \ + -DLIBAEC_USE_LOCALCONTENT=OFF \ + -DZLIB_USE_LOCALCONTENT=OFF \ + $GITHUB_WORKSPACE + + - name: CMake Build + run: | + cmake --build . --parallel 3 --config ${{ inputs.build_mode }} + working-directory: ${{ runner.workspace }}/build + + - name: CMake Run Tests + run: | + ctest . --parallel 2 -C ${{ inputs.build_mode }} -V -E "tfloatsattrs|testhdf5-base|cache_api|dt_arith|H5TEST-dtypes|err_compat" + working-directory: ${{ runner.workspace }}/build + + - name: CMake Run Expected to Fail Tests + run: | + ctest . --parallel 2 -C ${{ inputs.build_mode }} -V -R "tfloatsattrs|testhdf5-base|cache_api|dt_arith|H5TEST-dtypes|err_compat" + working-directory: ${{ runner.workspace }}/build + continue-on-error: true diff --git a/.github/workflows/nvhpc-cmake.yml b/.github/workflows/nvhpc-cmake.yml index 3dbefa22861..dbdcb365ec9 100644 --- a/.github/workflows/nvhpc-cmake.yml +++ b/.github/workflows/nvhpc-cmake.yml @@ -76,6 +76,13 @@ jobs: ctest . -E "MPI_TEST|H5TEST-dt_arith|H5TEST-dtransform" --parallel 2 -C ${{ inputs.build_mode }} -V working-directory: ${{ runner.workspace }}/build + - name: CMake Run Expected To Fail Tests + shell: bash + run: | + ctest . -R "H5TEST-dt_arith|H5TEST-dtransform" --parallel 2 -C ${{ inputs.build_mode }} -V + working-directory: ${{ runner.workspace }}/build + continue-on-error: true + - name: CMake Run Parallel Tests shell: bash run: | diff --git a/.github/workflows/release-files.yml b/.github/workflows/release-files.yml index af5f98ba6c6..09b7022b3e7 100644 --- a/.github/workflows/release-files.yml +++ b/.github/workflows/release-files.yml @@ -121,25 +121,25 @@ jobs: - name: Get published binary (Linux) uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 with: - name: tgz-ubuntu-2204_gcc-binary + name: tgz-ubuntu-2404_gcc-binary path: ${{ github.workspace }} - name: Get published deb binary (Linux) uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 with: - name: deb-ubuntu-2204_gcc-binary + name: deb-ubuntu-2404_gcc-binary path: ${{ github.workspace }} - name: Get published rpm binary (Linux) uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 with: - name: rpm-ubuntu-2204_gcc-binary + name: rpm-ubuntu-2404_gcc-binary path: ${{ github.workspace }} - name: Get published binary (Linux S3) uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 with: - name: tgz-ubuntu-2204_gcc_s3-binary + name: tgz-ubuntu-2404_gcc_s3-binary path: ${{ github.workspace }} - name: Get published binary (Windows_intel) @@ -157,7 +157,7 @@ jobs: - name: Get published binary (Linux_intel) uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 with: - name: tgz-ubuntu-2204_intel-binary + name: tgz-ubuntu-2404_intel-binary path: ${{ github.workspace }} - name: Get published abi reports (Linux) @@ -187,13 +187,13 @@ jobs: sha256sum ${{ steps.get-file-base.outputs.FILE_BASE }}.zip >> ${{ steps.get-file-base.outputs.FILE_BASE }}.sha256sums.txt sha256sum ${{ steps.get-file-base.outputs.FILE_BASE }}-macos14_clang.tar.gz >> ${{ steps.get-file-base.outputs.FILE_BASE }}.sha256sums.txt sha256sum ${{ steps.get-file-base.outputs.FILE_BASE }}-macos14_clang.dmg >> ${{ steps.get-file-base.outputs.FILE_BASE }}.sha256sums.txt - sha256sum ${{ steps.get-file-base.outputs.FILE_BASE }}-ubuntu-2204_gcc.tar.gz >> ${{ steps.get-file-base.outputs.FILE_BASE }}.sha256sums.txt - sha256sum ${{ steps.get-file-base.outputs.FILE_BASE }}-ubuntu-2204_gcc.deb >> ${{ steps.get-file-base.outputs.FILE_BASE }}.sha256sums.txt - sha256sum ${{ steps.get-file-base.outputs.FILE_BASE }}-ubuntu-2204_gcc.rpm >> ${{ steps.get-file-base.outputs.FILE_BASE }}.sha256sums.txt - sha256sum ${{ steps.get-file-base.outputs.FILE_BASE }}-ubuntu-2204_gcc_s3.tar.gz >> ${{ steps.get-file-base.outputs.FILE_BASE }}.sha256sums.txt + sha256sum ${{ steps.get-file-base.outputs.FILE_BASE }}-ubuntu-2404_gcc.tar.gz >> ${{ steps.get-file-base.outputs.FILE_BASE }}.sha256sums.txt + sha256sum ${{ steps.get-file-base.outputs.FILE_BASE }}-ubuntu-2404_gcc.deb >> ${{ steps.get-file-base.outputs.FILE_BASE }}.sha256sums.txt + sha256sum ${{ steps.get-file-base.outputs.FILE_BASE }}-ubuntu-2404_gcc.rpm >> ${{ steps.get-file-base.outputs.FILE_BASE }}.sha256sums.txt + sha256sum ${{ steps.get-file-base.outputs.FILE_BASE }}-ubuntu-2404_gcc_s3.tar.gz >> ${{ steps.get-file-base.outputs.FILE_BASE }}.sha256sums.txt sha256sum ${{ steps.get-file-base.outputs.FILE_BASE }}-win-vs2022_cl.zip >> ${{ steps.get-file-base.outputs.FILE_BASE }}.sha256sums.txt sha256sum ${{ steps.get-file-base.outputs.FILE_BASE }}-win-vs2022_cl.msi >> ${{ steps.get-file-base.outputs.FILE_BASE }}.sha256sums.txt - sha256sum ${{ steps.get-file-base.outputs.FILE_BASE }}-ubuntu-2204_intel.tar.gz >> ${{ steps.get-file-base.outputs.FILE_BASE }}.sha256sums.txt + sha256sum ${{ steps.get-file-base.outputs.FILE_BASE }}-ubuntu-2404_intel.tar.gz >> ${{ steps.get-file-base.outputs.FILE_BASE }}.sha256sums.txt sha256sum ${{ steps.get-file-base.outputs.FILE_BASE }}-win-vs2022_intel.zip >> ${{ steps.get-file-base.outputs.FILE_BASE }}.sha256sums.txt sha256sum ${{ steps.get-file-base.outputs.FILE_BASE }}-win-vs2022_intel.msi >> ${{ steps.get-file-base.outputs.FILE_BASE }}.sha256sums.txt sha256sum ${{ steps.get-file-base.outputs.FILE_BASE }}.html.abi.reports.tar.gz >> ${{ steps.get-file-base.outputs.FILE_BASE }}.sha256sums.txt @@ -233,13 +233,13 @@ jobs: ${{ steps.get-file-base.outputs.FILE_BASE }}.zip ${{ steps.get-file-base.outputs.FILE_BASE }}-macos14_clang.tar.gz ${{ steps.get-file-base.outputs.FILE_BASE }}-macos14_clang.dmg - ${{ steps.get-file-base.outputs.FILE_BASE }}-ubuntu-2204_gcc.tar.gz - ${{ steps.get-file-base.outputs.FILE_BASE }}-ubuntu-2204_gcc.deb - ${{ steps.get-file-base.outputs.FILE_BASE }}-ubuntu-2204_gcc.rpm - ${{ steps.get-file-base.outputs.FILE_BASE }}-ubuntu-2204_gcc_s3.tar.gz + ${{ steps.get-file-base.outputs.FILE_BASE }}-ubuntu-2404_gcc.tar.gz + ${{ steps.get-file-base.outputs.FILE_BASE }}-ubuntu-2404_gcc.deb + ${{ steps.get-file-base.outputs.FILE_BASE }}-ubuntu-2404_gcc.rpm + ${{ steps.get-file-base.outputs.FILE_BASE }}-ubuntu-2404_gcc_s3.tar.gz ${{ steps.get-file-base.outputs.FILE_BASE }}-win-vs2022_cl.zip ${{ steps.get-file-base.outputs.FILE_BASE }}-win-vs2022_cl.msi - ${{ steps.get-file-base.outputs.FILE_BASE }}-ubuntu-2204_intel.tar.gz + ${{ steps.get-file-base.outputs.FILE_BASE }}-ubuntu-2404_intel.tar.gz ${{ steps.get-file-base.outputs.FILE_BASE }}-win-vs2022_intel.zip ${{ steps.get-file-base.outputs.FILE_BASE }}-win-vs2022_intel.msi ${{ steps.get-file-base.outputs.FILE_BASE }}.html.abi.reports.tar.gz @@ -262,13 +262,13 @@ jobs: hdf5.zip ${{ steps.get-file-base.outputs.FILE_BASE }}-macos14_clang.tar.gz ${{ steps.get-file-base.outputs.FILE_BASE }}-macos14_clang.dmg - ${{ steps.get-file-base.outputs.FILE_BASE }}-ubuntu-2204_gcc.tar.gz - ${{ steps.get-file-base.outputs.FILE_BASE }}-ubuntu-2204_gcc.deb - ${{ steps.get-file-base.outputs.FILE_BASE }}-ubuntu-2204_gcc.rpm - ${{ steps.get-file-base.outputs.FILE_BASE }}-ubuntu-2204_gcc_s3.tar.gz + ${{ steps.get-file-base.outputs.FILE_BASE }}-ubuntu-2404_gcc.tar.gz + ${{ steps.get-file-base.outputs.FILE_BASE }}-ubuntu-2404_gcc.deb + ${{ steps.get-file-base.outputs.FILE_BASE }}-ubuntu-2404_gcc.rpm + ${{ steps.get-file-base.outputs.FILE_BASE }}-ubuntu-2404_gcc_s3.tar.gz ${{ steps.get-file-base.outputs.FILE_BASE }}-win-vs2022_cl.zip ${{ steps.get-file-base.outputs.FILE_BASE }}-win-vs2022_cl.msi - ${{ steps.get-file-base.outputs.FILE_BASE }}-ubuntu-2204_intel.tar.gz + ${{ steps.get-file-base.outputs.FILE_BASE }}-ubuntu-2404_intel.tar.gz ${{ steps.get-file-base.outputs.FILE_BASE }}-win-vs2022_intel.zip ${{ steps.get-file-base.outputs.FILE_BASE }}-win-vs2022_intel.msi ${{ steps.get-file-base.outputs.FILE_BASE }}.html.abi.reports.tar.gz diff --git a/.github/workflows/remove-files.yml b/.github/workflows/remove-files.yml index 418065c8e00..8567c00c485 100644 --- a/.github/workflows/remove-files.yml +++ b/.github/workflows/remove-files.yml @@ -52,12 +52,12 @@ jobs: ${{ steps.get-file-base.outputs.FILE_BASE }}.zip ${{ steps.get-file-base.outputs.FILE_BASE }}-macos14_clang.tar.gz ${{ steps.get-file-base.outputs.FILE_BASE }}-macos14_clang.dmg - ${{ steps.get-file-base.outputs.FILE_BASE }}-ubuntu-2204_gcc.tar.gz - ${{ steps.get-file-base.outputs.FILE_BASE }}-ubuntu-2204_gcc.deb - ${{ steps.get-file-base.outputs.FILE_BASE }}-ubuntu-2204_gcc.rpm - ${{ steps.get-file-base.outputs.FILE_BASE }}-ubuntu-2204_gcc_s3.tar.gz + ${{ steps.get-file-base.outputs.FILE_BASE }}-ubuntu-2404_gcc.tar.gz + ${{ steps.get-file-base.outputs.FILE_BASE }}-ubuntu-2404_gcc.deb + ${{ steps.get-file-base.outputs.FILE_BASE }}-ubuntu-2404_gcc.rpm + ${{ steps.get-file-base.outputs.FILE_BASE }}-ubuntu-2404_gcc_s3.tar.gz ${{ steps.get-file-base.outputs.FILE_BASE }}-win-vs2022_cl.zip ${{ steps.get-file-base.outputs.FILE_BASE }}-win-vs2022_cl.msi - ${{ steps.get-file-base.outputs.FILE_BASE }}-ubuntu-2204_intel.tar.gz + ${{ steps.get-file-base.outputs.FILE_BASE }}-ubuntu-2404_intel.tar.gz ${{ steps.get-file-base.outputs.FILE_BASE }}-win-vs2022_intel.zip ${{ steps.get-file-base.outputs.FILE_BASE }}-win-vs2022_intel.msi diff --git a/CMakeLists.txt b/CMakeLists.txt index 4336471e80a..9546f1ee03c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -858,8 +858,8 @@ if (HDF5_ENABLE_SUBFILING_VFD) endif() -set (HDF5_DEFAULT_API_VERSION "v118" CACHE STRING "Enable v1.16 API (v16, v18, v110, v112, v114, v116, v118)") -set_property (CACHE HDF5_DEFAULT_API_VERSION PROPERTY STRINGS v16 v18 v110 v112 v114 v116 v118) +set (HDF5_DEFAULT_API_VERSION "v200" CACHE STRING "Enable v2.0 API (v16, v18, v110, v112, v114, v200)") +set_property (CACHE HDF5_DEFAULT_API_VERSION PROPERTY STRINGS v16 v18 v110 v112 v114 v200) #----------------------------------------------------------------------------- # Option to use 1.6.x API #----------------------------------------------------------------------------- @@ -901,22 +901,14 @@ if (HDF5_DEFAULT_API_VERSION MATCHES "v114") endif () #----------------------------------------------------------------------------- -# Option to use 1.16.x API -#----------------------------------------------------------------------------- -set (H5_USE_116_API_DEFAULT 0) -if (HDF5_DEFAULT_API_VERSION MATCHES "v116") - set (H5_USE_116_API_DEFAULT 1) -endif () - -#----------------------------------------------------------------------------- -# Option to use 1.18.x API +# Option to use 2.x.y API #----------------------------------------------------------------------------- +set (H5_USE_200_API_DEFAULT 0) if (NOT HDF5_DEFAULT_API_VERSION) - set (HDF5_DEFAULT_API_VERSION "v118") + set (HDF5_DEFAULT_API_VERSION "v200") endif () -set (H5_USE_118_API_DEFAULT 0) -if (HDF5_DEFAULT_API_VERSION MATCHES "v118") - set (H5_USE_118_API_DEFAULT 1) +if (DEFAULT_API_VERSION MATCHES "v200") + set (H5_USE_200_API_DEFAULT 1) endif () #----------------------------------------------------------------------------- diff --git a/HDF5Examples/C/H5D/CMakeLists.txt b/HDF5Examples/C/H5D/CMakeLists.txt index d88aa4551b1..4ebeb086c38 100644 --- a/HDF5Examples/C/H5D/CMakeLists.txt +++ b/HDF5Examples/C/H5D/CMakeLists.txt @@ -19,7 +19,7 @@ foreach (example_name ${common_examples}) "$<$:-DH5_USE_110_API>" "$<$:-DH5_USE_112_API>" "$<$:-DH5_USE_114_API>" - "$<$:-DH5_USE_116_API>" + "$<$:-DH5_USE_200_API>" ) if (H5_HAVE_PARALLEL) target_include_directories (${EXAMPLE_VARNAME}_${example_name} PUBLIC ${MPI_C_INCLUDE_DIRS}) @@ -45,7 +45,7 @@ if (HDF5_VERSION_MAJOR VERSION_GREATER_EQUAL "1.8") "$<$:-DH5_USE_110_API>" "$<$:-DH5_USE_112_API>" "$<$:-DH5_USE_114_API>" - "$<$:-DH5_USE_116_API>" + "$<$:-DH5_USE_200_API>" ) if (H5_HAVE_PARALLEL) target_include_directories (${EXAMPLE_VARNAME}_${example_name} PUBLIC ${MPI_C_INCLUDE_DIRS}) @@ -72,7 +72,7 @@ endif () # "$<$:-DH5_USE_110_API>" # "$<$:-DH5_USE_112_API>" # "$<$:-DH5_USE_114_API>" -# "$<$:-DH5_USE_116_API>" +# "$<$:-DH5_USE_200_API>" # ) # if (H5_HAVE_PARALLEL) # target_include_directories (${EXAMPLE_VARNAME}_${example_name} PUBLIC ${MPI_C_INCLUDE_DIRS}) @@ -112,14 +112,14 @@ endif () # endif () # endforeach () #endif () -#if (HDF5_VERSION_MAJOR VERSION_GREATER_EQUAL "1.16") -# foreach (example_name ${1_16_examples}) +#if (HDF5_VERSION_MAJOR VERSION_GREATER_EQUAL "2.0") +# foreach (example_name ${2_0_examples}) # if (H5EX_BUILD_TESTING) # add_custom_command ( # TARGET ${EXAMPLE_VARNAME}_${example_name} # POST_BUILD # COMMAND ${CMAKE_COMMAND} -# ARGS -E copy_if_different ${PROJECT_SOURCE_DIR}/tfiles/116/${example_name}.tst ${PROJECT_BINARY_DIR}/${example_name}.tst +# ARGS -E copy_if_different ${PROJECT_SOURCE_DIR}/tfiles/200/${example_name}.tst ${PROJECT_BINARY_DIR}/${example_name}.tst # ) # endif () # endforeach () @@ -192,12 +192,12 @@ if (HDF5_BUILD_TOOLS) # ARGS -E copy_if_different ${PROJECT_SOURCE_DIR}/tfiles/114/${example_name}.ddl ${PROJECT_BINARY_DIR}/${example_name}.ddl # ) #endif () - #if (HDF5_VERSION_MAJOR VERSION_GREATER_EQUAL "1.16") + #if (HDF5_VERSION_MAJOR VERSION_GREATER_EQUAL "2.0") # add_custom_command ( # TARGET ${EXAMPLE_VARNAME}_${example_name} # POST_BUILD # COMMAND ${CMAKE_COMMAND} - # ARGS -E copy_if_different ${PROJECT_SOURCE_DIR}/tfiles/116/${example_name}.ddl ${PROJECT_BINARY_DIR}/${example_name}.ddl + # ARGS -E copy_if_different ${PROJECT_SOURCE_DIR}/tfiles/200/${example_name}.ddl ${PROJECT_BINARY_DIR}/${example_name}.ddl # ) #endif () endif () @@ -209,7 +209,7 @@ if (HDF5_BUILD_TOOLS) # endforeach () # foreach (example_name ${1_14_examples}) # endforeach () -# foreach (example_name ${1_16_examples}) +# foreach (example_name ${2_0_examples}) # endforeach () endif () diff --git a/HDF5Examples/C/H5FLT/CMakeLists.txt b/HDF5Examples/C/H5FLT/CMakeLists.txt index 3bebf30025e..2cd5ea0077c 100644 --- a/HDF5Examples/C/H5FLT/CMakeLists.txt +++ b/HDF5Examples/C/H5FLT/CMakeLists.txt @@ -165,7 +165,7 @@ foreach (example ${dyn_examples}) "$<$:-DH5_USE_110_API>" "$<$:-DH5_USE_112_API>" "$<$:-DH5_USE_114_API>" - "$<$:-DH5_USE_116_API>" + "$<$:-DH5_USE_200_API>" ) if (H5_HAVE_PARALLEL) target_include_directories (${EXAMPLE_VARNAME}_${example} PUBLIC ${MPI_C_INCLUDE_DIRS}) diff --git a/HDF5Examples/C/H5G/CMakeLists.txt b/HDF5Examples/C/H5G/CMakeLists.txt index 14a16861a34..c9a734f9d01 100644 --- a/HDF5Examples/C/H5G/CMakeLists.txt +++ b/HDF5Examples/C/H5G/CMakeLists.txt @@ -19,7 +19,7 @@ foreach (example_name ${common_examples}) "$<$:-DH5_USE_110_API>" "$<$:-DH5_USE_112_API>" "$<$:-DH5_USE_114_API>" - "$<$:-DH5_USE_116_API>" + "$<$:-DH5_USE_200_API>" ) if (H5_HAVE_PARALLEL) target_include_directories (${EXAMPLE_VARNAME}_${example_name} PUBLIC ${MPI_C_INCLUDE_DIRS}) @@ -47,7 +47,7 @@ if (HDF5_VERSION_MAJOR VERSION_GREATER_EQUAL "1.8" AND NOT ${EXAMPLE_VARNAME}_US "$<$:-DH5_USE_110_API>" "$<$:-DH5_USE_112_API>" "$<$:-DH5_USE_114_API>" - "$<$:-DH5_USE_116_API>" + "$<$:-DH5_USE_200_API>" ) if (H5_HAVE_PARALLEL) target_include_directories (${EXAMPLE_VARNAME}_${example_name} PUBLIC ${MPI_C_INCLUDE_DIRS}) @@ -74,7 +74,7 @@ endif () # "$<$:-DH5_USE_110_API>" # "$<$:-DH5_USE_112_API>" # "$<$:-DH5_USE_114_API>" -# "$<$:-DH5_USE_116_API>" +# "$<$:-DH5_USE_200_API>" # ) # if (H5_HAVE_PARALLEL) # target_include_directories (${EXAMPLE_VARNAME}_${example_name} PUBLIC ${MPI_C_INCLUDE_DIRS}) @@ -114,14 +114,14 @@ endif () # endif () # endforeach () #endif () -#if (HDF5_VERSION_MAJOR VERSION_GREATER_EQUAL "1.16") -# foreach (example_name ${1_16_examples}) +#if (HDF5_VERSION_MAJOR VERSION_GREATER_EQUAL "2.0") +# foreach (example_name ${2_0_examples}) # if (H5EX_BUILD_TESTING) # add_custom_command ( # TARGET ${EXAMPLE_VARNAME}_${example_name} # POST_BUILD # COMMAND ${CMAKE_COMMAND} -# ARGS -E copy_if_different ${PROJECT_SOURCE_DIR}/tfiles/116/${example_name}.tst ${PROJECT_BINARY_DIR}/${example_name}.tst +# ARGS -E copy_if_different ${PROJECT_SOURCE_DIR}/tfiles/200/${example_name}.tst ${PROJECT_BINARY_DIR}/${example_name}.tst # ) # endif () # endforeach () @@ -187,12 +187,12 @@ if (HDF5_BUILD_TOOLS) # ARGS -E copy_if_different ${PROJECT_SOURCE_DIR}/tfiles/114/${example_name}.ddl ${PROJECT_BINARY_DIR}/${example_name}.ddl # ) #endif () - #if (HDF5_VERSION_MAJOR VERSION_GREATER_EQUAL "1.16") + #if (HDF5_VERSION_MAJOR VERSION_GREATER_EQUAL "2.0") # add_custom_command ( # TARGET ${EXAMPLE_VARNAME}_${example_name} # POST_BUILD # COMMAND ${CMAKE_COMMAND} - # ARGS -E copy_if_different ${PROJECT_SOURCE_DIR}/tfiles/116/${example_name}.ddl ${PROJECT_BINARY_DIR}/${example_name}.ddl + # ARGS -E copy_if_different ${PROJECT_SOURCE_DIR}/tfiles/200/${example_name}.ddl ${PROJECT_BINARY_DIR}/${example_name}.ddl # ) #endif () # endforeach () @@ -203,7 +203,7 @@ if (HDF5_BUILD_TOOLS) # endforeach () # foreach (example_name ${1_14_examples}) # endforeach () -# foreach (example_name ${1_16_examples}) +# foreach (example_name ${2_0_examples}) # endforeach () endif () diff --git a/HDF5Examples/C/H5PAR/CMakeLists.txt b/HDF5Examples/C/H5PAR/CMakeLists.txt index 662cd70d295..8cd296d7f08 100644 --- a/HDF5Examples/C/H5PAR/CMakeLists.txt +++ b/HDF5Examples/C/H5PAR/CMakeLists.txt @@ -15,7 +15,7 @@ foreach (example_name ${examples}) "$<$:-DH5_USE_110_API>" "$<$:-DH5_USE_112_API>" "$<$:-DH5_USE_114_API>" - "$<$:-DH5_USE_116_API>" + "$<$:-DH5_USE_200_API>" ) target_include_directories (${EXAMPLE_VARNAME}_${example_name} PUBLIC ${MPI_C_INCLUDE_DIRS}) target_link_libraries (${EXAMPLE_VARNAME}_${example_name} ${H5EX_HDF5_LINK_LIBS}) diff --git a/HDF5Examples/C/H5T/CMakeLists.txt b/HDF5Examples/C/H5T/CMakeLists.txt index b95958fb9b5..8292909a94f 100644 --- a/HDF5Examples/C/H5T/CMakeLists.txt +++ b/HDF5Examples/C/H5T/CMakeLists.txt @@ -19,7 +19,7 @@ foreach (example_name ${common_examples}) "$<$:-DH5_USE_110_API>" "$<$:-DH5_USE_112_API>" "$<$:-DH5_USE_114_API>" - "$<$:-DH5_USE_116_API>" + "$<$:-DH5_USE_200_API>" ) if (H5_HAVE_PARALLEL) target_include_directories (${EXAMPLE_VARNAME}_${example_name} PUBLIC ${MPI_C_INCLUDE_DIRS}) @@ -45,7 +45,7 @@ endforeach () # "$<$:-DH5_USE_110_API>" # "$<$:-DH5_USE_112_API>" # "$<$:-DH5_USE_114_API>" -# "$<$:-DH5_USE_116_API>" +# "$<$:-DH5_USE_200_API>" # ) # if (H5_HAVE_PARALLEL) # target_include_directories (${EXAMPLE_VARNAME}_${example_name} PUBLIC ${MPI_C_INCLUDE_DIRS}) @@ -97,14 +97,14 @@ endforeach () # endif () # endforeach () #endif () -#if (HDF5_VERSION_MAJOR VERSION_GREATER_EQUAL "1.16") -# foreach (example_name ${1_16_examples}) +#if (HDF5_VERSION_MAJOR VERSION_GREATER_EQUAL "2.0") +# foreach (example_name ${2_0_examples}) # if (H5EX_BUILD_TESTING) # add_custom_command ( # TARGET ${EXAMPLE_VARNAME}_${example_name} # POST_BUILD # COMMAND ${CMAKE_COMMAND} -# ARGS -E copy_if_different ${PROJECT_SOURCE_DIR}/tfiles/116/${example_name}.tst ${PROJECT_BINARY_DIR}/${example_name}.tst +# ARGS -E copy_if_different ${PROJECT_SOURCE_DIR}/tfiles/200/${example_name}.tst ${PROJECT_BINARY_DIR}/${example_name}.tst # ) # endif () # endforeach () @@ -321,12 +321,12 @@ if (HDF5_BUILD_TOOLS) # ARGS -E copy_if_different ${PROJECT_SOURCE_DIR}/tfiles/114/${example_name}.ddl ${PROJECT_BINARY_DIR}/${example_name}.ddl # ) #endif () - #if (HDF5_VERSION_MAJOR VERSION_GREATER_EQUAL "1.16") + #if (HDF5_VERSION_MAJOR VERSION_GREATER_EQUAL "2.0") # add_custom_command ( # TARGET ${EXAMPLE_VARNAME}_${example_name} # POST_BUILD # COMMAND ${CMAKE_COMMAND} - # ARGS -E copy_if_different ${PROJECT_SOURCE_DIR}/tfiles/116/${example_name}.ddl ${PROJECT_BINARY_DIR}/${example_name}.ddl + # ARGS -E copy_if_different ${PROJECT_SOURCE_DIR}/tfiles/200/${example_name}.ddl ${PROJECT_BINARY_DIR}/${example_name}.ddl # ) #endif () # endforeach () @@ -336,7 +336,7 @@ if (HDF5_BUILD_TOOLS) # endforeach () # foreach (example_name ${1_14_examples}) # endforeach () -# foreach (example_name ${1_16_examples}) +# foreach (example_name ${2_0_examples}) # endforeach () endif () diff --git a/HDF5Examples/C/H5VDS/CMakeLists.txt b/HDF5Examples/C/H5VDS/CMakeLists.txt index 3ad3cb9ad89..bc27acfd9d9 100644 --- a/HDF5Examples/C/H5VDS/CMakeLists.txt +++ b/HDF5Examples/C/H5VDS/CMakeLists.txt @@ -19,7 +19,7 @@ if (HDF5_VERSION_MAJOR VERSION_GREATER_EQUAL "1.10") "$<$:-DH5_USE_110_API>" "$<$:-DH5_USE_112_API>" "$<$:-DH5_USE_114_API>" - "$<$:-DH5_USE_116_API>" + "$<$:-DH5_USE_200_API>" ) if (H5_HAVE_PARALLEL) target_include_directories (${EXAMPLE_VARNAME}_${example_name} PUBLIC ${MPI_C_INCLUDE_DIRS}) @@ -60,14 +60,14 @@ endif () # endif () # endforeach () #endif () -#if (HDF5_VERSION_MAJOR VERSION_GREATER_EQUAL "1.16") -# foreach (example_name ${1_16_examples}) +#if (HDF5_VERSION_MAJOR VERSION_GREATER_EQUAL "2.0") +# foreach (example_name ${2_0_examples}) # if (H5EX_BUILD_TESTING) # add_custom_command ( # TARGET ${EXAMPLE_VARNAME}_${example_name} # POST_BUILD # COMMAND ${CMAKE_COMMAND} -# ARGS -E copy_if_different ${PROJECT_SOURCE_DIR}/tfiles/116/${example_name}.tst ${PROJECT_BINARY_DIR}/${example_name}.tst +# ARGS -E copy_if_different ${PROJECT_SOURCE_DIR}/tfiles/200/${example_name}.tst ${PROJECT_BINARY_DIR}/${example_name}.tst # ) # endif () # endforeach () @@ -102,12 +102,12 @@ if (HDF5_BUILD_TOOLS) # ARGS -E copy_if_different ${PROJECT_SOURCE_DIR}/tfiles/114/${example_name}.ddl ${PROJECT_BINARY_DIR}/${example_name}.ddl # ) #endif () - #if (HDF5_VERSION_MAJOR VERSION_GREATER_EQUAL "1.16") + #if (HDF5_VERSION_MAJOR VERSION_GREATER_EQUAL "2.0") # add_custom_command ( # TARGET ${EXAMPLE_VARNAME}_${example_name} # POST_BUILD # COMMAND ${CMAKE_COMMAND} - # ARGS -E copy_if_different ${PROJECT_SOURCE_DIR}/tfiles/116/${example_name}.ddl ${PROJECT_BINARY_DIR}/${example_name}.ddl + # ARGS -E copy_if_different ${PROJECT_SOURCE_DIR}/tfiles/200/${example_name}.ddl ${PROJECT_BINARY_DIR}/${example_name}.ddl # ) #endif () endforeach () @@ -116,7 +116,7 @@ if (HDF5_BUILD_TOOLS) # endforeach () # foreach (example_name ${1_14_examples}) # endforeach () -# foreach (example_name ${1_16_examples}) +# foreach (example_name ${2_0_examples}) # endforeach () endif () diff --git a/HDF5Examples/C/Perf/CMakeLists.txt b/HDF5Examples/C/Perf/CMakeLists.txt index bf66de3f6de..f4153d08722 100644 --- a/HDF5Examples/C/Perf/CMakeLists.txt +++ b/HDF5Examples/C/Perf/CMakeLists.txt @@ -16,7 +16,7 @@ foreach (example ${examples}) "$<$:-DH5_USE_110_API>" "$<$:-DH5_USE_112_API>" "$<$:-DH5_USE_114_API>" - "$<$:-DH5_USE_116_API>" + "$<$:-DH5_USE_200_API>" ) if (H5_HAVE_PARALLEL) target_include_directories (${EXAMPLE_VARNAME}_${example_name} PUBLIC ${MPI_C_INCLUDE_DIRS}) diff --git a/HDF5Examples/C/TUTR/CMakeLists.txt b/HDF5Examples/C/TUTR/CMakeLists.txt index 10da2bf1797..74c0aee99f8 100644 --- a/HDF5Examples/C/TUTR/CMakeLists.txt +++ b/HDF5Examples/C/TUTR/CMakeLists.txt @@ -15,7 +15,7 @@ foreach (example_name ${examples}) "$<$:-DH5_USE_110_API>" "$<$:-DH5_USE_112_API>" "$<$:-DH5_USE_114_API>" - "$<$:-DH5_USE_116_API>" + "$<$:-DH5_USE_200_API>" ) if (H5_HAVE_PARALLEL) target_include_directories (${EXAMPLE_VARNAME}_tutr_${example_name} PUBLIC ${MPI_C_INCLUDE_DIRS}) diff --git a/HDF5Examples/CXX/H5D/CMakeLists.txt b/HDF5Examples/CXX/H5D/CMakeLists.txt index 9799599500b..e2c23b3387a 100644 --- a/HDF5Examples/CXX/H5D/CMakeLists.txt +++ b/HDF5Examples/CXX/H5D/CMakeLists.txt @@ -16,7 +16,7 @@ if (HDF5_VERSION_MAJOR VERSION_GREATER_EQUAL "1.8") "$<$:-DH5_USE_110_API>" "$<$:-DH5_USE_112_API>" "$<$:-DH5_USE_114_API>" - "$<$:-DH5_USE_116_API>" + "$<$:-DH5_USE_200_API>" ) if (H5_HAVE_PARALLEL) target_include_directories (${EXAMPLE_VARNAME}_cpp_ex_${example_name} PUBLIC ${MPI_C_INCLUDE_DIRS}) diff --git a/HDF5Examples/CXX/TUTR/CMakeLists.txt b/HDF5Examples/CXX/TUTR/CMakeLists.txt index 6310b163960..a8400295ea4 100644 --- a/HDF5Examples/CXX/TUTR/CMakeLists.txt +++ b/HDF5Examples/CXX/TUTR/CMakeLists.txt @@ -16,7 +16,7 @@ if (HDF5_VERSION_MAJOR VERSION_GREATER_EQUAL "1.8") "$<$:-DH5_USE_110_API>" "$<$:-DH5_USE_112_API>" "$<$:-DH5_USE_114_API>" - "$<$:-DH5_USE_116_API>" + "$<$:-DH5_USE_200_API>" ) if (H5_HAVE_PARALLEL) target_include_directories (${EXAMPLE_VARNAME}_cpp_ex_${example_name} PUBLIC ${MPI_C_INCLUDE_DIRS}) diff --git a/HDF5Examples/FORTRAN/H5D/CMakeLists.txt b/HDF5Examples/FORTRAN/H5D/CMakeLists.txt index e7c59b420e2..b8d3166d19b 100644 --- a/HDF5Examples/FORTRAN/H5D/CMakeLists.txt +++ b/HDF5Examples/FORTRAN/H5D/CMakeLists.txt @@ -28,7 +28,7 @@ foreach (example_name ${common_examples}) "$<$:-DH5_USE_110_API>" "$<$:-DH5_USE_112_API>" "$<$:-DH5_USE_114_API>" - "$<$:-DH5_USE_116_API>" + "$<$:-DH5_USE_200_API>" ) if (H5_HAVE_PARALLEL) target_include_directories (${EXAMPLE_VARNAME}_f90_${example_name} PUBLIC ${MPI_Fortran_INCLUDE_DIRS}) @@ -73,7 +73,7 @@ if (HDF5_VERSION_MAJOR VERSION_GREATER_EQUAL "1.10") "$<$:-DH5_USE_110_API>" "$<$:-DH5_USE_112_API>" "$<$:-DH5_USE_114_API>" - "$<$:-DH5_USE_116_API>" + "$<$:-DH5_USE_200_API>" ) if (H5_HAVE_PARALLEL) target_include_directories (${EXAMPLE_VARNAME}_f90_${example_name} PUBLIC ${MPI_Fortran_INCLUDE_DIRS}) @@ -116,14 +116,14 @@ endif () # endif () # endforeach () #endif () -#if (HDF5_VERSION_MAJOR VERSION_GREATER_EQUAL "1.16") -# foreach (example_name ${1_16_examples}) +#if (HDF5_VERSION_MAJOR VERSION_GREATER_EQUAL "2.0") +# foreach (example_name ${2_0_examples}) # if (H5EX_BUILD_TESTING) # add_custom_command ( # TARGET ${EXAMPLE_VARNAME}_f90_${example_name} # POST_BUILD # COMMAND ${CMAKE_COMMAND} -# ARGS -E copy_if_different ${PROJECT_SOURCE_DIR}/tfiles/116/${example_name}.tst ${PROJECT_BINARY_DIR}/${example_name}.tst +# ARGS -E copy_if_different ${PROJECT_SOURCE_DIR}/tfiles/200/${example_name}.tst ${PROJECT_BINARY_DIR}/${example_name}.tst # ) # endif () # endforeach () @@ -216,12 +216,12 @@ if (HDF5_BUILD_TOOLS) # ARGS -E copy_if_different ${PROJECT_SOURCE_DIR}/tfiles/114/${example_name}.ddl ${PROJECT_BINARY_DIR}/${example_name}.ddl # ) #endif () - #if (HDF5_VERSION_MAJOR VERSION_GREATER_EQUAL "1.16") + #if (HDF5_VERSION_MAJOR VERSION_GREATER_EQUAL "2.0") # add_custom_command ( # TARGET ${EXAMPLE_VARNAME}_f90_${example_name} # POST_BUILD # COMMAND ${CMAKE_COMMAND} - # ARGS -E copy_if_different ${PROJECT_SOURCE_DIR}/tfiles/116/${example_name}.ddl ${PROJECT_BINARY_DIR}/${example_name}.ddl + # ARGS -E copy_if_different ${PROJECT_SOURCE_DIR}/tfiles/200/${example_name}.ddl ${PROJECT_BINARY_DIR}/${example_name}.ddl # ) #endif () endif () @@ -231,7 +231,7 @@ if (HDF5_BUILD_TOOLS) # endforeach () # foreach (example_name ${1_14_examples}) # endforeach () -# foreach (example_name ${1_16_examples}) +# foreach (example_name ${2_0_examples}) # endforeach () endif () endif () diff --git a/HDF5Examples/FORTRAN/H5G/CMakeLists.txt b/HDF5Examples/FORTRAN/H5G/CMakeLists.txt index 6a58c5258ab..ec93540201b 100644 --- a/HDF5Examples/FORTRAN/H5G/CMakeLists.txt +++ b/HDF5Examples/FORTRAN/H5G/CMakeLists.txt @@ -28,7 +28,7 @@ foreach (example_name ${common_examples}) "$<$:-DH5_USE_110_API>" "$<$:-DH5_USE_112_API>" "$<$:-DH5_USE_114_API>" - "$<$:-DH5_USE_116_API>" + "$<$:-DH5_USE_200_API>" ) if (H5_HAVE_PARALLEL) target_include_directories (${EXAMPLE_VARNAME}_f90_${example_name} PUBLIC ${MPI_Fortran_INCLUDE_DIRS}) @@ -57,7 +57,7 @@ endforeach () # "$<$:-DH5_USE_110_API>" # "$<$:-DH5_USE_112_API>" # "$<$:-DH5_USE_114_API>" -# "$<$:-DH5_USE_116_API>" +# "$<$:-DH5_USE_200_API>" # ) # if (H5_HAVE_PARALLEL) # target_include_directories (${EXAMPLE_VARNAME}_f90_${example_name} PUBLIC ${MPI_C_INCLUDE_DIRS}) @@ -110,14 +110,14 @@ endforeach () # endif () # endforeach () #endif () -#if (HDF5_VERSION_MAJOR VERSION_GREATER_EQUAL "1.16") -# foreach (example_name ${1_16_examples}) +#if (HDF5_VERSION_MAJOR VERSION_GREATER_EQUAL "2.0") +# foreach (example_name ${2_0_examples}) # if (H5EX_BUILD_TESTING) # add_custom_command ( # TARGET ${EXAMPLE_VARNAME}_f90_${example_name} # POST_BUILD # COMMAND ${CMAKE_COMMAND} -# ARGS -E copy_if_different ${PROJECT_SOURCE_DIR}/tfiles/116/${example_name}.tst ${PROJECT_BINARY_DIR}/${example_name}.tst +# ARGS -E copy_if_different ${PROJECT_SOURCE_DIR}/tfiles/200/${example_name}.tst ${PROJECT_BINARY_DIR}/${example_name}.tst # ) # endif () # endforeach () @@ -165,7 +165,7 @@ endif () # endforeach () # foreach (example_name ${1_14_examples}) # endforeach () -# foreach (example_name ${1_16_examples}) +# foreach (example_name ${2_0_examples}) # endforeach () #endif () diff --git a/HDF5Examples/FORTRAN/H5PAR/CMakeLists.txt b/HDF5Examples/FORTRAN/H5PAR/CMakeLists.txt index e1d147d434c..f0af9764a31 100644 --- a/HDF5Examples/FORTRAN/H5PAR/CMakeLists.txt +++ b/HDF5Examples/FORTRAN/H5PAR/CMakeLists.txt @@ -28,7 +28,7 @@ foreach (example_name ${examples}) "$<$:-DH5_USE_110_API>" "$<$:-DH5_USE_112_API>" "$<$:-DH5_USE_114_API>" - "$<$:-DH5_USE_116_API>" + "$<$:-DH5_USE_200_API>" ) target_include_directories (${EXAMPLE_VARNAME}_f90_${example_name} PUBLIC ${MPI_Fortran_INCLUDE_DIRS}) target_link_libraries (${EXAMPLE_VARNAME}_f90_${example_name} ${H5EX_LINK_Fortran_LIBS}) diff --git a/HDF5Examples/FORTRAN/H5T/CMakeLists.txt b/HDF5Examples/FORTRAN/H5T/CMakeLists.txt index 14fd8528664..da887a27a43 100644 --- a/HDF5Examples/FORTRAN/H5T/CMakeLists.txt +++ b/HDF5Examples/FORTRAN/H5T/CMakeLists.txt @@ -23,7 +23,7 @@ include (Fortran_sourcefiles.cmake) "$<$:-DH5_USE_110_API>" "$<$:-DH5_USE_112_API>" "$<$:-DH5_USE_114_API>" - "$<$:-DH5_USE_116_API>" + "$<$:-DH5_USE_200_API>" ) if (H5_HAVE_PARALLEL) target_include_directories (${EXAMPLE_VARNAME}_f90_${example_name} PUBLIC ${MPI_Fortran_INCLUDE_DIRS}) @@ -50,7 +50,7 @@ foreach (example_name ${common_examples}) "$<$:-DH5_USE_110_API>" "$<$:-DH5_USE_112_API>" "$<$:-DH5_USE_114_API>" - "$<$:-DH5_USE_116_API>" + "$<$:-DH5_USE_200_API>" ) if (H5_HAVE_PARALLEL) target_include_directories (${EXAMPLE_VARNAME}_f90_${example_name} PUBLIC ${MPI_Fortran_INCLUDE_DIRS}) @@ -103,14 +103,14 @@ endforeach () # endif () # endforeach () #endif () -#if (HDF5_VERSION_MAJOR VERSION_GREATER_EQUAL "1.16") -# foreach (example_name ${1_16_examples}) +#if (HDF5_VERSION_MAJOR VERSION_GREATER_EQUAL "2.0") +# foreach (example_name ${2_0_examples}) # if (H5EX_BUILD_TESTING) # add_custom_command ( # TARGET ${EXAMPLE_VARNAME}_f90_${example_name} # POST_BUILD # COMMAND ${CMAKE_COMMAND} -# ARGS -E copy_if_different ${PROJECT_SOURCE_DIR}/tfiles/116/${example_name}.tst ${PROJECT_BINARY_DIR}/${example_name}.tst +# ARGS -E copy_if_different ${PROJECT_SOURCE_DIR}/tfiles/200/${example_name}.tst ${PROJECT_BINARY_DIR}/${example_name}.tst # ) # endif () # endforeach () @@ -280,12 +280,12 @@ if (HDF5_BUILD_TOOLS) # ARGS -E copy_if_different ${PROJECT_SOURCE_DIR}/tfiles/114/${example_name}.ddl ${PROJECT_BINARY_DIR}/${example_name}.ddl # ) #endif () - #if (HDF5_VERSION_MAJOR VERSION_GREATER_EQUAL "1.16") + #if (HDF5_VERSION_MAJOR VERSION_GREATER_EQUAL "2.0") # add_custom_command ( # TARGET ${EXAMPLE_VARNAME}_f90_${example_name} # POST_BUILD # COMMAND ${CMAKE_COMMAND} - # ARGS -E copy_if_different ${PROJECT_SOURCE_DIR}/tfiles/116/${example_name}.ddl ${PROJECT_BINARY_DIR}/${example_name}.ddl + # ARGS -E copy_if_different ${PROJECT_SOURCE_DIR}/tfiles/200/${example_name}.ddl ${PROJECT_BINARY_DIR}/${example_name}.ddl # ) #endif () # endforeach () @@ -293,7 +293,7 @@ if (HDF5_BUILD_TOOLS) # endforeach () # foreach (example_name ${1_14_examples}) # endforeach () -# foreach (example_name ${1_16_examples}) +# foreach (example_name ${2_0_examples}) # endforeach () endif () diff --git a/HDF5Examples/FORTRAN/TUTR/CMakeLists.txt b/HDF5Examples/FORTRAN/TUTR/CMakeLists.txt index 7c5b2189838..7e6d815a7a8 100644 --- a/HDF5Examples/FORTRAN/TUTR/CMakeLists.txt +++ b/HDF5Examples/FORTRAN/TUTR/CMakeLists.txt @@ -23,7 +23,7 @@ include (Fortran_sourcefiles.cmake) "$<$:-DH5_USE_110_API>" "$<$:-DH5_USE_112_API>" "$<$:-DH5_USE_114_API>" - "$<$:-DH5_USE_116_API>" + "$<$:-DH5_USE_200_API>" ) if (H5_HAVE_PARALLEL) target_include_directories (${EXAMPLE_VARNAME}_f90_tutr_${example_name} PUBLIC ${MPI_Fortran_INCLUDE_DIRS}) @@ -42,7 +42,7 @@ foreach (example_name ${common_examples}) "$<$:-DH5_USE_110_API>" "$<$:-DH5_USE_112_API>" "$<$:-DH5_USE_114_API>" - "$<$:-DH5_USE_116_API>" + "$<$:-DH5_USE_200_API>" ) if (H5_HAVE_PARALLEL) target_include_directories (${EXAMPLE_VARNAME}_f90_tutr_${example_name} PUBLIC ${MPI_Fortran_INCLUDE_DIRS}) diff --git a/HDF5Examples/config/cmake/HDFExampleMacros.cmake b/HDF5Examples/config/cmake/HDFExampleMacros.cmake index b4a5b36b1de..a1dd08b521f 100644 --- a/HDF5Examples/config/cmake/HDFExampleMacros.cmake +++ b/HDF5Examples/config/cmake/HDFExampleMacros.cmake @@ -356,10 +356,10 @@ macro (APIVersion version xyapi) endif () #----------------------------------------------------------------------------- - # Option to use 1.16.x API + # Option to use 2.0.x API #----------------------------------------------------------------------------- - option (${EXAMPLE_VARNAME}_USE_116_API "Use the HDF5 1.16.x API" OFF) - if (${EXAMPLE_VARNAME}_USE_116_API AND ${xyapi} GREATER 116) - set (${xyapi} "116") + option (${EXAMPLE_VARNAME}_USE_200_API "Use the HDF5 2.x.y API" OFF) + if (${EXAMPLE_VARNAME}_USE_200_API AND ${xyapi} GREATER 200) + set (${xyapi} "200") endif () endmacro () diff --git a/bin/make_vers b/bin/make_vers index fe1cc08cf57..ba335cae27e 100755 --- a/bin/make_vers +++ b/bin/make_vers @@ -8,7 +8,7 @@ use warnings; # is added (like support for 1.4, etc), the min_sup_idx parameter will # need to be decremented.) -# Max. library "index" (0 = v1.0, 1 = 1.2, 2 = 1.4, 3 = 1.6, 4 = 1.8, 5 = 1.10, 6 = 1.12, 7 = 1.14, 8 = 1.16, etc) +# Max. library "index" (0 = v1.0, 1 = 1.2, 2 = 1.4, 3 = 1.6, 4 = 1.8, 5 = 1.10, 6 = 1.12, 7 = 1.14, 8 = 2.0, etc) $max_idx = 8; # Min. supported previous library version "index" (0 = v1.0, 1 = 1.2, etc) diff --git a/bin/restore.sh b/bin/restore.sh index 3709fda6c03..3aab8e892d8 100755 --- a/bin/restore.sh +++ b/bin/restore.sh @@ -51,18 +51,6 @@ rm -f bin/depcomp echo "Remove files generated by autoheader" rm -f src/H5config.h.in -echo "Remove files generated by bin/make_err" -rm -f src/H5Epubgen.h -rm -f src/H5Einit.h -rm -f src/H5Eterm.h -rm -f src/H5Edefin.h - -echo "Remove files generated by bin/make_vers" -rm -f src/H5version.h - -echo "Remove files generated by bin/make_overflow" -rm -f src/H5overflow.h - echo "Remove remaining generated files" rm -f aclocal.m4 diff --git a/c++/src/H5DcreatProp.cpp b/c++/src/H5DcreatProp.cpp index 54ccea00bcb..250413c6d73 100644 --- a/c++/src/H5DcreatProp.cpp +++ b/c++/src/H5DcreatProp.cpp @@ -649,7 +649,7 @@ DSetCreatPropList::setFletcher32() const /// which is a 32-bit signed long value on Windows, which limited /// the valid offset that can be set to 2 GiB. /// -///\version 1.16.0 \p offset parameter type changed to HDoff_t from off_t. +///\version 2.0.0 \p offset parameter type changed to HDoff_t from off_t. //-------------------------------------------------------------------------- void DSetCreatPropList::setExternal(const char *name, HDoff_t offset, hsize_t size) const @@ -702,7 +702,7 @@ DSetCreatPropList::getExternalCount() const /// which is a 32-bit signed long value on Windows, which limited /// the valid offset that can be returned to 2 GiB. /// -///\version 1.16.0 \p offset parameter type changed to HDoff_t from off_t. +///\version 2.0.0 \p offset parameter type changed to HDoff_t from off_t. //-------------------------------------------------------------------------- void DSetCreatPropList::getExternal(unsigned idx, size_t name_size, char *name, HDoff_t &offset, diff --git a/c++/src/H5FaccProp.cpp b/c++/src/H5FaccProp.cpp index 82a8d550f02..6949309e6b7 100644 --- a/c++/src/H5FaccProp.cpp +++ b/c++/src/H5FaccProp.cpp @@ -713,8 +713,7 @@ 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_200 /// \li \c H5F_LIBVER_LATEST /// /// Valid values of \a libver_high are as follows: @@ -722,8 +721,7 @@ 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_200 /// \li \c H5F_LIBVER_LATEST (Default) /// /// For more detail, please refer to the H5Pset_libver_bounds API in @@ -755,8 +753,7 @@ 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_200 /// \li \c H5F_LIBVER_LATEST /// /// and \a libver_high: @@ -764,8 +761,7 @@ 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_200 /// \li \c H5F_LIBVER_LATEST //-------------------------------------------------------------------------- void diff --git a/config/cmake/ConfigureChecks.cmake b/config/cmake/ConfigureChecks.cmake index df6c760f0cc..ed53feae60b 100644 --- a/config/cmake/ConfigureChecks.cmake +++ b/config/cmake/ConfigureChecks.cmake @@ -140,7 +140,7 @@ else () set(C_INCLUDE_QUADMATH_H 0) endif () -if (CYGWIN) +if (MINGW OR CYGWIN) set (CMAKE_REQUIRED_DEFINITIONS "${CMAKE_REQUIRED_DEFINITIONS} -D_GNU_SOURCE") add_definitions ("-D_GNU_SOURCE") endif () @@ -399,7 +399,12 @@ endif () #----------------------------------------------------------------------------- # Check for some functions that are used # -CHECK_FUNCTION_EXISTS (alarm ${HDF_PREFIX}_HAVE_ALARM) +if (NOT MINGW) + # alarm(2) support is spotty in MinGW, so assume it doesn't exist + # + # https://lists.gnu.org/archive/html/bug-gnulib/2013-03/msg00040.html + CHECK_FUNCTION_EXISTS (alarm ${HDF_PREFIX}_HAVE_ALARM) +endif () CHECK_FUNCTION_EXISTS (fcntl ${HDF_PREFIX}_HAVE_FCNTL) CHECK_FUNCTION_EXISTS (flock ${HDF_PREFIX}_HAVE_FLOCK) CHECK_FUNCTION_EXISTS (fork ${HDF_PREFIX}_HAVE_FORK) diff --git a/config/cmake/H5pubconf.h.in b/config/cmake/H5pubconf.h.in index a26d7e02261..709b1357383 100644 --- a/config/cmake/H5pubconf.h.in +++ b/config/cmake/H5pubconf.h.in @@ -615,11 +615,8 @@ /* Define using v1.14 public API symbols by default */ #cmakedefine H5_USE_114_API_DEFAULT @H5_USE_114_API_DEFAULT@ -/* 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 using v2.0 public API symbols by default */ +#cmakedefine H5_USE_200_API_DEFAULT @H5_USE_200_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 2b2559e79cd..13b9d2e3a18 100644 --- a/config/cmake/HDF5ExampleCache.cmake +++ b/config/cmake/HDF5ExampleCache.cmake @@ -36,10 +36,8 @@ elseif (HDF5_DEFAULT_API_VERSION MATCHES "v112") set (H5_USE_112_API ON) elseif (HDF5_DEFAULT_API_VERSION MATCHES "v114") set (H5_USE_114_API ON) -elseif (HDF5_DEFAULT_API_VERSION MATCHES "v116") - set (H5_USE_116_API ON) -elseif (HDF5_DEFAULT_API_VERSION MATCHES "v118") - set (H5_USE_118_API ON) +elseif (HDF5_DEFAULT_API_VERSION MATCHES "v200") + set (H5_USE_200_API ON) endif () message (STATUS "HDF5 H5_LIBVER_DIR: ${H5_LIBVER_DIR} HDF5_API_VERSION: ${HDF5_DEFAULT_API_VERSION}") diff --git a/config/cmake/scripts/HDF5config.cmake b/config/cmake/scripts/HDF5config.cmake index 874207a30a8..3da5f0ecd5e 100644 --- a/config/cmake/scripts/HDF5config.cmake +++ b/config/cmake/scripts/HDF5config.cmake @@ -38,15 +38,15 @@ cmake_minimum_required (VERSION 3.18) # CTEST_SOURCE_NAME - source folder ############################################################################## -set (CTEST_SOURCE_VERSION "1.17.0") +set (CTEST_SOURCE_VERSION "2.0.0") set (CTEST_SOURCE_VERSEXT "") ############################################################################## # handle input parameters to script. #BUILD_GENERATOR - which CMake generator to use, required -#INSTALLDIR - HDF5-1.17.x root folder +#INSTALLDIR - HDF5-2.0.x root folder #CTEST_CONFIGURATION_TYPE - Release, Debug, RelWithDebInfo -#CTEST_SOURCE_NAME - name of source folder; HDF5-1.17.x +#CTEST_SOURCE_NAME - name of source folder; HDF5-2.0.x #MODEL - CDash group name #HPC - run alternate configurations for HPC machines; sbatch, bsub, raybsub, qsub #MPI - enable MPI diff --git a/configure.ac b/configure.ac index 76f30618d2c..261d052499a 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.17.0], [help@hdfgroup.org]) +AC_INIT([HDF5], [2.0.0], [help@hdfgroup.org]) AC_CONFIG_SRCDIR([src/H5.c]) AC_CONFIG_HEADERS([src/H5config.h]) @@ -4295,10 +4295,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|v118)], + [AS_HELP_STRING([--with-default-api-version=(default|v16|v18|v110|v112|v114|v200)], [Specify default release version of public symbols - [default=v118]])],, - [withval=v118]) + [default=v200]])],, + [withval=v200]) ## Allowing "default" allows the GitHub CI to check that we didn't forget ## to change the defaults when creating a new major version @@ -4327,16 +4327,11 @@ 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"; then - AC_MSG_RESULT([v116]) - 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]) +elif test "X$withval" = "Xv200" -o "X$withval" = "Xdefault"; then + AC_MSG_RESULT([v200]) + DEFAULT_API_VERSION=v200 + AC_DEFINE([USE_200_API_DEFAULT], [1], + [Define using v2.0 public API symbols by default]) else AC_MSG_ERROR([invalid version of public symbols given]) fi @@ -4346,7 +4341,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}" != "Xv118" -a "X${DEPRECATED_SYMBOLS}" = "Xno" ; then + if test "X${DEFAULT_API_VERSION}" != "Xv200" -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 b560184618a..37706118a3e 100644 --- a/fortran/src/H5_f.c +++ b/fortran/src/H5_f.c @@ -539,8 +539,7 @@ h5init_flags_c(int_f *h5d_flags, size_t_f *h5d_size_flags, int_f *h5e_flags, hid h5f_flags[27] = (int_f)H5F_LIBVER_V110; 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; + h5f_flags[30] = (int_f)H5F_LIBVER_V200; /* * H5FD flags diff --git a/fortran/src/H5_ff.F90 b/fortran/src/H5_ff.F90 index 847d649e6fe..79c3cbcd3d9 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 = 32 + INTEGER, PARAMETER :: H5F_FLAGS_LEN = 31 INTEGER, DIMENSION(1:H5F_FLAGS_LEN) :: H5F_flags ! ! H5generic flags declaration @@ -379,8 +379,7 @@ END FUNCTION h5init1_flags_c H5F_LIBVER_V110_F = H5F_flags(28) 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) + H5F_LIBVER_V200_F = H5F_flags(31) ! ! H5generic flags ! diff --git a/fortran/src/H5f90global.F90 b/fortran/src/H5f90global.F90 index 223f8dddf72..9c973126290 100644 --- a/fortran/src/H5f90global.F90 +++ b/fortran/src/H5f90global.F90 @@ -236,8 +236,7 @@ MODULE H5GLOBAL !DEC$ATTRIBUTES DLLEXPORT :: H5F_LIBVER_V110_F !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_LIBVER_V200_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,8 +270,7 @@ MODULE H5GLOBAL INTEGER :: H5F_LIBVER_V110_F !< H5F_LIBVER_V110 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_LIBVER_V200_F !< H5F_LIBVER_V200 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 6611187c8ce..8dd76eb2958 100644 --- a/fortran/test/tH5P_F03.F90 +++ b/fortran/test/tH5P_F03.F90 @@ -228,19 +228,12 @@ SUBROUTINE test_create(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_V116_F, H5F_LIBVER_V116_F, error) + CALL h5pset_libver_bounds_f(fapl, H5F_LIBVER_V200_F, H5F_LIBVER_V200_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_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 VERIFY("***ERROR: Returned wrong low libver_bounds", low, H5F_LIBVER_V200_F, total_error) + CALL VERIFY("***ERROR: Returned wrong high libver_bounds", high, H5F_LIBVER_V200_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) diff --git a/hl/src/H5TB.c b/hl/src/H5TB.c index 842e52b9e69..f94dc26cc5c 100644 --- a/hl/src/H5TB.c +++ b/hl/src/H5TB.c @@ -3185,7 +3185,7 @@ H5TB_create_type(hid_t loc_id, const char *dset_name, size_t type_size, const si if (H5TBget_table_info(loc_id, dset_name, &nfields, NULL) < 0) goto out; - if (NULL == (fnames = (char **)calloc(sizeof(char *), (size_t)nfields))) + if (NULL == (fnames = (char **)calloc((size_t)nfields, sizeof(char *)))) goto out; for (i = 0; i < nfields; i++) diff --git a/java/src/hdf/hdf5lib/H5.java b/java/src/hdf/hdf5lib/H5.java index c2b1c3c009f..53350eb7a87 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.17.0
+ * @version HDF5 2.0.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, 17, 0}; + public final static int LIB_VERSION[] = {2, 0, 0}; /** * @ingroup JH5 diff --git a/java/src/hdf/hdf5lib/HDF5Constants.java b/java/src/hdf/hdf5lib/HDF5Constants.java index 564e2a617d1..acc6d7d7b18 100644 --- a/java/src/hdf/hdf5lib/HDF5Constants.java +++ b/java/src/hdf/hdf5lib/HDF5Constants.java @@ -573,9 +573,7 @@ public class HDF5Constants { /** */ public static final int H5F_LIBVER_V114 = H5F_LIBVER_V114(); /** */ - 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_V200 = H5F_LIBVER_V200(); /** */ public static final int H5F_LIBVER_NBOUNDS = H5F_LIBVER_NBOUNDS(); /** */ @@ -2060,9 +2058,7 @@ public class HDF5Constants { private static native final int H5F_LIBVER_V114(); - private static native final int H5F_LIBVER_V116(); - - private static native final int H5F_LIBVER_V118(); + private static native final int H5F_LIBVER_V200(); private static native final int H5F_LIBVER_NBOUNDS(); diff --git a/java/src/jni/h5Constants.c b/java/src/jni/h5Constants.c index 8a39513695b..984ed937967 100644 --- a/java/src/jni/h5Constants.c +++ b/java/src/jni/h5Constants.c @@ -1304,14 +1304,9 @@ Java_hdf_hdf5lib_HDF5Constants_H5F_1LIBVER_1V114(JNIEnv *env, jclass cls) return H5F_LIBVER_V114; } JNIEXPORT jint JNICALL -Java_hdf_hdf5lib_HDF5Constants_H5F_1LIBVER_1V116(JNIEnv *env, jclass cls) +Java_hdf_hdf5lib_HDF5Constants_H5F_1LIBVER_1V200(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; + return H5F_LIBVER_V200; } JNIEXPORT jint JNICALL Java_hdf_hdf5lib_HDF5Constants_H5F_1LIBVER_1NBOUNDS(JNIEnv *env, jclass cls) diff --git a/java/test/TestH5.java b/java/test/TestH5.java index b9252569132..eed2f0efe5d 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, 17, 0}; + int libversion[] = {2, 0, 0}; try { H5.H5get_libversion(libversion); @@ -322,11 +322,8 @@ public void testH5get_libversion() fail("H5.H5get_libversion: " + err); } - for (int i = 0; i < 2; i++) + for (int i = 0; i < 3; i++) assertEquals(H5.LIB_VERSION[i], libversion[i]); - - for (int i = 0; i < 2; i++) - assertFalse(libversion[i] == 0); } /** @@ -354,7 +351,7 @@ public void testH5get_libversion_null_param() @Test public void testH5check_version() { - int majnum = 1, minnum = 17, relnum = 0; + int majnum = 2, minnum = 0, relnum = 0; try { H5.H5check_version(majnum, minnum, relnum); diff --git a/release_docs/HISTORY-1_14_0-1_16_0.txt b/release_docs/HISTORY-1_14_0-2_0_0.txt similarity index 100% rename from release_docs/HISTORY-1_14_0-1_16_0.txt rename to release_docs/HISTORY-1_14_0-2_0_0.txt diff --git a/release_docs/INSTALL_Autotools.txt b/release_docs/INSTALL_Autotools.txt index 7af167680f9..7335ce5b156 100644 --- a/release_docs/INSTALL_Autotools.txt +++ b/release_docs/INSTALL_Autotools.txt @@ -27,10 +27,10 @@ Obtaining HDF5 source code 2. Obtain HDF5 source from Github development branch: https://github.com/HDFGroup/hdf5 last release: https://github.com/HDFGroup/hdf5/releases/latest - hdf5-1_17_"X".tar.gz or hdf5-1_17_"X".zip + hdf5-2_"X"_"Y".tar.gz or hdf5-2_"X"_"Y".zip and put it in "myhdfstuff". - Uncompress the file. There should be a hdf5-1.17."X" folder. + Uncompress the file. There should be a hdf5-2."X"."Y" folder. ======================================================================== @@ -47,16 +47,16 @@ Before You Start: 2. Optional: Install the Szip version 2.1 library (you may use Szip 2.0 binaries). - 3. Extract the source from the hdf5-X.Y.Z.tar file and change - directory to hdf5-X.Y.Z. + 3. Extract the source from the hdf5-2.X.Y.tar file and change + directory to hdf5-2.X.Y. 4. Quick installation For those who don't like to read ;-) the following steps can be used to configure, build, test, and install the HDF5 library, header files, - and support programs. For example, to install HDF5 version X.Y.Z at + and support programs. For example, to install HDF5 version 2.X.Y at location /usr/local/hdf5, use the following steps. - $ cd hdf5-X.Y.Z + $ cd hdf5-2.X.Y $ ./configure --prefix=/usr/local/hdf5 $ make $ make check # run test suite. @@ -81,23 +81,23 @@ III. Full installation instructions for source distributions 1. 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-X.Y.Z' directory, where X.Y.Z is the HDF5 version numbers. + 'hdf5-2.X.Y' directory, where 2.X.Y is the HDF5 version numbers. 1.1. Non-compressed tar archive (*.tar) - $ tar xf hdf5-X.Y.Z.tar + $ tar xf hdf5-2.X.Y.tar 1.2. Gzip'd tar archive (*.tar.gz) - $ gunzip < hdf5-X.Y.Z.tar.gz | tar xf - + $ gunzip < hdf5-2.X.Y.tar.gz | tar xf - Or - $ tar zxf hdf5-X.Y.Z.tar.gz + $ tar zxf hdf5-2.X.Y.tar.gz 1.3. Bzip'd tar archive (*.tar.bz2) - $ bunzip2 < hdf5-X.Y.Z.tar.bz2 | tar xf - + $ bunzip2 < hdf5-2.X.Y.tar.bz2 | tar xf - Or - $ tar jxf hdf5-X.Y.Z.tar.bz2 + $ tar jxf hdf5-2.X.Y.tar.bz2 2. Source versus build directories On most systems the build can occur in a directory other than the @@ -108,7 +108,7 @@ III. Full installation instructions for source distributions details are below). For example, $ mkdir built-fortran $ cd build-fortran - $ ../hdf5-X.Y.Z/configure --enable-fortran ... + $ ../hdf5-2.X.Y/configure --enable-fortran ... 3. Configuring @@ -360,10 +360,8 @@ III. Full installation instructions for source distributions --enable-hl, --enable-cxx, --enable-fortran, --enable-java 3.11. Backward compatibility - The 1.17 version of the HDF5 library can be configured to operate - identically to the v1.16 library with the - --with-default-api-version=v116 - configure flag, or identically to the v1.14 library with the + The 2.0.0 version of the HDF5 library can be configured to operate + identically to the v1.14 library with the --with-default-api-version=v114 configure flag, or identically to the v1.12 library with the --with-default-api-version=v112 @@ -374,7 +372,7 @@ III. Full installation instructions for source distributions 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.17 library without requiring immediate changes to the application + v2.0 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 a9302c35fe3..9a83170854e 100644 --- a/release_docs/INSTALL_CMake.txt +++ b/release_docs/INSTALL_CMake.txt @@ -29,15 +29,15 @@ Obtaining HDF5 source code 2. Obtain HDF5 source from Github development branch: https://github.com/HDFGroup/hdf5 last release: https://github.com/HDFGroup/hdf5/releases/latest - hdf5-1_15_"X".tar.gz or hdf5-1_15_"X".zip + hdf5-2_"X"_"Y".tar.gz or hdf5-2_"X"_"Y".zip and put it in "myhdfstuff". - Uncompress the file. There should be a hdf5-1.17."X" folder. + Uncompress the file. There should be a hdf5-2."X"."Y" folder. CMake version 1. We suggest you obtain the latest CMake from the Kitware web site. - The HDF5 1.17."X" product requires a minimum CMake version 3.18, - where "X" is the current HDF5 release version. If you are using + The HDF5 2."X"."Y" product requires a minimum CMake version 3.18, + where "X"."Y" is the current HDF5 release version. If you are using VS2022, the minimum version is 3.21. Note: @@ -85,7 +85,7 @@ To build HDF5 with the SZIP and ZLIB external libraries you will need to: 2. Download/copy the individual files mentioned above to "myhdfstuff". Do not uncompress the tar.gz files. - 3. Change to the source directory "hdf5-1.17.x". + 3. Change to the source directory "hdf5-2.x.y". CTestScript.cmake file should not be modified. 4. Edit the platform configuration file, HDF5options.cmake, if you want to change @@ -113,7 +113,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.17.NN-. + HDF5-2.X.Y-. On Unix, will be "Linux". A similar .sh file will also be created. On Windows, will be "win64" or "win32". If you have an @@ -134,13 +134,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.17."X"-win32.msi or HDF5-1.17."X"-win64.msi + HDF5-2."X"."Y"-win32.msi or HDF5-2."X"."Y"-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.17."X" + ----2."X"."Y" ------bin ------include ------lib @@ -149,29 +149,29 @@ 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: - /myhdfstuff/HDF5-1.17."X"-Linux.sh + /myhdfstuff/HDF5-2."X"."Y"-Linux.sh After accepting the license, the script will prompt: By default the HDF5 will be installed in: - "/HDF5-1.17."X"-Linux" - Do you want to include the subdirectory HDF5-1.17."X"-Linux? + "/HDF5-2."X"."Y"-Linux" + Do you want to include the subdirectory HDF5-2."X"."Y"-Linux? Saying no will install in: "" [Yn]: Note that the script will create the following directory structure relative to the install point: HDF_Group --HDF5 - ----1.17."X" + ----2."X"."Y" ------bin ------include ------lib --------plugins ------share - On Mac you will find HDF5-1.17."X"-Darwin.dmg in the myhdfstuff folder. Click + On Mac you will find HDF5-2."X"."Y"-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.17."X" + ----2."X"."Y" ------bin ------include ------lib @@ -179,12 +179,12 @@ To build HDF5 with the SZIP and ZLIB external libraries you will need to: ------share By default the installation will create the bin, include, lib and cmake - folders in the /HDF_Group/HDF5/1.17."X" + folders in the /HDF_Group/HDF5/2."X"."Y" The depends on the build platform; Windows will set the default to: - C:/Program Files/HDF_Group/HDF5/1.17."X" + C:/Program Files/HDF_Group/HDF5/2."X"."Y" Linux will set the default to: - "myhdfstuff/HDF_Group/HDF5/1.17."X" + "myhdfstuff/HDF_Group/HDF5/2."X"."Y" The default can be changed by adding ",INSTALLDIR=" 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 @@ -211,13 +211,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 16 2019" -A Win32 -DCMAKE_BUILD_TYPE:STRING=Release -DBUILD_SHARED_LIBS:BOOL=OFF -DBUILD_TESTING:BOOL=ON -DHDF5_BUILD_TOOLS:BOOL=ON ..\hdf5-1.17."X" + cmake -G "Visual Studio 16 2019" -A Win32 -DCMAKE_BUILD_TYPE:STRING=Release -DBUILD_SHARED_LIBS:BOOL=OFF -DBUILD_TESTING:BOOL=ON -DHDF5_BUILD_TOOLS:BOOL=ON ..\hdf5-2."X"."Y" On Windows 64 bit - cmake -G "Visual Studio 16 2019" -A x64 -DCMAKE_BUILD_TYPE:STRING=Release -DBUILD_SHARED_LIBS:BOOL=OFF -DBUILD_TESTING:BOOL=ON -DHDF5_BUILD_TOOLS:BOOL=ON ..\hdf5-1.17."X" + cmake -G "Visual Studio 16 2019" -A x64 -DCMAKE_BUILD_TYPE:STRING=Release -DBUILD_SHARED_LIBS:BOOL=OFF -DBUILD_TESTING:BOOL=ON -DHDF5_BUILD_TOOLS:BOOL=ON ..\hdf5-2."X"."Y" 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.17."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-2."X"."Y" where "X" is the current release version. @@ -232,13 +232,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.17."X"-win32.msi or HDF5-1.17."X"-win64.msi + HDF5-2."X"."Y"-win32.msi or HDF5-2."X"."Y"-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.17."X" + ----2."X"."Y" ------bin ------include ------lib @@ -247,29 +247,29 @@ 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: - /myhdfstuff/build/HDF5-1.17."X"-Linux.sh + /myhdfstuff/build/HDF5-2."X"."Y"-Linux.sh After accepting the license, the script will prompt: By default the HDF5 will be installed in: - "/HDF5-1.17."X"-Linux" - Do you want to include the subdirectory HDF5-1.17."X"-Linux? + "/HDF5-2."X"."Y"-Linux" + Do you want to include the subdirectory HDF5-2."X"."Y"-Linux? Saying no will install in: "" [Yn]: Note that the script will create the following directory structure relative to the install point: HDF_Group --HDF5 - ----1.17."X" + ----2."X"."Y" ------bin ------include ------lib --------plugins ------share - On Mac you will find HDF5-1.17."X"-Darwin.dmg in the build folder. Click + On Mac you will find HDF5-2."X"."Y"-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.17."X" + ----2."X"."Y" ------bin ------include ------lib @@ -282,7 +282,7 @@ IV. Further considerations ======================================================================== 1. We suggest you obtain the latest CMake for windows from the Kitware - web site. The HDF5 1.17."X" product requires a minimum CMake version 3.18. + web site. The HDF5 2."X"."Y" product requires a minimum CMake version 3.18. If you are using VS2022, the CMake minimum version is 3.21. 2. If you plan to use Zlib or Szip: @@ -889,7 +889,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 -HDF5_DEFAULT_API_VERSION "Enable default API (v16, v18, v110, v112, v114, v116, v118)" "v118" +HDF5_DEFAULT_API_VERSION "Enable default API (v16, v18, v110, v112, v114, v200)" "v200" 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/release_docs/INSTALL_Cygwin.txt b/release_docs/INSTALL_Cygwin.txt index 0c61f95ce48..208a2d836eb 100644 --- a/release_docs/INSTALL_Cygwin.txt +++ b/release_docs/INSTALL_Cygwin.txt @@ -94,19 +94,19 @@ Build, Test and Install HDF5 on Cygwin 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.17.x' directory. + an `hdf5-2.0.x' directory. 2.1 Non-compressed tar archive (*.tar) - $ tar xf hdf5-1.17.x.tar + $ tar xf hdf5-2.0.x.tar 2.2 Gzip'd tar archive (*.tar.gz) - $ gunzip < hdf5-1.17.x.tar.gz | tar xf - + $ gunzip < hdf5-2.0.x.tar.gz | tar xf - 2.3 Bzip'd tar archive (*.tar.bz2) - $ bunzip2 < hdf5-1.17.x.tar.bz2 | tar xf - + $ bunzip2 < hdf5-2.0.x.tar.bz2 | tar xf - 2. Setup Environment diff --git a/release_docs/NEWSLETTER.txt b/release_docs/NEWSLETTER.txt index 9e06758f16d..ede8f8c5428 100644 --- a/release_docs/NEWSLETTER.txt +++ b/release_docs/NEWSLETTER.txt @@ -1,4 +1,4 @@ -HDF5 version 1.17.0 currently under development +HDF5 version 2.0.0 currently under development Features included for the next major release: ---------------------------------------------------------------------------- diff --git a/release_docs/RELEASE.txt b/release_docs/RELEASE.txt index a50a7919395..32280b3b1f9 100644 --- a/release_docs/RELEASE.txt +++ b/release_docs/RELEASE.txt @@ -1,4 +1,4 @@ -HDF5 version 1.17.0 currently under development +HDF5 version 2.0.0 currently under development ================================================================================ @@ -21,7 +21,7 @@ The official HDF5 releases can be obtained from: https://support.hdfgroup.org/downloads/index.html -Changes from Release to Release and New Features in the HDF5-1.16.x release series +Changes from Release to Release and New Features in the HDF5-2.x.y release series can be found at: https://support.hdfgroup.org/releases/hdf5/documentation/release_specific_info.md @@ -36,7 +36,7 @@ CONTENTS - New Features - Support for new platforms and languages -- Bug Fixes since HDF5-1.16.0 +- Bug Fixes since HDF5-2.0.0 - Platforms Tested - Known Problems - CMake vs. Autotools installations @@ -62,6 +62,18 @@ New Features The following API routines support concurrent multithreaded operation: + - Added support for MinGW + MSYS2 when building with CMake + + We previously added support for this to the Autotools and the appropriate + configure-time checks have been added to CMake. + + CMake + MinGW + MSYS2 is now tested with the following environments: + + * mingw32 + * mingw64 + * ucrt64 + * clang64 + - Added CMake build mode flags to the libhdf5.settings file Flags from the CMake build mode (e.g., optimization) are not a part of @@ -230,7 +242,7 @@ Support for new platforms, languages and compilers ================================================== - -Bug Fixes since HDF5-1.16.0 release +Bug Fixes since HDF5-2.0.0 release =================================== Library ------- diff --git a/release_docs/RELEASE_PROCESS.md b/release_docs/RELEASE_PROCESS.md index 8f54d9b9be2..a57a1dbe904 100644 --- a/release_docs/RELEASE_PROCESS.md +++ b/release_docs/RELEASE_PROCESS.md @@ -216,5 +216,5 @@ For more information on the HDF5 versioning and backward and forward compatibili [u11]: https://github.com/HDFGroup/hdf5/blob/develop/src/CMakeLists.txt [u12]: https://github.com/HDFGroup/hdf5/blob/develop/configure.ac [u13]: https://hdfgroup.github.io/hdf5/develop/api-compat-macros.html -[u14]: https://github.com/HDFGroup/hdf5/releases/tag/snapshot-1.16 +[u14]: https://github.com/HDFGroup/hdf5/releases/tag/snapshot-2.0.0 [u15]: https://github.com/HDFGroup/hdf5/releases/tag/snapshot diff --git a/release_docs/USING_CMake_Examples.txt b/release_docs/USING_CMake_Examples.txt index 956f9ec16d7..bace5f1e83c 100644 --- a/release_docs/USING_CMake_Examples.txt +++ b/release_docs/USING_CMake_Examples.txt @@ -21,7 +21,7 @@ I. Preconditions ======================================================================== 1. We suggest you obtain the latest CMake for your platform from the Kitware - web site. The HDF5 1.17.x product requires a minimum CMake version + web site. The HDF5 2.0.x product requires a minimum CMake version of 3.18. If you are using VS2022, the minimum CMake version is 3.21. 2. You have installed the HDF5 library built with CMake, by executing diff --git a/release_docs/USING_HDF5_CMake.txt b/release_docs/USING_HDF5_CMake.txt index 8ff240ded25..12fdabdd5f0 100644 --- a/release_docs/USING_HDF5_CMake.txt +++ b/release_docs/USING_HDF5_CMake.txt @@ -38,7 +38,7 @@ I. Preconditions ======================================================================== 1. We suggest you obtain the latest CMake for your platform from the Kitware - web site. The HDF5 1.17.x product requires a minimum CMake version + web site. The HDF5 2.0.x product requires a minimum CMake version of 3.18. If you are using VS2022, the minimum CMake version is 3.21. 2. You have installed the HDF5 library built with CMake, by executing @@ -50,24 +50,24 @@ I. Preconditions or environment variable, set(ENV{HDF5_ROOT} "") to the installed location of HDF5. On Windows: - HDF5_ROOT=C:/Program Files/HDF_Group/HDF5/1.17.x/ + HDF5_ROOT=C:/Program Files/HDF_Group/HDF5/2.0.x/ On unix: - HDF5_ROOT=/HDF_Group/HDF5/1.17.x/ + HDF5_ROOT=/HDF_Group/HDF5/2.0.x/ If you are using shared libraries, you may need to add to the path environment variable. Set the path environment variable to the installed location of the library files for HDF5. On Windows (*.dll): - PATH=%PATH%;C:/Program Files/HDF_Group/HDF5/1.17.x/bin + PATH=%PATH%;C:/Program Files/HDF_Group/HDF5/2.0.x/bin On unix (*.so): - LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/HDF_Group/HDF5/1.17.x/lib + LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/HDF_Group/HDF5/2.0.x/lib If you are using filter plugin libraries, you will need to set the HDF5_PLUGIN_PATH environment variable. On Windows: - HDF5_PLUGIN_PATH=C:/Program Files/HDF_Group/HDF5/1.17.x/lib/plugin + HDF5_PLUGIN_PATH=C:/Program Files/HDF_Group/HDF5/2.0.x/lib/plugin On unix: - HDF5_PLUGIN_PATH=/HDF_Group/HDF5/1.17.x/lib/plugin + HDF5_PLUGIN_PATH=/HDF_Group/HDF5/2.0.x/lib/plugin (Note there are no quote characters used on Windows and all platforms use forward slashes) diff --git a/release_docs/USING_HDF5_VS.txt b/release_docs/USING_HDF5_VS.txt index f13cdfadc2a..dc19272406b 100644 --- a/release_docs/USING_HDF5_VS.txt +++ b/release_docs/USING_HDF5_VS.txt @@ -62,11 +62,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.17.x\include) + header path (i.e. c:\Program Files\HDF_Group\HDF5\2.0.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.17.x\lib) + library path (i.e. c:\Program Files\HDF_Group\HDF5\2.0.x\lib) to the library directories. 2.4 If using Fortran libraries, you will also need to setup the path diff --git a/src/H5.c b/src/H5.c index e0982ad8a94..5d52bda8400 100644 --- a/src/H5.c +++ b/src/H5.c @@ -109,7 +109,7 @@ H5__init_package(void) { herr_t ret_value = SUCCEED; /* Return value */ - FUNC_ENTER_NOAPI_NOINIT + FUNC_ENTER_PACKAGE /* Run the library initialization routine, if it hasn't already ran */ if (!H5_INIT_GLOBAL && !H5_TERM_GLOBAL) diff --git a/src/H5Aint.c b/src/H5Aint.c index 33e6aabb574..bc62b7792a3 100644 --- a/src/H5Aint.c +++ b/src/H5Aint.c @@ -98,8 +98,7 @@ const unsigned H5O_attr_ver_bounds[] = { H5O_ATTR_VERSION_3, /* H5F_LIBVER_V110 */ 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_3, /* H5F_LIBVER_V200 */ H5O_ATTR_VERSION_LATEST /* H5F_LIBVER_LATEST */ }; @@ -1995,7 +1994,7 @@ H5A__get_ainfo(H5F_t *f, H5O_t *oh, H5O_ainfo_t *ainfo) H5B2_t *bt2_name = NULL; /* v2 B-tree handle for name index */ htri_t ret_value = FAIL; /* Return value */ - FUNC_ENTER_NOAPI_TAG(oh->cache_info.addr, FAIL) + FUNC_ENTER_PACKAGE_TAG(oh->cache_info.addr) /* check arguments */ assert(f); diff --git a/src/H5B.c b/src/H5B.c index 9969e08b0c9..d87f8828074 100644 --- a/src/H5B.c +++ b/src/H5B.c @@ -309,6 +309,7 @@ H5B_find(H5F_t *f, const H5B_class_t *type, haddr_t addr, bool *found, void *uda cache_udata.f = f; cache_udata.type = type; cache_udata.rc_shared = rc_shared; + cache_udata.exp_level = H5B_UNKNOWN_NODELEVEL; if (NULL == (bt = (H5B_t *)H5AC_protect(f, H5AC_BT, addr, &cache_udata, H5AC__READ_ONLY_FLAG))) HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to load B-tree node"); @@ -428,6 +429,7 @@ H5B__split(H5F_t *f, H5B_ins_ud_t *bt_ud, unsigned idx, void *udata, H5B_ins_ud_ cache_udata.f = f; cache_udata.type = shared->type; cache_udata.rc_shared = bt_ud->bt->rc_shared; + cache_udata.exp_level = H5B_UNKNOWN_NODELEVEL; if (NULL == (split_bt_ud->bt = (H5B_t *)H5AC_protect(f, H5AC_BT, split_bt_ud->addr, &cache_udata, H5AC__NO_FLAGS_SET))) HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to protect B-tree"); @@ -535,6 +537,7 @@ H5B_insert(H5F_t *f, const H5B_class_t *type, haddr_t addr, void *udata) cache_udata.f = f; cache_udata.type = type; cache_udata.rc_shared = rc_shared; + cache_udata.exp_level = H5B_UNKNOWN_NODELEVEL; bt_ud.addr = addr; if (NULL == (bt_ud.bt = (H5B_t *)H5AC_protect(f, H5AC_BT, addr, &cache_udata, H5AC__NO_FLAGS_SET))) HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to locate root of B-tree"); @@ -792,6 +795,7 @@ H5B__insert_helper(H5F_t *f, H5B_ins_ud_t *bt_ud, const H5B_class_t *type, uint8 cache_udata.f = f; cache_udata.type = type; cache_udata.rc_shared = rc_shared; + cache_udata.exp_level = H5B_UNKNOWN_NODELEVEL; if (0 == bt->nchildren) { /* @@ -1048,7 +1052,8 @@ H5B__insert_helper(H5F_t *f, H5B_ins_ud_t *bt_ud, const H5B_class_t *type, uint8 *------------------------------------------------------------------------- */ static herr_t -H5B__iterate_helper(H5F_t *f, const H5B_class_t *type, haddr_t addr, H5B_operator_t op, void *udata) +H5B__iterate_helper(H5F_t *f, const H5B_class_t *type, haddr_t addr, int exp_level, H5B_operator_t op, + void *udata) { H5B_t *bt = NULL; /* Pointer to current B-tree node */ H5UC_t *rc_shared; /* Ref-counted shared info */ @@ -1078,13 +1083,14 @@ H5B__iterate_helper(H5F_t *f, const H5B_class_t *type, haddr_t addr, H5B_operato cache_udata.f = f; cache_udata.type = type; cache_udata.rc_shared = rc_shared; + cache_udata.exp_level = exp_level; if (NULL == (bt = (H5B_t *)H5AC_protect(f, H5AC_BT, addr, &cache_udata, H5AC__READ_ONLY_FLAG))) HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, H5_ITER_ERROR, "unable to load B-tree node"); /* Iterate over node's children */ for (u = 0; u < bt->nchildren && ret_value == H5_ITER_CONT; u++) { if (bt->level > 0) - ret_value = H5B__iterate_helper(f, type, bt->child[u], op, udata); + ret_value = H5B__iterate_helper(f, type, bt->child[u], (int)(bt->level - 1), op, udata); else ret_value = (*op)(f, H5B_NKEY(bt, shared, u), bt->child[u], H5B_NKEY(bt, shared, u + 1), udata); if (ret_value < 0) @@ -1125,7 +1131,7 @@ H5B_iterate(H5F_t *f, const H5B_class_t *type, haddr_t addr, H5B_operator_t op, assert(udata); /* Iterate over the B-tree records */ - if ((ret_value = H5B__iterate_helper(f, type, addr, op, udata)) < 0) + if ((ret_value = H5B__iterate_helper(f, type, addr, H5B_UNKNOWN_NODELEVEL, op, udata)) < 0) HERROR(H5E_BTREE, H5E_BADITER, "B-tree iteration failed"); FUNC_LEAVE_NOAPI(ret_value) @@ -1191,6 +1197,7 @@ H5B__remove_helper(H5F_t *f, haddr_t addr, const H5B_class_t *type, int level, u cache_udata.f = f; cache_udata.type = type; cache_udata.rc_shared = rc_shared; + cache_udata.exp_level = H5B_UNKNOWN_NODELEVEL; if (NULL == (bt = (H5B_t *)H5AC_protect(f, H5AC_BT, addr, &cache_udata, H5AC__NO_FLAGS_SET))) HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, H5B_INS_ERROR, "unable to load B-tree node"); @@ -1543,6 +1550,7 @@ H5B_delete(H5F_t *f, const H5B_class_t *type, haddr_t addr, void *udata) cache_udata.f = f; cache_udata.type = type; cache_udata.rc_shared = rc_shared; + cache_udata.exp_level = H5B_UNKNOWN_NODELEVEL; if (NULL == (bt = (H5B_t *)H5AC_protect(f, H5AC_BT, addr, &cache_udata, H5AC__NO_FLAGS_SET))) HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to load B-tree node"); @@ -1783,6 +1791,7 @@ H5B__get_info_helper(H5F_t *f, const H5B_class_t *type, haddr_t addr, const H5B_ cache_udata.f = f; cache_udata.type = type; cache_udata.rc_shared = rc_shared; + cache_udata.exp_level = H5B_UNKNOWN_NODELEVEL; if (NULL == (bt = (H5B_t *)H5AC_protect(f, H5AC_BT, addr, &cache_udata, H5AC__READ_ONLY_FLAG))) HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to load B-tree node"); @@ -1878,7 +1887,7 @@ H5B_get_info(H5F_t *f, const H5B_class_t *type, haddr_t addr, H5B_info_t *bt_inf /* Iterate over the B-tree records, making any "leaf" callbacks */ /* (Only if operator defined) */ if (op) - if ((ret_value = H5B__iterate_helper(f, type, addr, op, udata)) < 0) + if ((ret_value = H5B__iterate_helper(f, type, addr, H5B_UNKNOWN_NODELEVEL, op, udata)) < 0) HERROR(H5E_BTREE, H5E_BADITER, "B-tree iteration failed"); done: @@ -1924,6 +1933,7 @@ H5B_valid(H5F_t *f, const H5B_class_t *type, haddr_t addr) cache_udata.f = f; cache_udata.type = type; cache_udata.rc_shared = rc_shared; + cache_udata.exp_level = H5B_UNKNOWN_NODELEVEL; if (NULL == (bt = (H5B_t *)H5AC_protect(f, H5AC_BT, addr, &cache_udata, H5AC__READ_ONLY_FLAG))) HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to protect B-tree node"); diff --git a/src/H5B2hdr.c b/src/H5B2hdr.c index 96372265fa0..1a966edac73 100644 --- a/src/H5B2hdr.c +++ b/src/H5B2hdr.c @@ -404,7 +404,7 @@ H5B2__hdr_decr(H5B2_hdr_t *hdr) herr_t H5B2__hdr_fuse_incr(H5B2_hdr_t *hdr) { - FUNC_ENTER_NOAPI_NOINIT_NOERR + FUNC_ENTER_PACKAGE_NOERR /* Sanity check */ assert(hdr); @@ -427,7 +427,7 @@ H5B2__hdr_fuse_incr(H5B2_hdr_t *hdr) size_t H5B2__hdr_fuse_decr(H5B2_hdr_t *hdr) { - FUNC_ENTER_NOAPI_NOINIT_NOERR + FUNC_ENTER_PACKAGE_NOERR /* Sanity check */ assert(hdr); diff --git a/src/H5B2int.c b/src/H5B2int.c index 51327de3e20..74d431d63d7 100644 --- a/src/H5B2int.c +++ b/src/H5B2int.c @@ -1847,7 +1847,7 @@ H5B2__create_flush_depend(H5AC_info_t *parent_entry, H5AC_info_t *child_entry) { herr_t ret_value = SUCCEED; /* Return value */ - FUNC_ENTER_NOAPI_NOINIT + FUNC_ENTER_PACKAGE /* Sanity check */ assert(parent_entry); @@ -2006,7 +2006,7 @@ H5B2__destroy_flush_depend(H5AC_info_t *parent_entry, H5AC_info_t *child_entry) { herr_t ret_value = SUCCEED; /* Return value */ - FUNC_ENTER_NOAPI_NOINIT + FUNC_ENTER_PACKAGE /* Sanity check */ assert(parent_entry); diff --git a/src/H5B2test.c b/src/H5B2test.c index b842dab2f1e..f295bc6b622 100644 --- a/src/H5B2test.c +++ b/src/H5B2test.c @@ -417,7 +417,7 @@ H5B2__test2_debug(FILE *stream, int indent, int fwidth, const void *record, cons herr_t H5B2__get_root_addr_test(H5B2_t *bt2, haddr_t *root_addr) { - FUNC_ENTER_NOAPI_NOINIT_NOERR + FUNC_ENTER_PACKAGE_NOERR /* Check arguments. */ assert(bt2); diff --git a/src/H5Bcache.c b/src/H5Bcache.c index 8d3655dadff..a832425c78b 100644 --- a/src/H5Bcache.c +++ b/src/H5Bcache.c @@ -170,6 +170,11 @@ H5B__cache_deserialize(const void *_image, size_t len, void *_udata, bool H5_ATT HGOTO_ERROR(H5E_BTREE, H5E_CANTLOAD, NULL, "incorrect B-tree node type"); bt->level = *image++; + /* Check in case of level is corrupted, if expected level is known */ + if (udata->exp_level != H5B_UNKNOWN_NODELEVEL) + if (bt->level != (unsigned)udata->exp_level) + HGOTO_ERROR(H5E_BTREE, H5E_BADVALUE, NULL, "level is not as expected, possibly corrupted"); + /* Entries used */ if (H5_IS_BUFFER_OVERFLOW(image, 2, p_end)) HGOTO_ERROR(H5E_BTREE, H5E_OVERFLOW, NULL, "ran off end of input buffer while decoding"); @@ -179,12 +184,6 @@ H5B__cache_deserialize(const void *_image, size_t len, void *_udata, bool H5_ATT if (bt->nchildren > shared->two_k) HGOTO_ERROR(H5E_BTREE, H5E_BADVALUE, NULL, "number of children is greater than maximum"); - /* Check in case of level is corrupted, it is unreasonable for level to be - larger than the number of entries */ - if (bt->level > bt->nchildren) - HGOTO_ERROR(H5E_BTREE, H5E_BADVALUE, NULL, - "level cannot be greater than the number of children, possibly corrupted"); - /* Sibling pointers */ if (H5_IS_BUFFER_OVERFLOW(image, H5F_sizeof_addr(udata->f), p_end)) HGOTO_ERROR(H5E_BTREE, H5E_OVERFLOW, NULL, "ran off end of input buffer while decoding"); diff --git a/src/H5Bpkg.h b/src/H5Bpkg.h index 4f61614a9e0..b56a6f3a7e9 100644 --- a/src/H5Bpkg.h +++ b/src/H5Bpkg.h @@ -39,6 +39,11 @@ /* # of bits for node level: 1 byte */ #define LEVEL_BITS 8 +/* Indicates that the level of the current node is unknown. When the level + * is known, it can be used to detect corrupted level during decoding + */ +#define H5B_UNKNOWN_NODELEVEL -1 + /****************************/ /* Package Private Typedefs */ /****************************/ @@ -60,6 +65,7 @@ typedef struct H5B_t { typedef struct H5B_cache_ud_t { H5F_t *f; /* File that B-tree node is within */ const struct H5B_class_t *type; /* Type of tree */ + int exp_level; /* Expected level of the current node */ H5UC_t *rc_shared; /* Ref-counted shared info */ } H5B_cache_ud_t; diff --git a/src/H5Dchunk.c b/src/H5Dchunk.c index 1a9e7d721e5..094bd416336 100644 --- a/src/H5Dchunk.c +++ b/src/H5Dchunk.c @@ -759,7 +759,7 @@ H5D__chunk_set_sizes(H5D_t *dset) unsigned u; /* Iterator */ herr_t ret_value = SUCCEED; /* Return value */ - FUNC_ENTER_NOAPI(FAIL) + FUNC_ENTER_PACKAGE /* Sanity checks */ assert(dset); @@ -8240,7 +8240,7 @@ H5D__chunk_get_offset_copy(const H5D_t *dset, const hsize_t *offset, hsize_t *of unsigned u; herr_t ret_value = SUCCEED; /* Return value */ - FUNC_ENTER_NOAPI(FAIL) + FUNC_ENTER_PACKAGE assert(dset); assert(offset); diff --git a/src/H5Dio.c b/src/H5Dio.c index c5b6ee21dbb..436e9c95650 100644 --- a/src/H5Dio.c +++ b/src/H5Dio.c @@ -103,7 +103,7 @@ H5D__read(size_t count, H5D_dset_io_info_t *dset_info) char fake_char; /* Temporary variable for NULL buffer pointers */ herr_t ret_value = SUCCEED; /* Return value */ - FUNC_ENTER_NOAPI(FAIL) + FUNC_ENTER_PACKAGE #ifdef H5_HAVE_PARALLEL /* Reset the actual io mode properties to the default values in case @@ -530,7 +530,7 @@ H5D__write(size_t count, H5D_dset_io_info_t *dset_info) char fake_char; /* Temporary variable for NULL buffer pointers */ herr_t ret_value = SUCCEED; /* Return value */ - FUNC_ENTER_NOAPI(FAIL) + FUNC_ENTER_PACKAGE #ifdef H5_HAVE_PARALLEL /* Reset the actual io mode properties to the default values in case diff --git a/src/H5Dlayout.c b/src/H5Dlayout.c index 04d55aa7fa3..26903b2408d 100644 --- a/src/H5Dlayout.c +++ b/src/H5Dlayout.c @@ -48,8 +48,7 @@ const unsigned H5O_layout_ver_bounds[] = { H5O_LAYOUT_VERSION_4, /* H5F_LIBVER_V110 */ 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_4, /* H5F_LIBVER_V200 */ H5O_LAYOUT_VERSION_LATEST /* H5F_LIBVER_LATEST */ }; @@ -286,7 +285,7 @@ H5D__layout_set_version(H5F_t *f, H5O_layout_t *layout) unsigned version; /* Message version */ herr_t ret_value = SUCCEED; /* Return value */ - FUNC_ENTER_NOAPI(FAIL) + FUNC_ENTER_PACKAGE /* Sanity check */ assert(layout); diff --git a/src/H5FDint.c b/src/H5FDint.c index d2ef3d0a4cb..e3abf584125 100644 --- a/src/H5FDint.c +++ b/src/H5FDint.c @@ -857,7 +857,7 @@ H5FD__read_selection_translate(uint32_t skip_vector_cb, H5FD_t *file, H5FD_mem_t size_t vec_arr_nused = 0; herr_t ret_value = SUCCEED; - FUNC_ENTER_NOAPI(FAIL) + FUNC_ENTER_PACKAGE /* Sanity checks */ assert(file); @@ -1564,7 +1564,7 @@ H5FD__write_selection_translate(uint32_t skip_vector_cb, H5FD_t *file, H5FD_mem_ size_t vec_arr_nused = 0; herr_t ret_value = SUCCEED; - FUNC_ENTER_NOAPI(FAIL) + FUNC_ENTER_PACKAGE /* Sanity checks */ assert(file); diff --git a/src/H5FDmpio.c b/src/H5FDmpio.c index 2d811ac68cc..cce5d2ee1ff 100644 --- a/src/H5FDmpio.c +++ b/src/H5FDmpio.c @@ -3904,7 +3904,7 @@ H5FD__mpio_ctl(H5FD_t *_file, uint64_t op_code, uint64_t flags, const void H5_AT H5FD_mpio_t *file = (H5FD_mpio_t *)_file; herr_t ret_value = SUCCEED; /* Return value */ - FUNC_ENTER_NOAPI(FAIL) + FUNC_ENTER_PACKAGE /* Sanity checks */ assert(file); diff --git a/src/H5FDtest.c b/src/H5FDtest.c index d5bc634c23a..086d41f7808 100644 --- a/src/H5FDtest.c +++ b/src/H5FDtest.c @@ -88,7 +88,7 @@ H5FD__supports_swmr_test(const char *vfd_name) { bool ret_value = false; - FUNC_ENTER_NOAPI_NOINIT_NOERR + FUNC_ENTER_PACKAGE_NOERR if (!vfd_name) vfd_name = getenv("HDF5_TEST_DRIVER"); diff --git a/src/H5FL.c b/src/H5FL.c index 9430a109107..087017e03e9 100644 --- a/src/H5FL.c +++ b/src/H5FL.c @@ -1941,7 +1941,7 @@ H5FL__fac_gc(void) H5FL_fac_gc_node_t *gc_node; /* Pointer into the list of things to garbage collect */ herr_t ret_value = SUCCEED; /* return value*/ - FUNC_ENTER_NOAPI_NOINIT + FUNC_ENTER_PACKAGE /* Walk through all the free lists, free()'ing the nodes */ gc_node = H5FL_fac_gc_head.first; diff --git a/src/H5FScache.c b/src/H5FScache.c index 8f730c3f2f4..a9b430d3698 100644 --- a/src/H5FScache.c +++ b/src/H5FScache.c @@ -766,7 +766,7 @@ H5FS__cache_hdr_notify(H5AC_notify_action_t action, void *_thing) H5FS_t *fspace = (H5FS_t *)_thing; /* Pointer to the object */ herr_t ret_value = SUCCEED; /* Return value */ - FUNC_ENTER_NOAPI_NOINIT + FUNC_ENTER_PACKAGE /* Sanity check */ assert(fspace); diff --git a/src/H5FSint.c b/src/H5FSint.c index 7ccd7584a66..011a9822563 100644 --- a/src/H5FSint.c +++ b/src/H5FSint.c @@ -100,7 +100,7 @@ H5FS__create_flush_depend(H5AC_info_t *parent_entry, H5AC_info_t *child_entry) { herr_t ret_value = SUCCEED; /* Return value */ - FUNC_ENTER_NOAPI_NOINIT + FUNC_ENTER_PACKAGE /* Sanity check */ assert(parent_entry); @@ -128,7 +128,7 @@ H5FS__destroy_flush_depend(H5AC_info_t *parent_entry, H5AC_info_t *child_entry) { herr_t ret_value = SUCCEED; /* Return value */ - FUNC_ENTER_NOAPI_NOINIT + FUNC_ENTER_PACKAGE /* Sanity check */ assert(parent_entry); diff --git a/src/H5Faccum.c b/src/H5Faccum.c index e73ba110182..4d713576ca6 100644 --- a/src/H5Faccum.c +++ b/src/H5Faccum.c @@ -405,7 +405,7 @@ H5F__accum_write(H5F_shared_t *f_sh, H5FD_mem_t map_type, haddr_t addr, size_t s H5FD_t *file; /* File driver pointer */ herr_t ret_value = SUCCEED; /* Return value */ - FUNC_ENTER_NOAPI(FAIL) + FUNC_ENTER_PACKAGE /* Sanity checks */ assert(f_sh); @@ -1004,7 +1004,7 @@ H5F__accum_flush(H5F_shared_t *f_sh) { herr_t ret_value = SUCCEED; /* Return value */ - FUNC_ENTER_NOAPI(FAIL) + FUNC_ENTER_PACKAGE /* Sanity checks */ assert(f_sh); diff --git a/src/H5Fprivate.h b/src/H5Fprivate.h index 8509a997f79..1894a49cd1b 100644 --- a/src/H5Fprivate.h +++ b/src/H5Fprivate.h @@ -124,7 +124,7 @@ typedef struct H5F_t H5F_t; #define H5F_HAS_FEATURE(F, FL) (H5F_has_feature(F, FL)) #define H5F_BASE_ADDR(F) (H5F_get_base_addr(F)) #define H5F_SYM_LEAF_K(F) (H5F_sym_leaf_k(F)) -#define H5F_KVALUE(F, T) (H5F_Kvalue(F, T)) +#define H5F_KVALUE(F, T) (H5F_kvalue(F, T)) #define H5F_NREFS(F) (H5F_get_nrefs(F)) #define H5F_SIZEOF_ADDR(F) (H5F_sizeof_addr(F)) #define H5F_SIZEOF_SIZE(F) (H5F_sizeof_size(F)) @@ -532,7 +532,7 @@ H5_DLL uint64_t H5F_get_rfic_flags(const H5F_t *f); /* Functions than retrieve values set/cached from the superblock/FCPL */ H5_DLL haddr_t H5F_get_base_addr(const H5F_t *f); H5_DLL unsigned H5F_sym_leaf_k(const H5F_t *f); -H5_DLL unsigned H5F_Kvalue(const H5F_t *f, const struct H5B_class_t *type); +H5_DLL unsigned H5F_kvalue(const H5F_t *f, const struct H5B_class_t *type); H5_DLL unsigned H5F_get_nrefs(const H5F_t *f); H5_DLL uint8_t H5F_sizeof_addr(const H5F_t *f); H5_DLL uint8_t H5F_sizeof_size(const H5F_t *f); diff --git a/src/H5Fpublic.h b/src/H5Fpublic.h index c9b8b9e7731..9a8a375c005 100644 --- a/src/H5Fpublic.h +++ b/src/H5Fpublic.h @@ -168,12 +168,11 @@ typedef enum H5F_libver_t { H5F_LIBVER_V110 = 2, /**< Use the latest v110 format for storing objects */ 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 v118 format for storing objects */ + H5F_LIBVER_V200 = 5, /**< Use the latest v200 format for storing objects */ H5F_LIBVER_NBOUNDS /**< Sentinel */ } H5F_libver_t; -#define H5F_LIBVER_LATEST H5F_LIBVER_V118 +#define H5F_LIBVER_LATEST H5F_LIBVER_V200 /** * File space handling strategy diff --git a/src/H5Fquery.c b/src/H5Fquery.c index 89d2e70f0bc..8d02a9dc9ab 100644 --- a/src/H5Fquery.c +++ b/src/H5Fquery.c @@ -515,7 +515,7 @@ H5F_get_min_dset_ohdr(const H5F_t *f) } /* end H5F_get_min_dset_ohdr */ /*------------------------------------------------------------------------- - * Function: H5F_Kvalue + * Function: H5F_kvalue * * Purpose: Replaced a macro to retrieve a B-tree key value for a certain * type, now that the generic properties are being used to store @@ -527,7 +527,7 @@ H5F_get_min_dset_ohdr(const H5F_t *f) *------------------------------------------------------------------------- */ unsigned -H5F_Kvalue(const H5F_t *f, const H5B_class_t *type) +H5F_kvalue(const H5F_t *f, const H5B_class_t *type) { /* Use FUNC_ENTER_NOAPI_NOINIT_NOERR here to avoid performance issues */ FUNC_ENTER_NOAPI_NOINIT_NOERR @@ -538,7 +538,7 @@ H5F_Kvalue(const H5F_t *f, const H5B_class_t *type) assert(type); FUNC_LEAVE_NOAPI(f->shared->sblock->btree_k[type->id]) -} /* end H5F_Kvalue() */ +} /* end H5F_kvalue() */ /*------------------------------------------------------------------------- * Function: H5F_get_nrefs diff --git a/src/H5Fsuper.c b/src/H5Fsuper.c index 24660035c16..1a84c455f83 100644 --- a/src/H5Fsuper.c +++ b/src/H5Fsuper.c @@ -71,8 +71,7 @@ static const unsigned HDF5_superblock_ver_bounds[] = { HDF5_SUPERBLOCK_VERSION_3, /* H5F_LIBVER_V110 */ 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_3, /* H5F_LIBVER_V200 */ HDF5_SUPERBLOCK_VERSION_LATEST /* H5F_LIBVER_LATEST */ }; diff --git a/src/H5Gstab.c b/src/H5Gstab.c index a101315a406..c86406422b7 100644 --- a/src/H5Gstab.c +++ b/src/H5Gstab.c @@ -685,7 +685,7 @@ H5G__stab_get_name_by_idx(const H5O_loc_t *oloc, H5_iter_order_t order, hsize_t /* Portably clear udata struct (before FUNC_ENTER) */ memset(&udata, 0, sizeof(udata)); - FUNC_ENTER_NOAPI(FAIL) + FUNC_ENTER_PACKAGE /* Sanity check */ assert(oloc); diff --git a/src/H5HFhuge.c b/src/H5HFhuge.c index 33a6748cb6f..b7216363394 100644 --- a/src/H5HFhuge.c +++ b/src/H5HFhuge.c @@ -192,7 +192,7 @@ H5HF__huge_init(H5HF_hdr_t *hdr) hdr->huge_ids_direct = false; } /* end if */ else { - if ((hdr->sizeof_addr + hdr->sizeof_size) <= (hdr->id_len - 1)) { + if ((unsigned)(hdr->sizeof_addr + hdr->sizeof_size) <= (unsigned)(hdr->id_len - 1)) { /* Indicate that v2 B-tree doesn't have to be used to locate object */ hdr->huge_ids_direct = true; diff --git a/src/H5HG.c b/src/H5HG.c index d28c457d6cb..0354489f28d 100644 --- a/src/H5HG.c +++ b/src/H5HG.c @@ -841,7 +841,7 @@ H5HG__free(H5HG_heap_t *heap) { herr_t ret_value = SUCCEED; /* Return value */ - FUNC_ENTER_NOAPI(FAIL) + FUNC_ENTER_PACKAGE /* Check arguments */ assert(heap); diff --git a/src/H5Oattr.c b/src/H5Oattr.c index a671d507f27..1f11892e2f1 100644 --- a/src/H5Oattr.c +++ b/src/H5Oattr.c @@ -564,7 +564,7 @@ H5O__attr_delete(H5F_t *f, H5O_t *oh, void *_mesg) H5A_t *attr = (H5A_t *)_mesg; herr_t ret_value = SUCCEED; /* Return value */ - FUNC_ENTER_NOAPI_NOINIT + FUNC_ENTER_PACKAGE /* check args */ assert(f); diff --git a/src/H5Oattribute.c b/src/H5Oattribute.c index fd8d5a4b732..39637e48669 100644 --- a/src/H5Oattribute.c +++ b/src/H5Oattribute.c @@ -201,7 +201,7 @@ H5O__attr_create(const H5O_loc_t *loc, H5A_t *attr) htri_t shared_mesg; /* Should this message be stored in the Shared Message table? */ herr_t ret_value = SUCCEED; /* Return value */ - FUNC_ENTER_NOAPI_NOINIT + FUNC_ENTER_PACKAGE /* Check arguments */ assert(loc); diff --git a/src/H5Ofill.c b/src/H5Ofill.c index becb16c8e41..7f111bfbf66 100644 --- a/src/H5Ofill.c +++ b/src/H5Ofill.c @@ -153,8 +153,7 @@ const unsigned H5O_fill_ver_bounds[] = { H5O_FILL_VERSION_3, /* H5F_LIBVER_V110 */ 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_3, /* H5F_LIBVER_V200 */ H5O_FILL_VERSION_LATEST /* H5F_LIBVER_LATEST */ }; diff --git a/src/H5Ofsinfo.c b/src/H5Ofsinfo.c index e5e16758cea..2860f4f5809 100644 --- a/src/H5Ofsinfo.c +++ b/src/H5Ofsinfo.c @@ -69,8 +69,7 @@ static const unsigned H5O_fsinfo_ver_bounds[] = { H5O_FSINFO_VERSION_1, /* H5F_LIBVER_V110 */ 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_1, /* H5F_LIBVER_V200 */ 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 e629d763856..b9488aef35e 100644 --- a/src/H5Oint.c +++ b/src/H5Oint.c @@ -130,8 +130,7 @@ const unsigned H5O_obj_ver_bounds[] = { H5O_VERSION_2, /* H5F_LIBVER_V110 */ 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_2, /* H5F_LIBVER_V200 */ H5O_VERSION_LATEST /* H5F_LIBVER_LATEST */ }; diff --git a/src/H5Opline.c b/src/H5Opline.c index aa8a25292e3..d0b5322dd97 100644 --- a/src/H5Opline.c +++ b/src/H5Opline.c @@ -88,8 +88,7 @@ const unsigned H5O_pline_ver_bounds[] = { H5O_PLINE_VERSION_2, /* H5F_LIBVER_V110 */ 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_2, /* H5F_LIBVER_V200 */ H5O_PLINE_VERSION_LATEST /* H5F_LIBVER_LATEST */ }; diff --git a/src/H5Oshared.h b/src/H5Oshared.h index 86c22265313..a7b3fd4d442 100644 --- a/src/H5Oshared.h +++ b/src/H5Oshared.h @@ -42,7 +42,8 @@ H5O_SHARED_DECODE(H5F_t *f, H5O_t *open_oh, unsigned mesg_flags, unsigned *iofla { void *ret_value = NULL; /* Return value */ - FUNC_ENTER_NOAPI_NOINIT + /* H5O_SHARED_DECODE will be defined as a package function */ + FUNC_ENTER_PACKAGE #ifndef H5O_SHARED_TYPE #error "Need to define H5O_SHARED_TYPE macro!" @@ -97,7 +98,8 @@ H5O_SHARED_ENCODE(H5F_t *f, bool disable_shared, size_t H5_ATTR_UNUSED p_size, u (const H5O_shared_t *)_mesg; /* Pointer to shared message portion of actual message */ herr_t ret_value = SUCCEED; /* Return value */ - FUNC_ENTER_NOAPI_NOINIT + /* H5O_SHARED_ENCODE will be defined as a package function */ + FUNC_ENTER_PACKAGE #ifndef H5O_SHARED_TYPE #error "Need to define H5O_SHARED_TYPE macro!" @@ -148,7 +150,8 @@ H5O_SHARED_SIZE(const H5F_t *f, bool disable_shared, const void *_mesg) (const H5O_shared_t *)_mesg; /* Pointer to shared message portion of actual message */ size_t ret_value = 0; /* Return value */ - FUNC_ENTER_NOAPI_NOINIT + /* H5O_SHARED_SIZE will be defined as a package function */ + FUNC_ENTER_PACKAGE #ifndef H5O_SHARED_TYPE #error "Need to define H5O_SHARED_TYPE macro!" @@ -195,6 +198,7 @@ H5O_SHARED_DELETE(H5F_t *f, H5O_t *open_oh, void *_mesg) H5O_shared_t *sh_mesg = (H5O_shared_t *)_mesg; /* Pointer to shared message portion of actual message */ herr_t ret_value = SUCCEED; /* Return value */ + /* H5O_SHARED_DELETE will be defined as a package function */ FUNC_ENTER_PACKAGE #ifndef H5O_SHARED_TYPE @@ -241,6 +245,7 @@ H5O_SHARED_LINK(H5F_t *f, H5O_t *open_oh, void *_mesg) H5O_shared_t *sh_mesg = (H5O_shared_t *)_mesg; /* Pointer to shared message portion of actual message */ herr_t ret_value = SUCCEED; /* Return value */ + /* H5O_SHARED_LINK will be defined as a package function */ FUNC_ENTER_PACKAGE #ifndef H5O_SHARED_TYPE @@ -287,6 +292,7 @@ H5O_SHARED_COPY_FILE(H5F_t *file_src, void *_native_src, H5F_t *file_dst, bool * void *dst_mesg = NULL; /* Destination message */ void *ret_value = NULL; /* Return value */ + /* H5O_SHARED_COPY_FILE will be defined as a package function */ FUNC_ENTER_PACKAGE #ifndef H5O_SHARED_TYPE @@ -347,7 +353,8 @@ H5O_SHARED_POST_COPY_FILE(const H5O_loc_t H5_ATTR_NDEBUG_UNUSED *oloc_src, const H5O_shared_t *shared_dst = (H5O_shared_t *)mesg_dst; /* Alias to shared info in native destination */ herr_t ret_value = SUCCEED; /* Return value */ - FUNC_ENTER_NOAPI_NOINIT + /* H5O_SHARED_POST_COPY_FILE will be defined as a package function */ + FUNC_ENTER_PACKAGE assert(oloc_src->file); assert(oloc_dst->file); @@ -409,7 +416,8 @@ H5O_SHARED_DEBUG(H5F_t *f, const void *_mesg, FILE *stream, int indent, int fwid (const H5O_shared_t *)_mesg; /* Pointer to shared message portion of actual message */ herr_t ret_value = SUCCEED; /* Return value */ - FUNC_ENTER_NOAPI_NOINIT + /* H5O_SHARED_DEBUG will be defined as a package function */ + FUNC_ENTER_PACKAGE #ifndef H5O_SHARED_TYPE #error "Need to define H5O_SHARED_TYPE macro!" diff --git a/src/H5Pint.c b/src/H5Pint.c index 64356c29aa1..8fb02bca0a5 100644 --- a/src/H5Pint.c +++ b/src/H5Pint.c @@ -5642,7 +5642,7 @@ H5P__close_class(H5P_genclass_t *pclass) { herr_t ret_value = SUCCEED; /* Return value */ - FUNC_ENTER_NOAPI_NOINIT + FUNC_ENTER_PACKAGE assert(pclass); diff --git a/src/H5Ppublic.h b/src/H5Ppublic.h index 4a7e3d0229b..bdb172bf8dc 100644 --- a/src/H5Ppublic.h +++ b/src/H5Ppublic.h @@ -5053,26 +5053,11 @@ 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 low=#H5F_LIBVER_V200
* \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. + * versions available to library release 2.0.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. @@ -5142,10 +5127,10 @@ H5_DLL herr_t H5Pset_gc_references(hid_t fapl_id, unsigned gc_ref); * * * \note *H5F_LIBVER_LATEST*:
- * Since 1.16.x is also #H5F_LIBVER_LATEST, there is no upper + * Since 2.0.x is also #H5F_LIBVER_LATEST, there is no upper * limit on the format versions to use. That is, if a * newer format version is required to support a feature - * in 1.16.x series, this setting will allow the object to be + * in 2.0.x series, this setting will allow the object to be * created. * * \version 1.10.2 #H5F_LIBVER_V18 added to the enumerated defines in @@ -6059,7 +6044,7 @@ H5_DLL herr_t H5Pget_dset_no_attrs_hint(hid_t dcpl_id, hbool_t *minimize); * which is a 32-bit signed long value on Windows, which limited * the valid offset that can be returned to 2 GiB. * - * \version 1.16.0 \p offset parameter type changed to HDoff_t from off_t. + * \version 2.0.0 \p offset parameter type changed to HDoff_t from off_t. * \version 1.6.4 \p idx parameter type changed to unsigned. * \since 1.0.0 * @@ -6556,7 +6541,7 @@ H5_DLL herr_t H5Pset_dset_no_attrs_hint(hid_t dcpl_id, hbool_t minimize); * which is a 32-bit signed long value on Windows, which limited * the valid offset that can be set to 2 GiB. * - * \version 1.16.0 \p offset parameter type changed to HDoff_t from off_t. + * \version 2.0.0 \p offset parameter type changed to HDoff_t from off_t. * \since 1.0.0 * */ diff --git a/src/H5Rint.c b/src/H5Rint.c index 85282b1d4d6..30b92a380fd 100644 --- a/src/H5Rint.c +++ b/src/H5Rint.c @@ -159,7 +159,7 @@ DESCRIPTION herr_t H5R__init_package(void) { - FUNC_ENTER_NOAPI_NOINIT_NOERR + FUNC_ENTER_PACKAGE_NOERR /* Sanity check, if assert fails, H5R_REF_BUF_SIZE must be increased */ HDcompile_assert(sizeof(H5R_ref_priv_t) <= H5R_REF_BUF_SIZE); diff --git a/src/H5S.c b/src/H5S.c index 69c4224c6ed..ec07f74a73e 100644 --- a/src/H5S.c +++ b/src/H5S.c @@ -64,8 +64,7 @@ const unsigned H5O_sdspace_ver_bounds[] = { H5O_SDSPACE_VERSION_2, /* H5F_LIBVER_V110 */ 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_2, /* H5F_LIBVER_V200 */ H5O_SDSPACE_VERSION_LATEST /* H5F_LIBVER_LATEST */ }; diff --git a/src/H5Shyper.c b/src/H5Shyper.c index 560e2bf1c85..60b6bb96a07 100644 --- a/src/H5Shyper.c +++ b/src/H5Shyper.c @@ -241,8 +241,7 @@ static const unsigned H5O_sds_hyper_ver_bounds[] = { H5S_HYPER_VERSION_2, /* H5F_LIBVER_V110 */ 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_V200 */ H5S_HYPER_VERSION_3 /* H5F_LIBVER_LATEST */ }; diff --git a/src/H5Spoint.c b/src/H5Spoint.c index 339e36593c9..c8c226bee5a 100644 --- a/src/H5Spoint.c +++ b/src/H5Spoint.c @@ -126,8 +126,7 @@ static const unsigned H5O_sds_point_ver_bounds[] = { H5S_POINT_VERSION_1, /* H5F_LIBVER_V110 */ 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_V200 */ H5S_POINT_VERSION_2 /* H5F_LIBVER_LATEST */ }; diff --git a/src/H5T.c b/src/H5T.c index b4ad5a2f9c3..8790b6bd0c0 100644 --- a/src/H5T.c +++ b/src/H5T.c @@ -612,8 +612,7 @@ const unsigned H5O_dtype_ver_bounds[] = { H5O_DTYPE_VERSION_3, /* H5F_LIBVER_V110 */ 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_4, /* H5F_LIBVER_V200 */ H5O_DTYPE_VERSION_LATEST /* H5F_LIBVER_LATEST */ }; @@ -880,7 +879,7 @@ H5T__init_package(void) #endif herr_t ret_value = SUCCEED; /* Return value */ - FUNC_ENTER_NOAPI_NOINIT + FUNC_ENTER_PACKAGE /* Initialize the ID group for the file IDs */ if (H5I_register_type(H5I_DATATYPE_CLS) < 0) diff --git a/src/H5TSc11.c b/src/H5TSc11.c index 60d7a7e9209..6ea9caefb6f 100644 --- a/src/H5TSc11.c +++ b/src/H5TSc11.c @@ -73,7 +73,7 @@ void H5TS__c11_first_thread_init(void) { - FUNC_ENTER_NOAPI_NAMECHECK_ONLY + FUNC_ENTER_PACKAGE_NAMECHECK_ONLY /* Initialize H5TS package */ H5TS__init_package(); diff --git a/src/H5TSint.c b/src/H5TSint.c index d637cc0ebb5..220c7d11698 100644 --- a/src/H5TSint.c +++ b/src/H5TSint.c @@ -376,7 +376,7 @@ H5TS__api_mutex_release(unsigned *lock_count) { herr_t ret_value = SUCCEED; - FUNC_ENTER_NOAPI_NAMECHECK_ONLY + FUNC_ENTER_PACKAGE_NAMECHECK_ONLY #ifdef H5_HAVE_THREADSAFE /* Return the current lock count */ diff --git a/src/H5TSpthread.c b/src/H5TSpthread.c index a8dd3aa2e6b..f9de512218b 100644 --- a/src/H5TSpthread.c +++ b/src/H5TSpthread.c @@ -73,7 +73,7 @@ void H5TS__pthread_first_thread_init(void) { - FUNC_ENTER_NOAPI_NAMECHECK_ONLY + FUNC_ENTER_PACKAGE_NAMECHECK_ONLY /* Initialize H5TS package */ H5TS__init_package(); diff --git a/src/H5TSrec_rwlock.c b/src/H5TSrec_rwlock.c index 43528c2afa3..6c8f1a76bd9 100644 --- a/src/H5TSrec_rwlock.c +++ b/src/H5TSrec_rwlock.c @@ -539,7 +539,7 @@ H5TS__rec_rwlock_wrlock(H5TS_rec_rwlock_t *lock) bool have_mutex = false; herr_t ret_value = SUCCEED; - FUNC_ENTER_NOAPI_NAMECHECK_ONLY + FUNC_ENTER_PACKAGE_NAMECHECK_ONLY if (H5_UNLIKELY(NULL == lock)) HGOTO_DONE(FAIL); @@ -619,7 +619,7 @@ H5TS__rec_rwlock_rdunlock(H5TS_rec_rwlock_t *lock) bool have_mutex = false; herr_t ret_value = SUCCEED; - FUNC_ENTER_NOAPI_NAMECHECK_ONLY + FUNC_ENTER_PACKAGE_NAMECHECK_ONLY if (H5_UNLIKELY(NULL == lock)) HGOTO_DONE(FAIL); @@ -694,7 +694,7 @@ H5TS__rec_rwlock_wrunlock(H5TS_rec_rwlock_t *lock) bool have_mutex = false; herr_t ret_value = SUCCEED; - FUNC_ENTER_NOAPI_NAMECHECK_ONLY + FUNC_ENTER_PACKAGE_NAMECHECK_ONLY if (H5_UNLIKELY(NULL == lock)) HGOTO_DONE(FAIL); diff --git a/src/H5TSwin.c b/src/H5TSwin.c index 9434969915a..59f5db42d57 100644 --- a/src/H5TSwin.c +++ b/src/H5TSwin.c @@ -79,7 +79,7 @@ H5TS__win32_process_enter(PINIT_ONCE InitOnce, PVOID Parameter, PVOID *lpContex) { BOOL ret_value = TRUE; - FUNC_ENTER_NOAPI_NAMECHECK_ONLY + FUNC_ENTER_PACKAGE_NAMECHECK_ONLY /* Initialize H5TS package */ if (H5_UNLIKELY(H5TS__init_package() < 0)) @@ -102,7 +102,7 @@ H5TS__win32_process_enter(PINIT_ONCE InitOnce, PVOID Parameter, PVOID *lpContex) static herr_t H5TS__win32_thread_enter(void) { - FUNC_ENTER_NOAPI_NAMECHECK_ONLY + FUNC_ENTER_PACKAGE_NAMECHECK_ONLY /* Currently a placeholder function. TLS setup is performed * elsewhere in the library. @@ -129,7 +129,7 @@ H5TS__win32_thread_exit(void) { herr_t ret_value = SUCCEED; - FUNC_ENTER_NOAPI_NAMECHECK_ONLY + FUNC_ENTER_PACKAGE_NAMECHECK_ONLY /* Windows uses a different thread local storage mechanism which does * not support auto-freeing like pthreads' keys. diff --git a/src/H5Tvlen.c b/src/H5Tvlen.c index dd804cd364c..2c6ec1c2aec 100644 --- a/src/H5Tvlen.c +++ b/src/H5Tvlen.c @@ -945,7 +945,7 @@ H5T__vlen_reclaim(void *elem, const H5T_t *dt, H5T_vlen_alloc_info_t *alloc_info void *free_info; /* Free info */ herr_t ret_value = SUCCEED; /* Return value */ - FUNC_ENTER_NOAPI(FAIL) + FUNC_ENTER_PACKAGE /* Sanity checks */ assert(elem); diff --git a/src/H5VLnative.c b/src/H5VLnative.c index d11337f9e71..d4bb31d9aea 100644 --- a/src/H5VLnative.c +++ b/src/H5VLnative.c @@ -344,7 +344,7 @@ H5VL__native_get_file_addr_len(void *obj, H5I_type_t obj_type, size_t *addr_len) H5F_t *file = NULL; /* File struct pointer */ herr_t ret_value = SUCCEED; - FUNC_ENTER_NOAPI(FAIL) + FUNC_ENTER_PACKAGE /* check arguments */ assert(obj); diff --git a/src/H5private.h b/src/H5private.h index f89839ffd8d..a00088b7b74 100644 --- a/src/H5private.h +++ b/src/H5private.h @@ -1053,45 +1053,6 @@ H5_DLL herr_t H5_trace_args(struct H5RS_str_t *rs, const char *type, va_list ap) *------------------------------------------------------------------------- */ -/* `S' is the name of a function which is being tested to check if it's - * an API function. - * - * BADNESS: - * - Underscore at positions 2 or 3 (0-indexed string). Handles - * H5_ and H5X_. - * - Underscore at position 4 if position 3 is uppercase or a digit. - * Handles H5XY_. - */ -#define H5_IS_API(S) \ - ('_' != ((const char *)S)[2] /* underscore at position 2 */ \ - && '_' != ((const char *)S)[3] /* underscore at position 3 */ \ - && !( /* NOT */ \ - ((const char *)S)[4] /* pos 4 exists */ \ - && (isupper((int)S[3]) || isdigit((int)S[3])) /* pos 3 dig | uc */ \ - && '_' == ((const char *)S)[4] /* pos 4 underscore */ \ - )) - -/* `S' is the name of a function which is being tested to check if it's */ -/* a public API function */ -#define H5_IS_PUB(S) \ - (((isdigit((int)S[1]) || isupper((int)S[1])) && islower((int)S[2])) || \ - ((isdigit((int)S[2]) || isupper((int)S[2])) && islower((int)S[3])) || \ - (!S[4] || ((isdigit((int)S[3]) || isupper((int)S[3])) && islower((int)S[4])))) - -/* `S' is the name of a function which is being tested to check if it's */ -/* a private library function */ -#define H5_IS_PRIV(S) \ - (((isdigit((int)S[1]) || isupper((int)S[1])) && '_' == S[2] && islower((int)S[3])) || \ - ((isdigit((int)S[2]) || isupper((int)S[2])) && '_' == S[3] && islower((int)S[4])) || \ - ((isdigit((int)S[3]) || isupper((int)S[3])) && '_' == S[4] && islower((int)S[5]))) - -/* `S' is the name of a function which is being tested to check if it's */ -/* a package private function */ -#define H5_IS_PKG(S) \ - (((isdigit((int)S[1]) || isupper((int)S[1])) && '_' == S[2] && '_' == S[3] && islower((int)S[4])) || \ - ((isdigit((int)S[2]) || isupper((int)S[2])) && '_' == S[3] && '_' == S[4] && islower((int)S[5])) || \ - ((isdigit((int)S[3]) || isupper((int)S[3])) && '_' == S[4] && '_' == S[5] && islower((int)S[6]))) - /* global library version information string */ extern char H5_lib_vers_info_g[]; @@ -1109,6 +1070,7 @@ extern char H5_lib_vers_info_g[]; /* Thread cancellation is only possible w/pthreads */ #if defined(H5_HAVE_PTHREAD_H) + /* Local variable for saving cancellation state */ #define H5CANCEL_DECL int oldstate = 0; @@ -1215,6 +1177,69 @@ extern char H5_lib_vers_info_g[]; #include "H5CXprivate.h" /* API Contexts */ +/* ---------------------------------------------------------------------------- + * Macros to check function names for appropriate form. Called from the + * FUNC_ENTER macros, below. + * + * - public: H5X(Y)foo() + * + * - private: H5X(Y)_foo() + * + * - package/static: H5X(Y)__foo() + * + * NOTE: These will generate somewhat cryptic errors when APIs with incorrectly + * formed names are called at runtime. The H5_CHECK_FUNCTION_NAME() + * macro will emit a helpful error message if it detects badness. + * ---------------------------------------------------------------------------- + */ + +/* Macro to check if a function call is a public HDF5 API call + * + * `S' is the name of a function which is being tested to check if it's + * an API function. + * + * UNDERSCORE CHECKS: + * - Underscore at positions 2 or 3 (0-indexed string). Handles + * H5_ and H5X_. + * - Underscore at position 4 if position 3 is uppercase or a digit. + * Handles H5XY_. + */ +#define H5_IS_API(S) \ + ('_' != ((const char *)S)[2] /* underscore at position 2 */ \ + && '_' != ((const char *)S)[3] /* underscore at position 3 */ \ + && !( /* NOT */ \ + ((const char *)S)[4] /* pos 4 exists */ \ + && (isupper((int)S[3]) || isdigit((int)S[3])) /* pos 3 dig | uc */ \ + && '_' == ((const char *)S)[4] /* pos 4 underscore */ \ + )) + +/* Macro to check if a function call is a library private HDF5 API call + * + * These have the form H5X(Y)_foo() <--- single underscore + * + * `S' is the name of a function which is being tested to check if it's a private function + */ +#define H5_IS_PRIV(S) \ + (((isdigit((int)S[1]) || isupper((int)S[1])) && '_' == S[2] && islower((int)S[3])) || \ + ((isdigit((int)S[2]) || isupper((int)S[2])) && '_' == S[3] && islower((int)S[4])) || \ + ((isdigit((int)S[3]) || isupper((int)S[3])) && '_' == S[4] && islower((int)S[5]))) + +/* Macro to check if a function call is a package internal HDF5 API call + * + * These have the form H5X(Y)__foo() <--- two underscores + * + * `S' is the name of a function which is being tested to check if it's a package function + */ +#define H5_IS_PKG(S) \ + (((isdigit((int)S[1]) || isupper((int)S[1])) && '_' == S[2] && '_' == S[3] && islower((int)S[4])) || \ + ((isdigit((int)S[2]) || isupper((int)S[2])) && '_' == S[3] && '_' == S[4] && islower((int)S[5])) || \ + ((isdigit((int)S[3]) || isupper((int)S[3])) && '_' == S[4] && '_' == S[5] && islower((int)S[6]))) + +/* Macro to check that an API call is using a correctly formed name. + * + * The name checks only occur in debug builds to avoid performance degradation and only take + * place once per API call per library initialization. + */ #ifndef NDEBUG #define FUNC_ENTER_CHECK_NAME(asrt) \ { \ @@ -1223,16 +1248,21 @@ extern char H5_lib_vers_info_g[]; if (H5_UNLIKELY(!func_check)) { \ /* Check function naming status */ \ assert(asrt && \ - "Function naming conventions are incorrect - check H5_IS_API|PUB|PRIV|PKG macros in " \ - "H5private.h (this is usually due to an incorrect number of underscores)"); \ + "Function naming conventions are incorrect (see H5private.h)" \ + "(this is usually due to an incorrect number of underscores in the function name)"); \ \ /* Don't check again */ \ func_check = true; \ - } /* end if */ \ - } /* end scope */ -#else /* NDEBUG */ + } \ + } +#else #define FUNC_ENTER_CHECK_NAME(asrt) -#endif /* NDEBUG */ +#endif + +/* ---------------------------------------------------------------------------- + * Macros that set things up upon entering an HDF5 API call + * ---------------------------------------------------------------------------- + */ #define FUNC_ENTER_COMMON(asrt) \ bool err_occurred = false; \ @@ -1267,7 +1297,15 @@ extern char H5_lib_vers_info_g[]; else \ api_ctx_pushed = true; -/* Use this macro for all "normal" API functions */ +/* ---------------------------------------------------------------------------- + * HDF5 API call entry macros + * + * These are all of the form `FUNC_ENTER_*`. Every HDF5 API call will begin + * with one of these macros immediately after the variable declarations. + * ---------------------------------------------------------------------------- + */ + +/* Use this macro for all "normal" public API functions */ #define FUNC_ENTER_API(err) \ { \ { \ @@ -1282,8 +1320,8 @@ extern char H5_lib_vers_info_g[]; { /* - * Use this macro for API functions that shouldn't clear the error stack - * like H5Eprint and H5Ewalk. + * Use this macro for public API functions that shouldn't clear the error stack + * like H5Eprint and H5Ewalk. */ #define FUNC_ENTER_API_NOCLEAR(err) \ { \ @@ -1297,10 +1335,9 @@ extern char H5_lib_vers_info_g[]; { /* - * Use this macro for API functions that shouldn't perform _any_ initialization - * of the library or an interface, just perform tracing, etc. Examples - * are: H5is_library_threadsafe, H5VLretrieve_lib_state, etc. - * + * Use this macro for public API functions that shouldn't perform _any_ + * initialization of the library or an interface, just perform tracing, etc. + * Examples are: H5is_library_threadsafe, H5VLretrieve_lib_state, etc. */ #define FUNC_ENTER_API_NOINIT \ { \ @@ -1326,10 +1363,9 @@ extern char H5_lib_vers_info_g[]; { /* - * Use this macro for API functions that should only perform initialization - * of the library or an interface, but not push any state (API context, - * function name, etc.) examples are: H5open. - * + * Use this macro for public API functions that should only perform + * initialization of the library or an interface, but not push any state (API + * context, function name, etc.). Examples are: H5open. */ #define FUNC_ENTER_API_NOPUSH(err) \ { \ @@ -1342,11 +1378,10 @@ extern char H5_lib_vers_info_g[]; { /* - * Use this macro for API functions that shouldn't perform _any_ initialization - * of the library or an interface, or push themselves on the function - * stack, or perform tracing, etc. This macro _only_ sanity checks the - * API name itself. Examples are: H5TSmutex_acquire, H5close - * + * Use this macro for public API functions that shouldn't perform _any_ + * initialization of the library or an interface, or push themselves on the + * function stack, or perform tracing, etc. This macro _only_ sanity checks + * the API name itself. Examples are: H5TSmutex_acquire */ #define FUNC_ENTER_API_NAMECHECK_ONLY \ { \ @@ -1366,14 +1401,14 @@ extern char H5_lib_vers_info_g[]; /* Use this macro for all "normal" non-API functions */ #define FUNC_ENTER_NOAPI(err) \ { \ - FUNC_ENTER_COMMON(!H5_IS_API(__func__)); \ + FUNC_ENTER_COMMON(H5_IS_PRIV(__func__)); \ FUNC_ENTER_NOAPI_INIT(err) \ if (H5_LIKELY(H5_PKG_INIT_VAR || !H5_TERM_GLOBAL)) { /* Use this macro for all non-API functions, which propagate errors, but don't issue them */ #define FUNC_ENTER_NOAPI_NOERR \ { \ - FUNC_ENTER_COMMON_NOERR(!H5_IS_API(__func__)); \ + FUNC_ENTER_COMMON_NOERR(H5_IS_PRIV(__func__)); \ FUNC_ENTER_NOAPI_INIT(-) \ if (H5_LIKELY(H5_PKG_INIT_VAR || !H5_TERM_GLOBAL)) { @@ -1387,7 +1422,7 @@ extern char H5_lib_vers_info_g[]; */ #define FUNC_ENTER_NOAPI_NOINIT \ { \ - FUNC_ENTER_COMMON(!H5_IS_API(__func__)); \ + FUNC_ENTER_COMMON(H5_IS_PRIV(__func__)); \ if (H5_LIKELY(H5_PKG_INIT_VAR || !H5_TERM_GLOBAL)) { /* @@ -1401,28 +1436,28 @@ extern char H5_lib_vers_info_g[]; */ #define FUNC_ENTER_NOAPI_NOINIT_NOERR \ { \ - FUNC_ENTER_COMMON_NOERR(!H5_IS_API(__func__)); \ + FUNC_ENTER_COMMON_NOERR(H5_IS_PRIV(__func__)); \ if (H5_LIKELY(H5_PKG_INIT_VAR || !H5_TERM_GLOBAL)) { /* - * Use this macro for non-API functions that shouldn't perform _any_ initialization - * of the library or an interface, or push themselves on the function - * stack, or perform tracing, etc. This macro _only_ sanity checks the - * API name itself. Examples are private routines in the H5TS package. - * + * Use this macro for non-API functions that shouldn't perform _any_ + * initialization of the library or an interface, or push themselves on the + * function stack, or perform tracing, etc. This macro _only_ sanity checks + * the API name itself. Examples are private routines in the H5TS package. */ #define FUNC_ENTER_NOAPI_NAMECHECK_ONLY \ { \ - FUNC_ENTER_COMMON_NOERR(!H5_IS_API(__func__)); + FUNC_ENTER_COMMON_NOERR(H5_IS_PRIV(__func__)); /* Use the following two macros as replacements for the FUNC_ENTER_NOAPI * and FUNC_ENTER_NOAPI_NOINIT macros when the function needs to set - * up a metadata tag. */ + * up a metadata tag. + */ #define FUNC_ENTER_NOAPI_TAG(tag, err) \ { \ haddr_t prev_tag = HADDR_UNDEF; \ \ - FUNC_ENTER_COMMON(!H5_IS_API(__func__)); \ + FUNC_ENTER_COMMON(H5_IS_PRIV(__func__)); \ H5AC_tag(tag, &prev_tag); \ FUNC_ENTER_NOAPI_INIT(err) \ if (H5_LIKELY(H5_PKG_INIT_VAR || !H5_TERM_GLOBAL)) { @@ -1431,24 +1466,27 @@ extern char H5_lib_vers_info_g[]; { \ haddr_t prev_tag = HADDR_UNDEF; \ \ - FUNC_ENTER_COMMON(!H5_IS_API(__func__)); \ + FUNC_ENTER_COMMON(H5_IS_PRIV(__func__)); \ H5AC_tag(tag, &prev_tag); \ if (H5_LIKELY(H5_PKG_INIT_VAR || !H5_TERM_GLOBAL)) { -/* Use this macro for all "normal" package-level functions */ +/* Use this macro for all "normal" package-level and static functions */ #define FUNC_ENTER_PACKAGE \ { \ FUNC_ENTER_COMMON(H5_IS_PKG(__func__)); \ if (H5_LIKELY(H5_PKG_INIT_VAR || !H5_TERM_GLOBAL)) { -/* Use this macro for package-level functions which propagate errors, but don't issue them */ +/* Use this macro for package-level and static functions which propagate + * errors, but don't issue them + */ #define FUNC_ENTER_PACKAGE_NOERR \ { \ FUNC_ENTER_COMMON_NOERR(H5_IS_PKG(__func__)); \ if (H5_LIKELY(H5_PKG_INIT_VAR || !H5_TERM_GLOBAL)) { /* Use the following macro as replacement for the FUNC_ENTER_PACKAGE - * macro when the function needs to set up a metadata tag. */ + * macro when the function needs to set up a metadata tag. + */ #define FUNC_ENTER_PACKAGE_TAG(tag) \ { \ haddr_t prev_tag = HADDR_UNDEF; \ @@ -1458,25 +1496,33 @@ extern char H5_lib_vers_info_g[]; if (H5_LIKELY(H5_PKG_INIT_VAR || !H5_TERM_GLOBAL)) { /* - * Use this macro for non-API functions that shouldn't perform _any_ initialization - * of the library or an interface, or push themselves on the function - * stack, or perform tracing, etc. This macro _only_ sanity checks the - * API name itself. Examples are static routines in the H5TS package. - * + * Use this macro for package-level or static functions that shouldn't perform + * _any_ initialization of the library or an interface, or push themselves on + * the function stack, or perform tracing, etc. This macro _only_ sanity + * checks the API name itself. Examples are static routines in the H5TS package. */ #define FUNC_ENTER_PACKAGE_NAMECHECK_ONLY \ { \ FUNC_ENTER_COMMON_NOERR(H5_IS_PKG(__func__)); -/*------------------------------------------------------------------------- - * Purpose: Register function exit for code profiling. This should be - * the last statement executed by a function. - *------------------------------------------------------------------------- +/* ---------------------------------------------------------------------------- + * HDF5 API call leave macros + * + * These are all of the form `FUNC_LEAVE_*` and need to match the FUNC_ENTER + * macro used when entering. The PACKAGE FUNC_ENTER macros use the NOAPI + * FUNC_LEAVE macros. + * + * The FUNC_LEAVE macro will be the last statement in an HDF5 API call. + * + * NOTE: All FUNC_LEAVE macros begin with a semicolon to prevent compiler + * warnings from having the done: target right before the scope-closing + * bracket. Labels at the end of compound statements is a C23 extension. + * ---------------------------------------------------------------------------- */ #define FUNC_LEAVE_API(ret_value) \ ; \ - } /*end scope from end of FUNC_ENTER*/ \ + } /* end scope from end of FUNC_ENTER */ \ if (H5_LIKELY(api_ctx_pushed)) { \ (void)H5CX_pop(true); \ api_ctx_pushed = false; \ @@ -1486,35 +1532,35 @@ extern char H5_lib_vers_info_g[]; H5_API_UNLOCK \ return (ret_value); \ } \ - } /*end scope from beginning of FUNC_ENTER*/ + } /* end scope from beginning of FUNC_ENTER */ /* Use this macro to match the FUNC_ENTER_API_NOINIT macro */ #define FUNC_LEAVE_API_NOINIT(ret_value) \ ; \ - } /*end scope from end of FUNC_ENTER*/ \ + } /* end scope from end of FUNC_ENTER */ \ if (H5_UNLIKELY(err_occurred)) \ (void)H5E_dump_api_stack(); \ H5_API_UNLOCK \ return (ret_value); \ } \ } \ - } /*end scope from beginning of FUNC_ENTER*/ + } /* end scope from beginning of FUNC_ENTER */ /* Use this macro to match the FUNC_ENTER_API_NOINIT_NOERR macro */ #define FUNC_LEAVE_API_NOERR(ret_value) \ ; \ - } /*end scope from end of FUNC_ENTER*/ \ + } /* end scope from end of FUNC_ENTER */ \ H5_API_UNLOCK \ return (ret_value); \ } \ } \ } \ - } /*end scope from beginning of FUNC_ENTER*/ + } /* end scope from beginning of FUNC_ENTER */ /* Use this macro to match the FUNC_ENTER_API_NOPUSH macro */ #define FUNC_LEAVE_API_NOPUSH(ret_value) \ ; \ - } /*end scope from end of FUNC_ENTER*/ \ + } /* end scope from end of FUNC_ENTER */ \ if (H5_UNLIKELY(err_occurred)) \ (void)H5E_dump_api_stack(); \ H5_API_UNLOCK \ @@ -1523,47 +1569,49 @@ extern char H5_lib_vers_info_g[]; } \ } \ } \ - } /*end scope from beginning of FUNC_ENTER*/ + } /* end scope from beginning of FUNC_ENTER */ /* Use this macro to match the FUNC_ENTER_API_NAMECHECK_ONLY macro */ #define FUNC_LEAVE_API_NAMECHECK_ONLY(ret_value) \ ; \ - } /*end scope from end of FUNC_ENTER*/ \ + } /* end scope from end of FUNC_ENTER */ \ return (ret_value); \ } \ } \ } \ } \ } \ - } /*end scope from beginning of FUNC_ENTER*/ + } /* end scope from beginning of FUNC_ENTER */ +/* Use this macro to match NOAPI and PACKAGE macros which return a value */ #define FUNC_LEAVE_NOAPI(ret_value) \ ; \ - } /*end scope from end of FUNC_ENTER*/ \ + } /* end scope from end of FUNC_ENTER */ \ return (ret_value); \ - } /*end scope from beginning of FUNC_ENTER*/ + } /* end scope from beginning of FUNC_ENTER */ +/* Use this macro to match NOAPI and PACKAGE macros which do not return a value */ #define FUNC_LEAVE_NOAPI_VOID \ ; \ - } /*end scope from end of FUNC_ENTER*/ \ + } /* end scope from end of FUNC_ENTER */ \ return; \ - } /*end scope from beginning of FUNC_ENTER*/ + } /* end scope from beginning of FUNC_ENTER */ /* Use these macros to match the FUNC_ENTER_NOAPI_NAMECHECK_ONLY macro */ #define FUNC_LEAVE_NOAPI_NAMECHECK_ONLY(ret_value) \ return (ret_value); \ - } /*end scope from beginning of FUNC_ENTER*/ + } /* end scope from beginning of FUNC_ENTER */ #define FUNC_LEAVE_NOAPI_VOID_NAMECHECK_ONLY \ return; \ - } /*end scope from beginning of FUNC_ENTER*/ + } /* end scope from beginning of FUNC_ENTER */ -/* Use this macro when exiting a function that set up a metadata tag */ +/* Use this macro when exiting a function that sets up a metadata tag */ #define FUNC_LEAVE_NOAPI_TAG(ret_value) \ ; \ - } /*end scope from end of FUNC_ENTER*/ \ + } /* end scope from end of FUNC_ENTER */ \ H5AC_tag(prev_tag, NULL); \ return (ret_value); \ - } /*end scope from beginning of FUNC_ENTER*/ + } /* end scope from beginning of FUNC_ENTER */ /* Macros to declare package initialization function, if a package initialization routine is defined */ #define H5_PKG_DECLARE_YES_FUNC(pkg) extern herr_t H5_PACKAGE_INIT_FUNC(pkg)(void); @@ -1578,13 +1626,20 @@ H5_PKG_DECLARE_VAR(H5_MY_PKG) H5_PKG_DECLARE_FUNC(H5_MY_PKG_INIT, H5_MY_PKG) #endif -/* Macro to begin/end tagging (when FUNC_ENTER_*TAG macros are insufficient). - * Make sure to use HGOTO_ERROR_TAG and HGOTO_DONE_TAG between these macros! */ +/* ---------------------------------------------------------------------------- + * Metadata cache tagging macros (when FUNC_ENTER_*TAG macros are insufficient) + * + * Make sure to use HGOTO_ERROR_TAG and HGOTO_DONE_TAG between these macros! + * ---------------------------------------------------------------------------- + */ + +/* Macro to begin tagging */ #define H5_BEGIN_TAG(tag) \ { \ haddr_t prv_tag = HADDR_UNDEF; \ H5AC_tag(tag, &prv_tag); +/* Macro to end tagging */ #define H5_END_TAG \ H5AC_tag(prv_tag, NULL); \ } diff --git a/src/H5public.h b/src/H5public.h index d25d2946e48..62e0db9764b 100644 --- a/src/H5public.h +++ b/src/H5public.h @@ -75,11 +75,11 @@ /** * For major interface/format changes */ -#define H5_VERS_MAJOR 1 +#define H5_VERS_MAJOR 2 /** * For minor interface/format changes */ -#define H5_VERS_MINOR 17 +#define H5_VERS_MINOR 0 /** * For tweaks, bug-fixes, or development */ @@ -91,11 +91,11 @@ /** * Short version string */ -#define H5_VERS_STR "1.17.0" +#define H5_VERS_STR "2.0.0" /** * Full version string */ -#define H5_VERS_INFO "HDF5 library version: 1.17.0" +#define H5_VERS_INFO "HDF5 library version: 2.0.0" #define H5check() H5check_version(H5_VERS_MAJOR, H5_VERS_MINOR, H5_VERS_RELEASE) diff --git a/src/H5trace.c b/src/H5trace.c index 6a6917142f5..88dd0fd4791 100644 --- a/src/H5trace.c +++ b/src/H5trace.c @@ -1452,12 +1452,8 @@ H5_trace_args(H5RS_str_t *rs, const char *type, va_list ap) H5RS_acat(rs, "H5F_LIBVER_V114"); break; - case H5F_LIBVER_V116: - H5RS_acat(rs, "H5F_LIBVER_V116"); - break; - - case H5F_LIBVER_V118: - HDcompile_assert(H5F_LIBVER_LATEST == H5F_LIBVER_V118); + case H5F_LIBVER_V200: + HDcompile_assert(H5F_LIBVER_LATEST == H5F_LIBVER_V200); H5RS_acat(rs, "H5F_LIBVER_LATEST"); break; diff --git a/test/chunk_info.c b/test/chunk_info.c index 335542c000a..6fd3b9ba09e 100644 --- a/test/chunk_info.c +++ b/test/chunk_info.c @@ -49,9 +49,13 @@ #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_v200", + NULL}; /* File to be used in test_failed_attempts */ #define FILTERMASK_FILE "tflt_msk" diff --git a/test/dtypes.c b/test/dtypes.c index 9b1436bd10e..237e70c814f 100644 --- a/test/dtypes.c +++ b/test/dtypes.c @@ -10126,7 +10126,7 @@ test_versionbounds(void) hsize_t arr_dim[] = {ARRAY_LEN}; /* Length of the array */ int low, high; /* Indices for iterating over versions */ H5F_libver_t versions[] = {H5F_LIBVER_EARLIEST, H5F_LIBVER_V18, H5F_LIBVER_V110, - H5F_LIBVER_V112, H5F_LIBVER_V114, H5F_LIBVER_V116}; + H5F_LIBVER_V112, H5F_LIBVER_V114, H5F_LIBVER_V200}; int versions_count = 6; /* Number of version bounds in the array */ unsigned highest_version; /* Highest version in nested datatypes */ color_t enum_val; /* Enum type index */ diff --git a/test/external_common.c b/test/external_common.c index 52a14c7e8a4..e94d34d0e30 100644 --- a/test/external_common.c +++ b/test/external_common.c @@ -31,13 +31,17 @@ reset_raw_data_files(bool is_env) { int fd = 0; /* external file descriptor */ size_t i, j; /* iterators */ - hssize_t n; /* bytes of I/O */ char filename[1024]; /* file name */ int data[PART_SIZE]; /* raw data buffer */ uint8_t *garbage = NULL; /* buffer of garbage data */ size_t garbage_count; /* size of garbage buffer */ size_t garbage_bytes; /* # of garbage bytes written to file */ + h5_posix_io_ret_t n; /* bytes of I/O - use our platform-independent POSIX + * I/O return type to avoid warnings on platforms + * where the return type isn't ssize_t (e.g., Windows) + */ + /* Set up garbage buffer */ garbage_count = N_EXT_FILES * GARBAGE_PER_FILE; if (NULL == (garbage = (uint8_t *)calloc(garbage_count, sizeof(uint8_t)))) @@ -69,7 +73,7 @@ reset_raw_data_files(bool is_env) /* Fill array with data */ for (j = 0; j < PART_SIZE; j++) { data[j] = (int)(i * 25 + j); - } /* end for */ + } /* Write raw data to the file. */ n = HDwrite(fd, data, sizeof(data)); @@ -78,8 +82,7 @@ reset_raw_data_files(bool is_env) /* Close this file */ HDclose(fd); - - } /* end for */ + } /* The *w files are only pre-filled with the garbage data and are * used to verify that write operations work correctly. The individual @@ -105,8 +108,8 @@ reset_raw_data_files(bool is_env) /* Close this file */ HDclose(fd); + } - } /* end for */ free(garbage); return SUCCEED; diff --git a/test/h5test.c b/test/h5test.c index 05e16f883f0..326b97965ce 100644 --- a/test/h5test.c +++ b/test/h5test.c @@ -106,8 +106,7 @@ const char *LIBVER_NAMES[] = {"earliest", /* H5F_LIBVER_EARLIEST = 0 */ "v110", /* H5F_LIBVER_V110 = 2 */ "v112", /* H5F_LIBVER_V112 = 3 */ "v114", /* H5F_LIBVER_V114 = 4 */ - "v116", /* H5F_LIBVER_V116 = 5 */ - "v118", /* H5F_LIBVER_V118 = 6 */ + "v200", /* H5F_LIBVER_V200 = 5 */ "latest", /* H5F_LIBVER_LATEST */ NULL}; @@ -789,7 +788,7 @@ h5_get_vfd_fapl(hid_t fapl) /* Multi-file driver, general case of the split driver */ H5FD_mem_t memb_map[H5FD_MEM_NTYPES]; hid_t memb_fapl[H5FD_MEM_NTYPES]; - const char *memb_name[H5FD_MEM_NTYPES]; + const char *memb_name[H5FD_MEM_NTYPES] = {0}; char *sv[H5FD_MEM_NTYPES]; haddr_t memb_addr[H5FD_MEM_NTYPES]; H5FD_mem_t mt; @@ -797,7 +796,6 @@ h5_get_vfd_fapl(hid_t fapl) memset(memb_map, 0, sizeof(memb_map)); memset(memb_fapl, 0, sizeof(memb_fapl)); - memset(memb_name, 0, sizeof(memb_name)); memset(memb_addr, 0, sizeof(memb_addr)); assert(strlen(multi_letters) == H5FD_MEM_NTYPES); @@ -808,7 +806,7 @@ h5_get_vfd_fapl(hid_t fapl) snprintf(sv[mt], multi_memname_maxlen, "%%s-%c.h5", multi_letters[mt]); memb_name[mt] = sv[mt]; memb_addr[mt] = (haddr_t)MAX(mt - 1, 0) * (HADDR_MAX / 10); - } /* end for */ + } if (H5Pset_fapl_multi(fapl, memb_map, memb_fapl, memb_name, memb_addr, false) < 0) goto error; @@ -1628,10 +1626,14 @@ int h5_make_local_copy(const char *origfilename, const char *local_copy_name) { int fd_old = (-1), fd_new = (-1); /* File descriptors for copying data */ - ssize_t nread; /* Number of bytes read in */ void *buf = NULL; /* Buffer for copying data */ const char *filename = H5_get_srcdir_filename(origfilename); /* Get the test file name to copy */ + h5_posix_io_ret_t nread; /* bytes of I/O - use our platform-independent POSIX + * I/O return type to avoid warnings on platforms + * where the return type isn't ssize_t (e.g., Windows) + */ + if (!filename) goto error; @@ -1646,8 +1648,8 @@ h5_make_local_copy(const char *origfilename, const char *local_copy_name) goto error; /* Copy data */ - while ((nread = HDread(fd_old, buf, (size_t)READ_BUF_SIZE)) > 0) - if (HDwrite(fd_new, buf, (size_t)nread) < 0) + while ((nread = HDread(fd_old, buf, (h5_posix_io_t)READ_BUF_SIZE)) > 0) + if (HDwrite(fd_new, buf, (h5_posix_io_t)nread) < 0) goto error; /* Close files */ diff --git a/test/hyperslab.c b/test/hyperslab.c index cd9fcab6c57..3a84f9758bc 100644 --- a/test/hyperslab.c +++ b/test/hyperslab.c @@ -985,7 +985,7 @@ test_array_fill(size_t lo, size_t hi) TESTING(s); /* Initialize */ - if (NULL == (dst = (int *)calloc(sizeof(int), ARRAY_FILL_SIZE * hi))) + if (NULL == (dst = (int *)calloc((ARRAY_FILL_SIZE * hi), sizeof(int)))) TEST_ERROR; /* Setup */ diff --git a/test/ntypes.c b/test/ntypes.c index 3fcd40ffb4b..14357087f2a 100644 --- a/test/ntypes.c +++ b/test/ntypes.c @@ -335,9 +335,9 @@ test_compound_dtype2(hid_t file) TESTING("nested compound datatype"); /* Allocate space for the points & check arrays */ - if (NULL == (points = malloc(sizeof(s1) * DIM0 * DIM1))) + if (NULL == (points = (s1 *)malloc((DIM0 * DIM1) * sizeof(s1)))) TEST_ERROR; - if (NULL == (check = calloc(DIM0 * DIM1, sizeof(s1)))) + if (NULL == (check = (s1 *)calloc((DIM0 * DIM1), sizeof(s1)))) TEST_ERROR; /* Initialize the dataset */ @@ -533,9 +533,9 @@ test_compound_dtype2(hid_t file) /* Read the dataset back. Temporary buffer is for special platforms like * Cray */ - if (NULL == (tmp = malloc(DIM0 * DIM1 * H5Tget_size(native_type)))) + if (NULL == (tmp = malloc((DIM0 * DIM1) * H5Tget_size(native_type)))) TEST_ERROR; - if (NULL == (bkg = calloc(DIM0 * DIM1, sizeof(s1)))) + if (NULL == (bkg = calloc((DIM0 * DIM1), sizeof(s1)))) TEST_ERROR; if (H5Dread(dataset, native_type, H5S_ALL, H5S_ALL, H5P_DEFAULT, tmp) < 0) @@ -648,9 +648,9 @@ test_compound_dtype(hid_t file) TESTING("compound datatype"); /* Allocate space for the points & check arrays */ - if (NULL == (points = malloc(sizeof(s1) * DIM0 * DIM1))) + if (NULL == (points = (s1 *)malloc((DIM0 * DIM1) * sizeof(s1)))) TEST_ERROR; - if (NULL == (check = calloc(DIM0 * DIM1, sizeof(s1)))) + if (NULL == (check = (s1 *)calloc((DIM0 * DIM1), sizeof(s1)))) TEST_ERROR; /* Initialize the dataset */ @@ -752,9 +752,9 @@ test_compound_dtype(hid_t file) /* Read the dataset back. Temporary buffer is for special platforms like * Cray */ - if (NULL == (tmp = malloc(DIM0 * DIM1 * H5Tget_size(native_type)))) + if (NULL == (tmp = malloc((DIM0 * DIM1) * H5Tget_size(native_type)))) TEST_ERROR; - if (NULL == (bkg = calloc(DIM0 * DIM1, sizeof(s1)))) + if (NULL == (bkg = calloc((DIM0 * DIM1), sizeof(s1)))) TEST_ERROR; if (H5Dread(dataset, native_type, H5S_ALL, H5S_ALL, H5P_DEFAULT, tmp) < 0) @@ -856,9 +856,9 @@ test_compound_dtype3(hid_t file) TESTING("compound datatype with array as field"); /* Allocate space for the points & check arrays */ - if (NULL == (points = malloc(sizeof(s1) * DIM0 * DIM1))) + if (NULL == (points = (s1 *)malloc((DIM0 * DIM1) * sizeof(s1)))) TEST_ERROR; - if (NULL == (check = calloc(DIM0 * DIM1, sizeof(s1)))) + if (NULL == (check = (s1 *)calloc((DIM0 * DIM1), sizeof(s1)))) TEST_ERROR; /* Initialize the dataset */ @@ -980,9 +980,9 @@ test_compound_dtype3(hid_t file) /* Read the dataset back. Temporary buffer is for special platforms like * Cray */ - if (NULL == (tmp = malloc(DIM0 * DIM1 * H5Tget_size(native_type)))) + if (NULL == (tmp = malloc((DIM0 * DIM1) * H5Tget_size(native_type)))) TEST_ERROR; - if (NULL == (bkg = calloc(DIM0 * DIM1, sizeof(s1)))) + if (NULL == (bkg = calloc((DIM0 * DIM1), sizeof(s1)))) TEST_ERROR; if (H5Dread(dataset, native_type, H5S_ALL, H5S_ALL, H5P_DEFAULT, tmp) < 0) @@ -1091,9 +1091,9 @@ test_compound_opaque(hid_t file) TESTING("compound datatype with opaque field"); /* Allocate space for the points & check arrays */ - if (NULL == (points = malloc(sizeof(s1) * DIM0 * DIM1))) + if (NULL == (points = (s1 *)malloc((DIM0 * DIM1) * sizeof(s1)))) TEST_ERROR; - if (NULL == (check = calloc(DIM0 * DIM1, sizeof(s1)))) + if (NULL == (check = (s1 *)calloc((DIM0 * DIM1), sizeof(s1)))) TEST_ERROR; /* Initialize the dataset */ @@ -1206,9 +1206,9 @@ test_compound_opaque(hid_t file) /* Read the dataset back. Temporary buffer is for special platforms like * Cray */ - if (NULL == (tmp = malloc(DIM0 * DIM1 * H5Tget_size(native_type)))) + if (NULL == (tmp = malloc((DIM0 * DIM1) * H5Tget_size(native_type)))) TEST_ERROR; - if (NULL == (bkg = calloc(DIM0 * DIM1, sizeof(s1)))) + if (NULL == (bkg = calloc((DIM0 * DIM1), sizeof(s1)))) TEST_ERROR; if (H5Dread(dataset, native_type, H5S_ALL, H5S_ALL, H5P_DEFAULT, tmp) < 0) @@ -1469,9 +1469,9 @@ test_array_dtype(hid_t file) TESTING("array of compound datatype"); /* Allocate space for the points & check arrays */ - if (NULL == (points = malloc(sizeof(s1) * DIM0 * DIM1 * 5))) + if (NULL == (points = (s1 *)malloc((DIM0 * DIM1 * 5) * sizeof(s1)))) TEST_ERROR; - if (NULL == (check = calloc(DIM0 * DIM1 * 5, sizeof(s1)))) + if (NULL == (check = (s1 *)calloc((DIM0 * DIM1 * 5), sizeof(s1)))) TEST_ERROR; /* Initialize the dataset */ @@ -2428,9 +2428,9 @@ test_refer_dtype2(hid_t file) TESTING("dataset region reference"); /* Allocate write & read buffers */ - if (NULL == (dwbuf = malloc(sizeof(uint8_t) * SPACE2_DIM1 * SPACE2_DIM2))) + if (NULL == (dwbuf = (uint8_t *)malloc((SPACE2_DIM1 * SPACE2_DIM2) * sizeof(uint8_t)))) TEST_ERROR; - if (NULL == (drbuf = calloc(SPACE2_DIM1 * SPACE2_DIM2, sizeof(uint8_t)))) + if (NULL == (drbuf = (uint8_t *)calloc((SPACE2_DIM1 * SPACE2_DIM2), sizeof(uint8_t)))) TEST_ERROR; /* Create dataspace for datasets */ diff --git a/test/tfile.c b/test/tfile.c index f7147806001..fa93f4e1244 100644 --- a/test/tfile.c +++ b/test/tfile.c @@ -6189,8 +6189,7 @@ test_libver_bounds_super_create(hid_t fapl, hid_t fcpl, htri_t is_swmr, htri_t n case H5F_LIBVER_V110: case H5F_LIBVER_V112: case H5F_LIBVER_V114: - case H5F_LIBVER_V116: - case H5F_LIBVER_V118: + case H5F_LIBVER_V200: ok = (f->shared->sblock->super_vers == HDF5_SUPERBLOCK_VERSION_3); VERIFY(ok, true, "HDF5_superblock_ver_bounds"); break; diff --git a/test/trefer.c b/test/trefer.c index ac35ea5978f..bc443b7b4be 100644 --- a/test/trefer.c +++ b/test/trefer.c @@ -127,7 +127,7 @@ test_reference_params(void) wbuf = (H5R_ref_t *)calloc(SPACE1_DIM1, sizeof(H5R_ref_t)); rbuf = (H5R_ref_t *)calloc(SPACE1_DIM1, sizeof(H5R_ref_t)); tbuf = (H5R_ref_t *)calloc(SPACE1_DIM1, sizeof(H5R_ref_t)); - obuf = calloc(SPACE1_DIM1, sizeof(unsigned)); + obuf = (unsigned *)calloc(SPACE1_DIM1, sizeof(unsigned)); for (i = 0; i < SPACE1_DIM1; i++) obuf[i] = i * 3; @@ -468,10 +468,10 @@ test_reference_obj(void) MESSAGE(5, ("Testing Object Reference Functions\n")); /* Allocate write & read buffers */ - wbuf = calloc(SPACE1_DIM1, sizeof(H5R_ref_t)); - rbuf = calloc(SPACE1_DIM1, sizeof(H5R_ref_t)); - ibuf = calloc(SPACE1_DIM1, sizeof(unsigned)); - obuf = calloc(SPACE1_DIM1, sizeof(unsigned)); + wbuf = (H5R_ref_t *)calloc(SPACE1_DIM1, sizeof(H5R_ref_t)); + rbuf = (H5R_ref_t *)calloc(SPACE1_DIM1, sizeof(H5R_ref_t)); + ibuf = (unsigned *)calloc(SPACE1_DIM1, sizeof(unsigned)); + obuf = (unsigned *)calloc(SPACE1_DIM1, sizeof(unsigned)); for (i = 0; i < SPACE1_DIM1; i++) obuf[i] = i * 3; @@ -571,7 +571,7 @@ test_reference_obj(void) VERIFY(obj_type, H5O_TYPE_NAMED_DATATYPE, "H5Rget_obj_type3"); /* Check copying a reference */ - wbuf_cp = calloc(1, sizeof(H5R_ref_t)); + wbuf_cp = (H5R_ref_t *)calloc(1, sizeof(H5R_ref_t)); ret = H5Rcopy(&wbuf[0], &wbuf_cp[0]); CHECK(ret, FAIL, "H5Rcopy"); @@ -838,9 +838,9 @@ test_reference_vlen_obj(void) MESSAGE(5, ("Testing Object Reference Functions within VLEN type\n")); /* Allocate write & read buffers */ - wbuf = calloc(SPACE1_DIM1, sizeof(H5R_ref_t)); - ibuf = calloc(SPACE1_DIM1, sizeof(unsigned)); - obuf = calloc(SPACE1_DIM1, sizeof(unsigned)); + wbuf = (H5R_ref_t *)calloc(SPACE1_DIM1, sizeof(H5R_ref_t)); + ibuf = (unsigned *)calloc(SPACE1_DIM1, sizeof(unsigned)); + obuf = (unsigned *)calloc(SPACE1_DIM1, sizeof(unsigned)); for (i = 0; i < SPACE1_DIM1; i++) obuf[i] = i * 3; @@ -1102,8 +1102,8 @@ test_reference_cmpnd_obj(void) MESSAGE(5, ("Testing Object Reference Functions within compound type\n")); /* Allocate write & read buffers */ - ibuf = calloc(SPACE1_DIM1, sizeof(unsigned)); - obuf = calloc(SPACE1_DIM1, sizeof(unsigned)); + ibuf = (unsigned *)calloc(SPACE1_DIM1, sizeof(unsigned)); + obuf = (unsigned *)calloc(SPACE1_DIM1, sizeof(unsigned)); for (i = 0; i < SPACE1_DIM1; i++) obuf[i] = i * 3; @@ -1411,10 +1411,10 @@ test_reference_region(H5F_libver_t libver_low, H5F_libver_t libver_high) MESSAGE(5, ("Testing Dataset Region Reference Functions\n")); /* Allocate write & read buffers */ - wbuf = calloc(SPACE1_DIM1, sizeof(H5R_ref_t)); - rbuf = calloc(SPACE1_DIM1, sizeof(H5R_ref_t)); - dwbuf = (uint8_t *)calloc((size_t)(SPACE2_DIM1 * SPACE2_DIM2), sizeof(uint8_t)); - drbuf = (uint8_t *)calloc((size_t)(SPACE2_DIM1 * SPACE2_DIM2), sizeof(uint8_t)); + wbuf = (H5R_ref_t *)calloc(SPACE1_DIM1, sizeof(H5R_ref_t)); + rbuf = (H5R_ref_t *)calloc(SPACE1_DIM1, sizeof(H5R_ref_t)); + dwbuf = (uint8_t *)calloc((SPACE2_DIM1 * SPACE2_DIM2), sizeof(uint8_t)); + drbuf = (uint8_t *)calloc((SPACE2_DIM1 * SPACE2_DIM2), sizeof(uint8_t)); for (tu8 = dwbuf, i = 0; i < (SPACE2_DIM1 * SPACE2_DIM2); i++) *tu8++ = (uint8_t)(i * 3); @@ -1867,10 +1867,10 @@ test_reference_region_1D(H5F_libver_t libver_low, H5F_libver_t libver_high) MESSAGE(5, ("Testing 1-D Dataset Region Reference Functions\n")); /* Allocate write & read buffers */ - wbuf = calloc((size_t)SPACE1_DIM1, sizeof(H5R_ref_t)); - rbuf = calloc((size_t)SPACE1_DIM1, sizeof(H5R_ref_t)); - dwbuf = (uint8_t *)calloc((size_t)SPACE3_DIM1, sizeof(uint8_t)); - drbuf = (uint8_t *)calloc((size_t)SPACE3_DIM1, sizeof(uint8_t)); + wbuf = (H5R_ref_t *)calloc(SPACE1_DIM1, sizeof(H5R_ref_t)); + rbuf = (H5R_ref_t *)calloc(SPACE1_DIM1, sizeof(H5R_ref_t)); + dwbuf = (uint8_t *)calloc(SPACE3_DIM1, sizeof(uint8_t)); + drbuf = (uint8_t *)calloc(SPACE3_DIM1, sizeof(uint8_t)); for (tu8 = dwbuf, i = 0; i < SPACE3_DIM1; i++) *tu8++ = (uint8_t)(i * 3); @@ -3125,10 +3125,10 @@ test_reference_compat_conv(void) } /* Allocate write & read buffers */ - wbuf_obj = calloc(SPACE1_DIM1, sizeof(hobj_ref_t)); - rbuf_obj = calloc(SPACE1_DIM1, sizeof(H5R_ref_t)); - wbuf_reg = calloc(SPACE1_DIM1, sizeof(hdset_reg_ref_t)); - rbuf_reg = calloc(SPACE1_DIM1, sizeof(H5R_ref_t)); + wbuf_obj = (hobj_ref_t *)calloc(SPACE1_DIM1, sizeof(hobj_ref_t)); + rbuf_obj = (H5R_ref_t *)calloc(SPACE1_DIM1, sizeof(H5R_ref_t)); + wbuf_reg = (hdset_reg_ref_t *)calloc(SPACE1_DIM1, sizeof(hdset_reg_ref_t)); + rbuf_reg = (H5R_ref_t *)calloc(SPACE1_DIM1, sizeof(H5R_ref_t)); /* Create dataspace for datasets */ sid1 = H5Screate_simple(SPACE1_RANK, dims1, NULL); @@ -3434,17 +3434,17 @@ test_reference_perf(void) MESSAGE(5, ("Testing Object Reference Performance\n")); /* Allocate write & read buffers */ - wbuf = calloc(SPACE1_DIM1, sizeof(H5R_ref_t)); - obuf = calloc(SPACE1_DIM1, sizeof(unsigned)); - ibuf = calloc(SPACE1_DIM1, sizeof(unsigned)); - wbuf_deprec = calloc(SPACE1_DIM1, sizeof(hobj_ref_t)); - rbuf = calloc(SPACE1_DIM1, sizeof(H5R_ref_t)); - rbuf_deprec = calloc(SPACE1_DIM1, sizeof(hobj_ref_t)); - tbuf = calloc(SPACE1_DIM1, sizeof(H5R_ref_t)); - wbuf_reg = calloc(SPACE1_DIM1, sizeof(H5R_ref_t)); - rbuf_reg = calloc(SPACE1_DIM1, sizeof(H5R_ref_t)); - wbuf_reg_deprec = calloc(SPACE1_DIM1, sizeof(hdset_reg_ref_t)); - rbuf_reg_deprec = calloc(SPACE1_DIM1, sizeof(hdset_reg_ref_t)); + wbuf = (H5R_ref_t *)calloc(SPACE1_DIM1, sizeof(H5R_ref_t)); + obuf = (unsigned *)calloc(SPACE1_DIM1, sizeof(unsigned)); + ibuf = (unsigned *)calloc(SPACE1_DIM1, sizeof(unsigned)); + wbuf_deprec = (hobj_ref_t *)calloc(SPACE1_DIM1, sizeof(hobj_ref_t)); + rbuf = (H5R_ref_t *)calloc(SPACE1_DIM1, sizeof(H5R_ref_t)); + rbuf_deprec = (hobj_ref_t *)calloc(SPACE1_DIM1, sizeof(hobj_ref_t)); + tbuf = (H5R_ref_t *)calloc(SPACE1_DIM1, sizeof(H5R_ref_t)); + wbuf_reg = (H5R_ref_t *)calloc(SPACE1_DIM1, sizeof(H5R_ref_t)); + rbuf_reg = (H5R_ref_t *)calloc(SPACE1_DIM1, sizeof(H5R_ref_t)); + wbuf_reg_deprec = (hdset_reg_ref_t *)calloc(SPACE1_DIM1, sizeof(hdset_reg_ref_t)); + rbuf_reg_deprec = (hdset_reg_ref_t *)calloc(SPACE1_DIM1, sizeof(hdset_reg_ref_t)); for (i = 0; i < SPACE1_DIM1; i++) obuf[i] = i * 3; diff --git a/test/trefer_deprec.c b/test/trefer_deprec.c index 3f932f53b93..d06f5e39ef1 100644 --- a/test/trefer_deprec.c +++ b/test/trefer_deprec.c @@ -623,10 +623,10 @@ test_reference_region(H5F_libver_t libver_low, H5F_libver_t libver_high) MESSAGE(5, ("Testing Dataset Region Reference Functions\n")); /* Allocate write & read buffers */ - wbuf = calloc((size_t)SPACE1_DIM1, sizeof(hdset_reg_ref_t)); - rbuf = malloc(sizeof(hdset_reg_ref_t) * SPACE1_DIM1); - dwbuf = malloc(sizeof(uint8_t) * SPACE2_DIM1 * SPACE2_DIM2); - drbuf = calloc((size_t)(SPACE2_DIM1 * SPACE2_DIM2), sizeof(uint8_t)); + wbuf = (hdset_reg_ref_t *)calloc(SPACE1_DIM1, sizeof(hdset_reg_ref_t)); + rbuf = (hdset_reg_ref_t *)malloc(SPACE1_DIM1 * sizeof(hdset_reg_ref_t)); + dwbuf = (uint8_t *)malloc((SPACE2_DIM1 * SPACE2_DIM2) * sizeof(uint8_t)); + drbuf = (uint8_t *)calloc((SPACE2_DIM1 * SPACE2_DIM2), sizeof(uint8_t)); /* Create file access property list */ fapl = H5Pcreate(H5P_FILE_ACCESS); @@ -1064,10 +1064,10 @@ test_reference_region_1D(H5F_libver_t libver_low, H5F_libver_t libver_high) MESSAGE(5, ("Testing 1-D Dataset Region Reference Functions\n")); /* Allocate write & read buffers */ - wbuf = calloc((size_t)SPACE1_DIM1, sizeof(hdset_reg_ref_t)); - rbuf = malloc(sizeof(hdset_reg_ref_t) * SPACE1_DIM1); - dwbuf = malloc(sizeof(uint8_t) * SPACE3_DIM1); - drbuf = calloc((size_t)SPACE3_DIM1, sizeof(uint8_t)); + wbuf = (hdset_reg_ref_t *)calloc(SPACE1_DIM1, sizeof(hdset_reg_ref_t)); + rbuf = (hdset_reg_ref_t *)malloc(SPACE1_DIM1 * sizeof(hdset_reg_ref_t)); + dwbuf = (uint8_t *)malloc(SPACE3_DIM1 * sizeof(uint8_t)); + drbuf = (uint8_t *)calloc(SPACE3_DIM1, sizeof(uint8_t)); /* Create the file access property list */ fapl = H5Pcreate(H5P_FILE_ACCESS); @@ -1636,10 +1636,10 @@ test_reference_compat(void) MESSAGE(5, ("Testing Deprecated Object Reference Functions\n")); /* Allocate write & read buffers */ - wbuf_obj = calloc(SPACE1_DIM1, sizeof(hobj_ref_t)); - rbuf_obj = malloc(sizeof(hobj_ref_t) * SPACE1_DIM1); - wbuf_reg = calloc(SPACE1_DIM1, sizeof(hdset_reg_ref_t)); - rbuf_reg = malloc(sizeof(hdset_reg_ref_t) * SPACE1_DIM1); + wbuf_obj = (hobj_ref_t *)calloc(SPACE1_DIM1, sizeof(hobj_ref_t)); + rbuf_obj = (hobj_ref_t *)malloc(SPACE1_DIM1 * sizeof(hobj_ref_t)); + wbuf_reg = (hdset_reg_ref_t *)calloc(SPACE1_DIM1, sizeof(hdset_reg_ref_t)); + rbuf_reg = (hdset_reg_ref_t *)malloc(SPACE1_DIM1 * sizeof(hdset_reg_ref_t)); /* Create file */ fid1 = H5Fcreate(FILE1, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); diff --git a/test/tselect.c b/test/tselect.c index 6f9bc6f1426..21c3648d587 100644 --- a/test/tselect.c +++ b/test/tselect.c @@ -247,9 +247,9 @@ test_select_hyper(hid_t xfer_plist) MESSAGE(5, ("Testing Hyperslab Selection Functions\n")); /* Allocate write & read buffers */ - wbuf = (uint8_t *)malloc(sizeof(uint8_t) * SPACE2_DIM1 * SPACE2_DIM2); + wbuf = (uint8_t *)malloc((SPACE2_DIM1 * SPACE2_DIM2) * sizeof(uint8_t)); CHECK_PTR(wbuf, "malloc"); - rbuf = (uint8_t *)calloc((size_t)(SPACE3_DIM1 * SPACE3_DIM2), sizeof(uint8_t)); + rbuf = (uint8_t *)calloc((SPACE3_DIM1 * SPACE3_DIM2), sizeof(uint8_t)); CHECK_PTR(rbuf, "calloc"); /* Initialize write buffer */ @@ -501,9 +501,9 @@ test_select_point(hid_t xfer_plist) MESSAGE(5, ("Testing Element Selection Functions\n")); /* Allocate write & read buffers */ - wbuf = (uint8_t *)malloc(sizeof(uint8_t) * SPACE2_DIM1 * SPACE2_DIM2); + wbuf = (uint8_t *)malloc((SPACE2_DIM1 * SPACE2_DIM2) * sizeof(uint8_t)); CHECK_PTR(wbuf, "malloc"); - rbuf = (uint8_t *)calloc((size_t)(SPACE3_DIM1 * SPACE3_DIM2), sizeof(uint8_t)); + rbuf = (uint8_t *)calloc((SPACE3_DIM1 * SPACE3_DIM2), sizeof(uint8_t)); CHECK_PTR(rbuf, "calloc"); /* Initialize write buffer */ @@ -863,9 +863,9 @@ test_select_all(hid_t xfer_plist) MESSAGE(5, ("Testing 'All' Selection Functions\n")); /* Allocate write & read buffers */ - wbuf = (uint8_t *)malloc(sizeof(uint8_t) * SPACE4_DIM1 * SPACE4_DIM2 * SPACE4_DIM3); + wbuf = (uint8_t *)malloc((SPACE4_DIM1 * SPACE4_DIM2 * SPACE4_DIM3) * sizeof(uint8_t)); CHECK_PTR(wbuf, "malloc"); - rbuf = (uint8_t *)calloc((size_t)(SPACE4_DIM1 * SPACE4_DIM2 * SPACE4_DIM3), sizeof(uint8_t)); + rbuf = (uint8_t *)calloc((SPACE4_DIM1 * SPACE4_DIM2 * SPACE4_DIM3), sizeof(uint8_t)); CHECK_PTR(rbuf, "calloc"); /* Initialize write buffer */ @@ -950,9 +950,9 @@ test_select_all_hyper(hid_t xfer_plist) MESSAGE(5, ("Testing 'All' Selection Functions\n")); /* Allocate write & read buffers */ - wbuf = (uint8_t *)malloc(sizeof(uint8_t) * SPACE2_DIM1 * SPACE2_DIM2); + wbuf = (uint8_t *)malloc((SPACE2_DIM1 * SPACE2_DIM2) * sizeof(uint8_t)); CHECK_PTR(wbuf, "malloc"); - rbuf = (uint8_t *)calloc((size_t)(SPACE3_DIM1 * SPACE3_DIM2), sizeof(uint8_t)); + rbuf = (uint8_t *)calloc((SPACE3_DIM1 * SPACE3_DIM2), sizeof(uint8_t)); CHECK_PTR(rbuf, "calloc"); /* Initialize write buffer */ @@ -1104,9 +1104,9 @@ test_select_combo(void) MESSAGE(5, ("Testing Combination of Hyperslab & Element Selection Functions\n")); /* Allocate write & read buffers */ - wbuf = (uint8_t *)malloc(sizeof(uint8_t) * SPACE2_DIM1 * SPACE2_DIM2); + wbuf = (uint8_t *)malloc((SPACE2_DIM1 * SPACE2_DIM2) * sizeof(uint8_t)); CHECK_PTR(wbuf, "malloc"); - rbuf = (uint8_t *)calloc((size_t)(SPACE3_DIM1 * SPACE3_DIM2), sizeof(uint8_t)); + rbuf = (uint8_t *)calloc((SPACE3_DIM1 * SPACE3_DIM2), sizeof(uint8_t)); CHECK_PTR(rbuf, "calloc"); /* Initialize write buffer */ @@ -1299,9 +1299,9 @@ test_select_hyper_stride(hid_t xfer_plist) MESSAGE(5, ("Testing Hyperslabs with Strides Functionality\n")); /* Allocate write & read buffers */ - wbuf = (uint16_t *)malloc(sizeof(uint16_t) * SPACE2_DIM1 * SPACE2_DIM2); + wbuf = (uint16_t *)malloc((SPACE2_DIM1 * SPACE2_DIM2) * sizeof(uint16_t)); CHECK_PTR(wbuf, "malloc"); - rbuf = (uint16_t *)calloc((size_t)(SPACE3_DIM1 * SPACE3_DIM2), sizeof(uint16_t)); + rbuf = (uint16_t *)calloc((SPACE3_DIM1 * SPACE3_DIM2), sizeof(uint16_t)); CHECK_PTR(rbuf, "calloc"); /* Initialize write buffer */ @@ -1445,9 +1445,9 @@ test_select_hyper_contig(hid_t dset_type, hid_t xfer_plist) MESSAGE(5, ("Testing Contiguous Hyperslabs Functionality\n")); /* Allocate write & read buffers */ - wbuf = (uint16_t *)malloc(sizeof(uint16_t) * SPACE2_DIM1 * SPACE2_DIM2); + wbuf = (uint16_t *)malloc((SPACE2_DIM1 * SPACE2_DIM2) * sizeof(uint16_t)); CHECK_PTR(wbuf, "malloc"); - rbuf = (uint16_t *)calloc((size_t)(SPACE2_DIM1 * SPACE2_DIM2), sizeof(uint16_t)); + rbuf = (uint16_t *)calloc((SPACE2_DIM1 * SPACE2_DIM2), sizeof(uint16_t)); CHECK_PTR(rbuf, "calloc"); /* Initialize write buffer */ @@ -1585,10 +1585,9 @@ test_select_hyper_contig2(hid_t dset_type, hid_t xfer_plist) MESSAGE(5, ("Testing More Contiguous Hyperslabs Functionality\n")); /* Allocate write & read buffers */ - wbuf = (uint16_t *)malloc(sizeof(uint16_t) * SPACE8_DIM1 * SPACE8_DIM2 * SPACE8_DIM3 * SPACE8_DIM4); + wbuf = (uint16_t *)malloc((SPACE8_DIM1 * SPACE8_DIM2 * SPACE8_DIM3 * SPACE8_DIM4) * sizeof(uint16_t)); CHECK_PTR(wbuf, "malloc"); - rbuf = - (uint16_t *)calloc((size_t)(SPACE8_DIM1 * SPACE8_DIM2 * SPACE8_DIM3 * SPACE8_DIM4), sizeof(uint16_t)); + rbuf = (uint16_t *)calloc((SPACE8_DIM1 * SPACE8_DIM2 * SPACE8_DIM3 * SPACE8_DIM4), sizeof(uint16_t)); CHECK_PTR(rbuf, "calloc"); /* Initialize write buffer */ @@ -1731,10 +1730,9 @@ test_select_hyper_contig3(hid_t dset_type, hid_t xfer_plist) MESSAGE(5, ("Testing Yet More Contiguous Hyperslabs Functionality\n")); /* Allocate write & read buffers */ - wbuf = (uint16_t *)malloc(sizeof(uint16_t) * SPACE8_DIM1 * SPACE8_DIM2 * SPACE8_DIM3 * SPACE8_DIM4); + wbuf = (uint16_t *)malloc((SPACE8_DIM1 * SPACE8_DIM2 * SPACE8_DIM3 * SPACE8_DIM4) * sizeof(uint16_t)); CHECK_PTR(wbuf, "malloc"); - rbuf = - (uint16_t *)calloc((size_t)(SPACE8_DIM1 * SPACE8_DIM2 * SPACE8_DIM3 * SPACE8_DIM4), sizeof(uint16_t)); + rbuf = (uint16_t *)calloc((SPACE8_DIM1 * SPACE8_DIM2 * SPACE8_DIM3 * SPACE8_DIM4), sizeof(uint16_t)); CHECK_PTR(rbuf, "calloc"); /* Initialize write buffer */ @@ -3679,11 +3677,11 @@ test_select_hyper_copy(void) MESSAGE(5, ("Testing Hyperslabs with Strides Functionality\n")); /* Allocate write & read buffers */ - wbuf = (uint16_t *)malloc(sizeof(uint16_t) * SPACE2_DIM1 * SPACE2_DIM2); + wbuf = (uint16_t *)malloc((SPACE2_DIM1 * SPACE2_DIM2) * sizeof(uint16_t)); CHECK_PTR(wbuf, "malloc"); - rbuf = (uint16_t *)calloc((size_t)(SPACE3_DIM1 * SPACE3_DIM2), sizeof(uint16_t)); + rbuf = (uint16_t *)calloc((SPACE3_DIM1 * SPACE3_DIM2), sizeof(uint16_t)); CHECK_PTR(rbuf, "calloc"); - rbuf2 = (uint16_t *)calloc((size_t)(SPACE3_DIM1 * SPACE3_DIM2), sizeof(uint16_t)); + rbuf2 = (uint16_t *)calloc((SPACE3_DIM1 * SPACE3_DIM2), sizeof(uint16_t)); CHECK_PTR(rbuf2, "calloc"); /* Initialize write buffer */ @@ -3850,11 +3848,11 @@ test_select_point_copy(void) MESSAGE(5, ("Testing Hyperslabs with Strides Functionality\n")); /* Allocate write & read buffers */ - wbuf = (uint16_t *)malloc(sizeof(uint16_t) * SPACE2_DIM1 * SPACE2_DIM2); + wbuf = (uint16_t *)malloc((SPACE2_DIM1 * SPACE2_DIM2) * sizeof(uint16_t)); CHECK_PTR(wbuf, "malloc"); - rbuf = (uint16_t *)calloc((size_t)(SPACE3_DIM1 * SPACE3_DIM2), sizeof(uint16_t)); + rbuf = (uint16_t *)calloc((SPACE3_DIM1 * SPACE3_DIM2), sizeof(uint16_t)); CHECK_PTR(rbuf, "calloc"); - rbuf2 = (uint16_t *)calloc((size_t)(SPACE3_DIM1 * SPACE3_DIM2), sizeof(uint16_t)); + rbuf2 = (uint16_t *)calloc((SPACE3_DIM1 * SPACE3_DIM2), sizeof(uint16_t)); CHECK_PTR(rbuf2, "calloc"); /* Initialize write buffer */ @@ -4068,9 +4066,9 @@ test_select_hyper_offset(void) MESSAGE(5, ("Testing Hyperslab Selection Functions with Offsets\n")); /* Allocate write & read buffers */ - wbuf = (uint8_t *)malloc(sizeof(uint8_t) * SPACE2_DIM1 * SPACE2_DIM2); + wbuf = (uint8_t *)malloc((SPACE2_DIM1 * SPACE2_DIM2) * sizeof(uint8_t)); CHECK_PTR(wbuf, "malloc"); - rbuf = (uint8_t *)calloc((size_t)(SPACE3_DIM1 * SPACE3_DIM2), sizeof(uint8_t)); + rbuf = (uint8_t *)calloc((SPACE3_DIM1 * SPACE3_DIM2), sizeof(uint8_t)); CHECK_PTR(rbuf, "calloc"); /* Initialize write buffer */ @@ -4276,9 +4274,9 @@ test_select_hyper_offset2(void) MESSAGE(5, ("Testing More Hyperslab Selection Functions with Offsets\n")); /* Allocate write & read buffers */ - wbuf = (uint8_t *)malloc(sizeof(uint8_t) * SPACE7_DIM1 * SPACE7_DIM2); + wbuf = (uint8_t *)malloc((SPACE7_DIM1 * SPACE7_DIM2) * sizeof(uint8_t)); CHECK_PTR(wbuf, "malloc"); - rbuf = (uint8_t *)calloc((size_t)(SPACE7_DIM1 * SPACE7_DIM2), sizeof(uint8_t)); + rbuf = (uint8_t *)calloc((SPACE7_DIM1 * SPACE7_DIM2), sizeof(uint8_t)); CHECK_PTR(rbuf, "calloc"); /* Initialize write buffer */ @@ -4406,9 +4404,9 @@ test_select_point_offset(void) MESSAGE(5, ("Testing Element Selection Functions\n")); /* Allocate write & read buffers */ - wbuf = (uint8_t *)malloc(sizeof(uint8_t) * SPACE2_DIM1 * SPACE2_DIM2); + wbuf = (uint8_t *)malloc((SPACE2_DIM1 * SPACE2_DIM2) * sizeof(uint8_t)); CHECK_PTR(wbuf, "malloc"); - rbuf = (uint8_t *)calloc((size_t)(SPACE3_DIM1 * SPACE3_DIM2), sizeof(uint8_t)); + rbuf = (uint8_t *)calloc((SPACE3_DIM1 * SPACE3_DIM2), sizeof(uint8_t)); CHECK_PTR(rbuf, "calloc"); /* Initialize write buffer */ @@ -4633,9 +4631,9 @@ test_select_hyper_union(void) MESSAGE(5, ("Testing Hyperslab Selection Functions with unions of hyperslabs\n")); /* Allocate write & read buffers */ - wbuf = (uint8_t *)malloc(sizeof(uint8_t) * SPACE2_DIM1 * SPACE2_DIM2); + wbuf = (uint8_t *)malloc((SPACE2_DIM1 * SPACE2_DIM2) * sizeof(uint8_t)); CHECK_PTR(wbuf, "malloc"); - rbuf = (uint8_t *)calloc((size_t)(SPACE3_DIM1 * SPACE3_DIM2), sizeof(uint8_t)); + rbuf = (uint8_t *)calloc((SPACE3_DIM1 * SPACE3_DIM2), sizeof(uint8_t)); CHECK_PTR(rbuf, "calloc"); /* Initialize write buffer */ @@ -5411,9 +5409,9 @@ test_select_hyper_union_3d(void) MESSAGE(5, ("Testing Hyperslab Selection Functions with unions of 3-D hyperslabs\n")); /* Allocate write & read buffers */ - wbuf = (uint8_t *)malloc(sizeof(uint8_t) * SPACE4_DIM1 * SPACE4_DIM2 * SPACE4_DIM3); + wbuf = (uint8_t *)malloc((SPACE4_DIM1 * SPACE4_DIM2 * SPACE4_DIM3) * sizeof(uint8_t)); CHECK_PTR(wbuf, "malloc"); - rbuf = (uint8_t *)calloc(SPACE3_DIM1 * SPACE3_DIM2, sizeof(uint8_t)); + rbuf = (uint8_t *)calloc((SPACE3_DIM1 * SPACE3_DIM2), sizeof(uint8_t)); CHECK_PTR(rbuf, "calloc"); /* Initialize write buffer */ @@ -5735,9 +5733,9 @@ test_select_hyper_and_2d(void) MESSAGE(5, ("Testing Hyperslab Selection Functions with intersection of 2-D hyperslabs\n")); /* Allocate write & read buffers */ - wbuf = (uint8_t *)malloc(sizeof(uint8_t) * SPACE2_DIM1 * SPACE2_DIM2); + wbuf = (uint8_t *)malloc((SPACE2_DIM1 * SPACE2_DIM2) * sizeof(uint8_t)); CHECK_PTR(wbuf, "malloc"); - rbuf = (uint8_t *)calloc((size_t)(SPACE2_DIM1 * SPACE2_DIM2), sizeof(uint8_t)); + rbuf = (uint8_t *)calloc((SPACE2_DIM1 * SPACE2_DIM2), sizeof(uint8_t)); CHECK_PTR(rbuf, "calloc"); /* Initialize write buffer */ @@ -5874,9 +5872,9 @@ test_select_hyper_xor_2d(void) MESSAGE(5, ("Testing Hyperslab Selection Functions with XOR of 2-D hyperslabs\n")); /* Allocate write & read buffers */ - wbuf = (uint8_t *)malloc(sizeof(uint8_t) * SPACE2_DIM1 * SPACE2_DIM2); + wbuf = (uint8_t *)malloc((SPACE2_DIM1 * SPACE2_DIM2) * sizeof(uint8_t)); CHECK_PTR(wbuf, "malloc"); - rbuf = (uint8_t *)calloc((size_t)(SPACE2_DIM1 * SPACE2_DIM2), sizeof(uint8_t)); + rbuf = (uint8_t *)calloc((SPACE2_DIM1 * SPACE2_DIM2), sizeof(uint8_t)); CHECK_PTR(rbuf, "calloc"); /* Initialize write buffer */ @@ -6015,9 +6013,9 @@ test_select_hyper_notb_2d(void) MESSAGE(5, ("Testing Hyperslab Selection Functions with NOTB of 2-D hyperslabs\n")); /* Allocate write & read buffers */ - wbuf = (uint8_t *)malloc(sizeof(uint8_t) * SPACE2_DIM1 * SPACE2_DIM2); + wbuf = (uint8_t *)malloc((SPACE2_DIM1 * SPACE2_DIM2) * sizeof(uint8_t)); CHECK_PTR(wbuf, "malloc"); - rbuf = (uint8_t *)calloc((size_t)(SPACE2_DIM1 * SPACE2_DIM2), sizeof(uint8_t)); + rbuf = (uint8_t *)calloc((SPACE2_DIM1 * SPACE2_DIM2), sizeof(uint8_t)); CHECK_PTR(rbuf, "calloc"); /* Initialize write buffer */ @@ -6154,9 +6152,9 @@ test_select_hyper_nota_2d(void) MESSAGE(5, ("Testing Hyperslab Selection Functions with NOTA of 2-D hyperslabs\n")); /* Allocate write & read buffers */ - wbuf = (uint8_t *)malloc(sizeof(uint8_t) * SPACE2_DIM1 * SPACE2_DIM2); + wbuf = (uint8_t *)malloc((SPACE2_DIM1 * SPACE2_DIM2) * sizeof(uint8_t)); CHECK_PTR(wbuf, "malloc"); - rbuf = (uint8_t *)calloc((size_t)(SPACE2_DIM1 * SPACE2_DIM2), sizeof(uint8_t)); + rbuf = (uint8_t *)calloc((SPACE2_DIM1 * SPACE2_DIM2), sizeof(uint8_t)); CHECK_PTR(rbuf, "calloc"); /* Initialize write buffer */ @@ -6324,10 +6322,9 @@ test_select_hyper_union_random_5d(hid_t read_plist) MESSAGE(5, ("Testing Hyperslab Selection Functions with random unions of 5-D hyperslabs\n")); /* Allocate write & read buffers */ - wbuf = (int *)malloc(sizeof(int) * SPACE5_DIM1 * SPACE5_DIM2 * SPACE5_DIM3 * SPACE5_DIM4 * SPACE5_DIM5); + wbuf = (int *)malloc((SPACE5_DIM1 * SPACE5_DIM2 * SPACE5_DIM3 * SPACE5_DIM4 * SPACE5_DIM5) * sizeof(int)); CHECK_PTR(wbuf, "malloc"); - rbuf = (int *)calloc((size_t)(SPACE5_DIM1 * SPACE5_DIM2 * SPACE5_DIM3 * SPACE5_DIM4 * SPACE5_DIM5), - sizeof(int)); + rbuf = (int *)calloc((SPACE5_DIM1 * SPACE5_DIM2 * SPACE5_DIM3 * SPACE5_DIM4 * SPACE5_DIM5), sizeof(int)); CHECK_PTR(rbuf, "calloc"); /* Initialize write buffer */ @@ -7995,9 +7992,9 @@ test_select_none(void) MESSAGE(5, ("Testing I/O on 0-sized Selections\n")); /* Allocate write & read buffers */ - wbuf = (uint8_t *)malloc(sizeof(uint8_t) * SPACE7_DIM1 * SPACE7_DIM2); + wbuf = (uint8_t *)malloc((SPACE7_DIM1 * SPACE7_DIM2) * sizeof(uint8_t)); CHECK_PTR(wbuf, "malloc"); - rbuf = (uint8_t *)calloc(SPACE7_DIM1 * SPACE7_DIM2, sizeof(uint8_t)); + rbuf = (uint8_t *)calloc((SPACE7_DIM1 * SPACE7_DIM2), sizeof(uint8_t)); CHECK_PTR(rbuf, "calloc"); /* Initialize write buffer */ @@ -13579,7 +13576,7 @@ test_select_hyper_chunk_offset(void) MESSAGE(6, ("Testing hyperslab selections using offsets in chunked datasets\n")); /* Allocate buffers */ - wbuf = (int *)malloc(sizeof(int) * SPACE10_DIM1); + wbuf = (int *)malloc(SPACE10_DIM1 * sizeof(int)); CHECK_PTR(wbuf, "malloc"); rbuf = (int *)calloc(SPACE10_DIM1, sizeof(int)); CHECK_PTR(rbuf, "calloc"); diff --git a/tools/lib/h5diff.c b/tools/lib/h5diff.c index 1e7e6e86ffb..7d4d3907931 100644 --- a/tools/lib/h5diff.c +++ b/tools/lib/h5diff.c @@ -1281,7 +1281,9 @@ diff_match(hid_t file1_id, const char *grp1, trav_info_t *info1, hid_t file2_id, } #endif /* H5_HAVE_PARALLEL */ +#if defined(H5_HAVE_ASPRINTF) || defined(H5_HAVE_PARALLEL) done: +#endif free(obj1_fullpath); free(obj2_fullpath); diff --git a/tools/src/h5repack/h5repack.h b/tools/src/h5repack/h5repack.h index b7c24cb8be2..e77e0a35e6b 100644 --- a/tools/src/h5repack/h5repack.h +++ b/tools/src/h5repack/h5repack.h @@ -118,9 +118,8 @@ * \li 2 This is #H5F_LIBVER_V110 in #H5F_libver_t struct * \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 6 This is #H5F_LIBVER_V118 in #H5F_libver_t struct - * \li #H5F_LIBVER_LATEST is aliased to #H5F_LIBVER_V118 for this release + * \li 5 This is #H5F_LIBVER_V200 in #H5F_libver_t struct + * \li #H5F_LIBVER_LATEST is aliased to #H5F_LIBVER_V200 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 9eaa049d41f..0809d97856e 100644 --- a/tools/src/h5repack/h5repack_main.c +++ b/tools/src/h5repack/h5repack_main.c @@ -228,10 +228,9 @@ usage(const char *prog) PRINTVALSTREAM(rawoutstream, " 2: This is H5F_LIBVER_V110 in H5F_libver_t struct\n"); 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, " 5: This is H5F_LIBVER_V200 in H5F_libver_t struct\n"); PRINTVALSTREAM(rawoutstream, - " (H5F_LIBVER_LATEST is aliased to H5F_LIBVER_V118 for this release\n"); + " (H5F_LIBVER_LATEST is aliased to H5F_LIBVER_V200 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/src/h5repack/h5repack_refs.c b/tools/src/h5repack/h5repack_refs.c index bbdc135ffda..0c281b006e8 100644 --- a/tools/src/h5repack/h5repack_refs.c +++ b/tools/src/h5repack/h5repack_refs.c @@ -234,7 +234,7 @@ do_copy_refobjs(hid_t fidin, hid_t fidout, trav_table_t *travt, pack_opt_t *opti *------------------------------------------------------------------------- */ if (nelmts) { - buf = (hdset_reg_ref_t *)malloc((unsigned)(nelmts * msize)); + buf = (hdset_reg_ref_t *)malloc((size_t)(nelmts * msize)); if (buf == NULL) { printf("cannot read into memory\n"); H5TOOLS_GOTO_ERROR((-1), "malloc failed"); @@ -246,8 +246,7 @@ do_copy_refobjs(hid_t fidin, hid_t fidout, trav_table_t *travt, pack_opt_t *opti * create output *------------------------------------------------------------------------- */ - refbuf = (hdset_reg_ref_t *)calloc(sizeof(hdset_reg_ref_t), - (size_t)nelmts); /*init to zero */ + refbuf = (hdset_reg_ref_t *)calloc((size_t)nelmts, sizeof(hdset_reg_ref_t)); if (refbuf == NULL) { printf("cannot allocate memory\n"); H5TOOLS_GOTO_ERROR((-1), "calloc failed"); diff --git a/tools/test/h5dump/h5dumpgentest.c b/tools/test/h5dump/h5dumpgentest.c index 5c13d614844..bac3d9fab1d 100644 --- a/tools/test/h5dump/h5dumpgentest.c +++ b/tools/test/h5dump/h5dumpgentest.c @@ -2254,10 +2254,10 @@ gent_datareg(void) int i; /* counting variables */ /* Allocate write & read buffers */ - wbuf = (hdset_reg_ref_t *)calloc(sizeof(hdset_reg_ref_t), SPACE1_DIM1); - rbuf = (hdset_reg_ref_t *)malloc(sizeof(hdset_reg_ref_t) * SPACE1_DIM1); - dwbuf = (uint8_t *)malloc(sizeof(uint8_t) * SPACE2_DIM1 * SPACE2_DIM2); - drbuf = (uint8_t *)calloc(sizeof(uint8_t), SPACE2_DIM1 * SPACE2_DIM2); + wbuf = (hdset_reg_ref_t *)calloc(SPACE1_DIM1, sizeof(hdset_reg_ref_t)); + rbuf = (hdset_reg_ref_t *)malloc(SPACE1_DIM1 * sizeof(hdset_reg_ref_t)); + dwbuf = (uint8_t *)malloc((SPACE2_DIM1 * SPACE2_DIM2) * sizeof(uint8_t)); + drbuf = (uint8_t *)calloc((SPACE2_DIM1 * SPACE2_DIM2), sizeof(uint8_t)); /* Create file */ fid1 = H5Fcreate(FILE17, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); diff --git a/tools/test/h5repack/expected/h5repack-help.txt b/tools/test/h5repack/expected/h5repack-help.txt index 718215260eb..1db3966d483 100644 --- a/tools/test/h5repack/expected/h5repack-help.txt +++ b/tools/test/h5repack/expected/h5repack-help.txt @@ -92,9 +92,8 @@ usage: h5repack [OPTIONS] file1 file2 2: This is H5F_LIBVER_V110 in H5F_libver_t struct 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 - 6: This is H5F_LIBVER_V118 in H5F_libver_t struct - (H5F_LIBVER_LATEST is aliased to H5F_LIBVER_V118 for this release + 5: This is H5F_LIBVER_V200 in H5F_libver_t struct + (H5F_LIBVER_LATEST is aliased to H5F_LIBVER_V200 for this release FS_STRATEGY is a string indicating the file space strategy used: FSM_AGGR: diff --git a/tools/test/h5repack/h5repacktst.c b/tools/test/h5repack/h5repacktst.c index e3c34fe82ab..784ebc78651 100644 --- a/tools/test/h5repack/h5repacktst.c +++ b/tools/test/h5repack/h5repacktst.c @@ -4682,8 +4682,8 @@ make_dset_reg_ref(hid_t loc_id) int retval = -1; /* return value */ /* Allocate write & read buffers */ - wbuf = (hdset_reg_ref_t *)calloc(sizeof(hdset_reg_ref_t), (size_t)SPACE1_DIM1); - dwbuf = (int *)malloc(sizeof(int) * SPACE2_DIM1 * SPACE2_DIM2); + wbuf = (hdset_reg_ref_t *)calloc(SPACE1_DIM1, sizeof(hdset_reg_ref_t)); + dwbuf = (int *)malloc((SPACE2_DIM1 * SPACE2_DIM2) * sizeof(int)); /* Create dataspace for datasets */ if ((sid2 = H5Screate_simple(SPACE2_RANK, dims2, NULL)) < 0)