From d4a5e1e4fb0445b03328be62c4b53e2a4a8e2d44 Mon Sep 17 00:00:00 2001 From: Larry Knox Date: Mon, 30 Dec 2024 13:57:29 -0600 Subject: [PATCH 1/6] Fix MPI_TEST_H5DIFF-h5diff_601 (#5192) on Dane and Frontier, which occasionally fails when searching for expected output "Object could not be found in " when the object name is inserted after "Object". Search string is reduced to "could not be found". --- tools/test/h5diff/CMakeTests.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/test/h5diff/CMakeTests.cmake b/tools/test/h5diff/CMakeTests.cmake index 5d36e0cd764..112d5066de1 100644 --- a/tools/test/h5diff/CMakeTests.cmake +++ b/tools/test/h5diff/CMakeTests.cmake @@ -808,7 +808,7 @@ ADD_H5_TEST (h5diff_63 1 -v ${STRINGS1} ${STRINGS2} string4 string4) ADD_H5_TEST (h5diff_600 1 ${FILE1}) # 6.1: Check if non-exist object name is specified -ADD_H5_CMP_TEST (h5diff_601 2 "Object could not be found" ${FILE1} ${FILE1} nono_obj) +ADD_H5_CMP_TEST (h5diff_601 2 "could not be found" ${FILE1} ${FILE1} nono_obj) # ############################################################################## # # -d From 11ddd6203f069504880bd460dbb74c2cfa8b7ee3 Mon Sep 17 00:00:00 2001 From: Allen Byrne <50328838+byrnHDF@users.noreply.github.com> Date: Tue, 31 Dec 2024 08:00:05 -0600 Subject: [PATCH 2/6] fix clang ci (#5196) * Add minor version to install clang * Add clang version checks * Revert to ubuntu-22.04 * Try adding libtinfo5 * Disable fortran --- .github/workflows/cmake-analysis.yml | 20 ++++++++++---------- .github/workflows/cmake-ctest.yml | 6 ++++++ .github/workflows/cmake-script.yml | 18 +++++++++++++++--- .github/workflows/main-cmake.yml | 20 ++++++++------------ 4 files changed, 39 insertions(+), 25 deletions(-) diff --git a/.github/workflows/cmake-analysis.yml b/.github/workflows/cmake-analysis.yml index 9fc9ed998d4..0e1ba0d685b 100644 --- a/.github/workflows/cmake-analysis.yml +++ b/.github/workflows/cmake-analysis.yml @@ -27,7 +27,7 @@ jobs: # Linux (Ubuntu) w/ gcc + coverage # name: "Ubuntu GCC Coverage" - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 steps: - name: Install CMake Dependencies (Linux_coverage) run: | @@ -122,19 +122,19 @@ jobs: # Linux (Ubuntu) w/ clang + LeakSanitizer # name: "Ubuntu Clang LeakSanitizer" - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 steps: - name: Install CMake Dependencies (Linux_Leak) run: | sudo apt update - sudo apt-get install ninja-build doxygen graphviz curl + sudo apt-get install ninja-build doxygen graphviz curl libtinfo5 - name: add clang to env uses: KyleMayes/install-llvm-action@v2.0.5 id: setup-clang with: env: true - version: '18' + version: '18.1' - name: Set file base name (Linux_Leak) id: set-file-base @@ -222,19 +222,19 @@ jobs: # Linux (Ubuntu) w/ clang + AddressSanitizer # name: "Ubuntu Clang AddressSanitizer" - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 steps: - name: Install CMake Dependencies (Linux_Address) run: | sudo apt update - sudo apt-get install ninja-build doxygen graphviz curl + sudo apt-get install ninja-build doxygen graphviz curl libtinfo5 - name: add clang to env uses: KyleMayes/install-llvm-action@v2.0.5 id: setup-clang with: env: true - version: '18' + version: '18.1' - name: Set file base name (Linux_Address) id: set-file-base @@ -322,19 +322,19 @@ jobs: # Linux (Ubuntu) w/ clang + UndefinedBehaviorSanitizer # name: "Ubuntu Clang UndefinedBehaviorSanitizer" - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 steps: - name: Install CMake Dependencies (Linux_UndefinedBehavior) run: | sudo apt update - sudo apt-get install ninja-build doxygen graphviz curl + sudo apt-get install ninja-build doxygen graphviz curl libtinfo5 - name: add clang to env uses: KyleMayes/install-llvm-action@v2.0.5 id: setup-clang with: env: true - version: '18' + version: '18.1' - name: Set file base name (Linux_UndefinedBehavior) id: set-file-base diff --git a/.github/workflows/cmake-ctest.yml b/.github/workflows/cmake-ctest.yml index 7941528c2ba..13963c64340 100644 --- a/.github/workflows/cmake-ctest.yml +++ b/.github/workflows/cmake-ctest.yml @@ -333,6 +333,12 @@ jobs: with: version: "1.9.7" + - name: check clang version + shell: bash + run: | + which clang + clang -v + - name: Install the Apple certificate and provisioning profile shell: bash env: diff --git a/.github/workflows/cmake-script.yml b/.github/workflows/cmake-script.yml index f4e1acaa000..245a7fb28cb 100644 --- a/.github/workflows/cmake-script.yml +++ b/.github/workflows/cmake-script.yml @@ -230,6 +230,12 @@ jobs: with: version: "1.9.7" + - name: check clang version + shell: bash + run: | + which clang + clang -v + - name: Set up JDK 19 uses: actions/setup-java@v4 with: @@ -615,19 +621,25 @@ jobs: # Linux (Ubuntu) w/ clang + CMake # name: "Ubuntu Clang CMake" - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 steps: - name: Install CMake Dependencies (Linux_clang) run: | sudo apt-get update - sudo apt-get install ninja-build doxygen graphviz curl + sudo apt-get install ninja-build doxygen graphviz curl libtinfo5 - name: add clang to env uses: KyleMayes/install-llvm-action@v2.0.5 id: setup-clang with: env: true - version: '18' + version: '18.1' + + - name: check clang version + shell: bash + run: | + which clang + clang -v - name: Set file base name (Linux_clang) id: set-file-base diff --git a/.github/workflows/main-cmake.yml b/.github/workflows/main-cmake.yml index f054eae2048..57b2e1dd823 100644 --- a/.github/workflows/main-cmake.yml +++ b/.github/workflows/main-cmake.yml @@ -66,8 +66,6 @@ jobs: # Linux (Ubuntu) w/ gcc + CMake # - # We might think about adding Clang, but MacOS already tests that - # so it's not critical - name: "Ubuntu gcc" os: ubuntu-latest cpp: ON @@ -87,12 +85,10 @@ jobs: # MacOS w/ Clang + CMake # - # We could also build with the Autotools via brew installing them, - # but that seems unnecessary - name: "MacOS Clang" os: macos-latest cpp: ON - fortran: ON + fortran: OFF java: ON docs: ON libaecfc: ON @@ -139,13 +135,13 @@ jobs: if: ${{ matrix.os == 'macos-latest' }} # symlinks the compiler executables to a common location - - name: Install GNU Fortran (macOS) - uses: fortran-lang/setup-fortran@v1 - id: setup-fortran - with: - compiler: gcc - version: 14 - if: ${{ matrix.os == 'macos-latest' }} +# - name: Install GNU Fortran (macOS) +# uses: fortran-lang/setup-fortran@v1 +# id: setup-fortran +# with: +# compiler: gcc +# version: 14 +# if: ${{ matrix.os == 'macos-latest' }} - name: Install Dependencies uses: ssciwr/doxygen-install@v1 From 980117be3018dfd8ba4761177b2ce162ab9b204c Mon Sep 17 00:00:00 2001 From: Scot Breitenfeld Date: Tue, 31 Dec 2024 12:31:03 -0600 Subject: [PATCH 3/6] removed link creation related c-wrappers (#5190) --- fortran/src/H5Pf.c | 70 ------------------------------------------- fortran/src/H5Pff.F90 | 31 ++++++++++--------- 2 files changed, 17 insertions(+), 84 deletions(-) diff --git a/fortran/src/H5Pf.c b/fortran/src/H5Pf.c index 079d0277a43..31cb0f714f4 100644 --- a/fortran/src/H5Pf.c +++ b/fortran/src/H5Pf.c @@ -3504,37 +3504,6 @@ h5pget_attr_creation_order_c(hid_t_f *ocpl_id, int_f *crt_order_flags) ret_value = 0; return ret_value; } -/****if* H5Pf/h5pset_link_creation_order_c - * NAME - * h5pset_link_creation_order_c - * PURPOSE - * Calls H5Pset_link_creation_order - * - * INPUTS - * gcpl_id - Group creation property list identifier - * crt_order_flags - Creation order flag(s) - * OUTPUTS - * - * RETURNS - * 0 on success, -1 on failure - * SOURCE - */ -int_f -h5pset_link_creation_order_c(hid_t_f *gcpl_id, int_f *crt_order_flags) -/******/ -{ - int ret_value = -1; - herr_t ret; - /* - * Call H5Pset_link_creation_order function. - */ - ret = H5Pset_link_creation_order((hid_t)*gcpl_id, (unsigned)*crt_order_flags); - if (ret < 0) - return ret_value; - - ret_value = 0; - return ret_value; -} /****if* H5Pf/h5pget_link_phase_change_c * NAME @@ -3682,45 +3651,6 @@ h5pset_create_inter_group_c(hid_t_f *lcpl_id, int_f *crt_intermed_group) return ret_value; } -/****if* H5Pf/h5pget_link_creation_order_c - * NAME - * h5pget_link_creation_order_c - * PURPOSE - * Calls H5Pget_link_creation_order - * - * INPUTS - * - * gcpl_id - Group creation property list identifier - * OUTPUTS - * - * crt_order_flags - Creation order flag(s) - * - * RETURNS - * 0 on success, -1 on failure - * SOURCE - */ -int_f -h5pget_link_creation_order_c(hid_t_f *gcpl_id, int_f *crt_order_flags) -/******/ -{ - int ret_value = -1; - herr_t ret; - - unsigned c_crt_order_flags; - /* - * Call h5pget_link_creation_order function. - */ - - ret = H5Pget_link_creation_order((hid_t)*gcpl_id, &c_crt_order_flags); - if (ret < 0) - return ret_value; - - *crt_order_flags = (int_f)c_crt_order_flags; - - ret_value = 0; - return ret_value; -} - /****if* H5Pf/h5pset_char_encoding_c * NAME * h5pset_char_encoding_c diff --git a/fortran/src/H5Pff.F90 b/fortran/src/H5Pff.F90 index 7e73ac2255a..41529a17180 100644 --- a/fortran/src/H5Pff.F90 +++ b/fortran/src/H5Pff.F90 @@ -3470,17 +3470,17 @@ SUBROUTINE h5pset_link_creation_order_f(gcpl_id, crt_order_flags, hdferr) INTEGER, INTENT(IN) :: crt_order_flags INTEGER, INTENT(OUT) :: hdferr INTERFACE - INTEGER FUNCTION h5pset_link_creation_order_c(gcpl_id, crt_order_flags) & - BIND(C,NAME='h5pset_link_creation_order_c') - IMPORT :: HID_T + INTEGER FUNCTION h5pset_link_creation_order(gcpl_id, crt_order_flags) & + BIND(C,NAME='H5Pset_link_creation_order') + IMPORT :: HID_T, C_INT IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: gcpl_id - INTEGER, INTENT(IN) :: crt_order_flags + INTEGER(HID_T), VALUE :: gcpl_id + INTEGER(C_INT), VALUE :: crt_order_flags - END FUNCTION H5pset_link_creation_order_c + END FUNCTION H5pset_link_creation_order END INTERFACE - hdferr = h5pset_link_creation_order_c(gcpl_id, crt_order_flags) + hdferr = h5pset_link_creation_order(gcpl_id, INT(crt_order_flags, C_INT)) END SUBROUTINE h5pset_link_creation_order_f @@ -3634,18 +3634,21 @@ SUBROUTINE h5pget_link_creation_order_f(gcpl_id, crt_order_flags, hdferr) INTEGER(HID_T), INTENT(IN) :: gcpl_id INTEGER, INTENT(OUT) :: crt_order_flags INTEGER, INTENT(OUT) :: hdferr + + INTEGER(C_INT) :: c_crt_order_flags INTERFACE - INTEGER FUNCTION h5pget_link_creation_order_c(gcpl_id, crt_order_flags) & - BIND(C,NAME='h5pget_link_creation_order_c') - IMPORT :: HID_T + INTEGER FUNCTION h5pget_link_creation_order(gcpl_id, crt_order_flags) & + BIND(C,NAME='H5Pget_link_creation_order') + IMPORT :: HID_T, C_INT IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: gcpl_id - INTEGER, INTENT(OUT) :: crt_order_flags + INTEGER(HID_T), VALUE :: gcpl_id + INTEGER(C_INT) :: crt_order_flags - END FUNCTION H5pget_link_creation_order_c + END FUNCTION H5pget_link_creation_order END INTERFACE - hdferr = h5pget_link_creation_order_c(gcpl_id, crt_order_flags) + hdferr = h5pget_link_creation_order(gcpl_id, c_crt_order_flags) + crt_order_flags = INT(c_crt_order_flags) END SUBROUTINE h5pget_link_creation_order_f From 655403a3b4861f25e4548caa6d13214c8797471d Mon Sep 17 00:00:00 2001 From: Allen Byrne <50328838+byrnHDF@users.noreply.github.com> Date: Tue, 31 Dec 2024 16:46:45 -0600 Subject: [PATCH 4/6] Correct CMake option usage and dependencies (#5188) --- .github/workflows/cmake-analysis.yml | 4 +++ .github/workflows/cmake-par-script.yml | 9 ++++--- .github/workflows/cmake-par-source.yml | 2 ++ .github/workflows/cmake-script.yml | 7 +++++ .github/workflows/cygwin-cmake.yml | 1 + .github/workflows/i386-cmake.yml | 4 +-- .github/workflows/intel-cmake.yml | 2 -- .github/workflows/main-cmake.yml | 4 +++ .github/workflows/msys2-cmake.yml | 2 -- .github/workflows/netcdf.yml | 3 +-- .github/workflows/nvhpc-cmake.yml | 4 --- CMakeFilters.cmake | 4 +-- CMakeLists.txt | 37 +++++++++++++------------- CMakePlugins.cmake | 15 ++++++----- HDF5Examples/CMakeLists.txt | 2 +- config/cmake/HDF5PluginCache.cmake | 4 +++ config/cmake/HDF5PluginMacros.cmake | 2 +- config/cmake/SignPackageFiles.cmake | 2 +- config/cmake/grepTest.cmake | 2 +- config/cmake/jrunTest.cmake | 4 +-- config/cmake/runTest.cmake | 2 +- src/CMakeLists.txt | 2 +- test/CMakeLists.txt | 2 +- tools/test/perform/CMakeLists.txt | 2 +- 24 files changed, 68 insertions(+), 54 deletions(-) diff --git a/.github/workflows/cmake-analysis.yml b/.github/workflows/cmake-analysis.yml index 0e1ba0d685b..7c5a1d9466d 100644 --- a/.github/workflows/cmake-analysis.yml +++ b/.github/workflows/cmake-analysis.yml @@ -99,6 +99,7 @@ jobs: set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_ENABLE_PLUGIN_SUPPORT:BOOL=OFF") set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DLIBAEC_USE_LOCALCONTENT:BOOL=OFF") set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DZLIB_USE_LOCALCONTENT:BOOL=OFF") + set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DPLUGIN_USE_LOCALCONTENT:BOOL=OFF") set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_PACK_EXAMPLES:BOOL=OFF") set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_PACKAGE_EXTLIBS:BOOL=OFF") set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_NO_PACKAGES:BOOL=ON") @@ -202,6 +203,7 @@ jobs: set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_ENABLE_PLUGIN_SUPPORT:BOOL=OFF") set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DLIBAEC_USE_LOCALCONTENT:BOOL=OFF") set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DZLIB_USE_LOCALCONTENT:BOOL=OFF") + set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DPLUGIN_USE_LOCALCONTENT:BOOL=OFF") - name: Run ctest (Linux_Leak) run: | @@ -302,6 +304,7 @@ jobs: set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_ENABLE_PLUGIN_SUPPORT:BOOL=OFF") set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DLIBAEC_USE_LOCALCONTENT:BOOL=OFF") set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DZLIB_USE_LOCALCONTENT:BOOL=OFF") + set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DPLUGIN_USE_LOCALCONTENT:BOOL=OFF") - name: Run ctest (Linux_Address) run: | @@ -402,6 +405,7 @@ jobs: set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_ENABLE_PLUGIN_SUPPORT:BOOL=OFF") set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DLIBAEC_USE_LOCALCONTENT:BOOL=OFF") set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DZLIB_USE_LOCALCONTENT:BOOL=OFF") + set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DPLUGIN_USE_LOCALCONTENT:BOOL=OFF") - name: Run ctest (Linux_UndefinedBehavior) run: | diff --git a/.github/workflows/cmake-par-script.yml b/.github/workflows/cmake-par-script.yml index c47b89e89d9..61b9dde0e53 100644 --- a/.github/workflows/cmake-par-script.yml +++ b/.github/workflows/cmake-par-script.yml @@ -131,9 +131,10 @@ jobs: set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_ENABLE_ZLIB_SUPPORT:BOOL=OFF") set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_ENABLE_SZIP_SUPPORT:BOOL=OFF") set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_ENABLE_SZIP_ENCODING:BOOL=OFF") - set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_ENABLE_PLUGIN_SUPPORT:BOOL=ON") + set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_ENABLE_PLUGIN_SUPPORT:BOOL=OFF") set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DLIBAEC_USE_LOCALCONTENT:BOOL=OFF") set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DZLIB_USE_LOCALCONTENT:BOOL=OFF") + set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DPLUGIN_USE_LOCALCONTENT:BOOL=OFF") - name: Run ctest script (${{ matrix.mpi }}) run: | @@ -244,9 +245,10 @@ jobs: set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_ENABLE_ZLIB_SUPPORT:BOOL=OFF") set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_ENABLE_SZIP_SUPPORT:BOOL=OFF") set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_ENABLE_SZIP_ENCODING:BOOL=OFF") - set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_ENABLE_PLUGIN_SUPPORT:BOOL=ON") + set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_ENABLE_PLUGIN_SUPPORT:BOOL=OFF") set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DLIBAEC_USE_LOCALCONTENT:BOOL=OFF") set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DZLIB_USE_LOCALCONTENT:BOOL=OFF") + set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DPLUGIN_USE_LOCALCONTENT:BOOL=OFF") - name: Run ctest script (${{ matrix.mpi }}) run: | @@ -353,9 +355,10 @@ jobs: set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_ENABLE_ZLIB_SUPPORT:BOOL=OFF") set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_ENABLE_SZIP_SUPPORT:BOOL=OFF") set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_ENABLE_SZIP_ENCODING:BOOL=OFF") - set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_ENABLE_PLUGIN_SUPPORT:BOOL=ON") + set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_ENABLE_PLUGIN_SUPPORT:BOOL=OF") set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DLIBAEC_USE_LOCALCONTENT:BOOL=OFF") set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DZLIB_USE_LOCALCONTENT:BOOL=OFF") + set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DPLUGIN_USE_LOCALCONTENT:BOOL=OFF") - name: Run ctest script (${{ matrix.mpi }}) run: | diff --git a/.github/workflows/cmake-par-source.yml b/.github/workflows/cmake-par-source.yml index 04e2cb1764f..97b8e2e4d4b 100644 --- a/.github/workflows/cmake-par-source.yml +++ b/.github/workflows/cmake-par-source.yml @@ -136,6 +136,7 @@ jobs: set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_ENABLE_PLUGIN_SUPPORT:BOOL=ON") set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DLIBAEC_USE_LOCALCONTENT:BOOL=OFF") set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DZLIB_USE_LOCALCONTENT:BOOL=OFF") + set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DPLUGIN_USE_LOCALCONTENT:BOOL=OFF") - name: Run ctest script (OpenMPI) run: | @@ -251,6 +252,7 @@ jobs: set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_ENABLE_PLUGIN_SUPPORT:BOOL=ON") set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DLIBAEC_USE_LOCALCONTENT:BOOL=OFF") set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DZLIB_USE_LOCALCONTENT:BOOL=OFF") + set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DPLUGIN_USE_LOCALCONTENT:BOOL=OFF") - name: Run ctest script (MPICH) run: | diff --git a/.github/workflows/cmake-script.yml b/.github/workflows/cmake-script.yml index 245a7fb28cb..914298d89e9 100644 --- a/.github/workflows/cmake-script.yml +++ b/.github/workflows/cmake-script.yml @@ -109,6 +109,7 @@ jobs: set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_ENABLE_PLUGIN_SUPPORT:BOOL=ON") set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DLIBAEC_USE_LOCALCONTENT:BOOL=OFF") set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DZLIB_USE_LOCALCONTENT:BOOL=OFF") + set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DPLUGIN_USE_LOCALCONTENT:BOOL=OFF") - name: Run ctest script (Windows) run: | @@ -200,6 +201,7 @@ jobs: set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_ENABLE_PLUGIN_SUPPORT:BOOL=ON") set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DLIBAEC_USE_LOCALCONTENT:BOOL=OFF") set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DZLIB_USE_LOCALCONTENT:BOOL=OFF") + set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DPLUGIN_USE_LOCALCONTENT:BOOL=OFF") - name: Run ctest (Linux) run: | @@ -309,6 +311,7 @@ jobs: set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_ENABLE_PLUGIN_SUPPORT:BOOL=ON") set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DLIBAEC_USE_LOCALCONTENT:BOOL=OFF") set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DZLIB_USE_LOCALCONTENT:BOOL=OFF") + set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DPLUGIN_USE_LOCALCONTENT:BOOL=OFF") - name: Run ctest (MacOS_latest) id: run-ctest @@ -397,6 +400,7 @@ jobs: set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_ENABLE_PLUGIN_SUPPORT:BOOL=ON") set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DLIBAEC_USE_LOCALCONTENT:BOOL=OFF") set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DZLIB_USE_LOCALCONTENT:BOOL=OFF") + set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DPLUGIN_USE_LOCALCONTENT:BOOL=OFF") - name: Run ctest (Linux S3) run: | @@ -501,6 +505,7 @@ jobs: set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_ENABLE_PLUGIN_SUPPORT:BOOL=ON") set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DLIBAEC_USE_LOCALCONTENT:BOOL=OFF") set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DZLIB_USE_LOCALCONTENT:BOOL=OFF") + set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DPLUGIN_USE_LOCALCONTENT:BOOL=OFF") - name: Run ctest (Windows_intel) with oneapi env: @@ -597,6 +602,7 @@ jobs: set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_ENABLE_PLUGIN_SUPPORT:BOOL=ON") set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DLIBAEC_USE_LOCALCONTENT:BOOL=OFF") set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DZLIB_USE_LOCALCONTENT:BOOL=OFF") + set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DPLUGIN_USE_LOCALCONTENT:BOOL=OFF") - name: Run ctest (Linux_intel) env: @@ -702,6 +708,7 @@ jobs: set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_ENABLE_PLUGIN_SUPPORT:BOOL=ON") set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DLIBAEC_USE_LOCALCONTENT:BOOL=OFF") set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DZLIB_USE_LOCALCONTENT:BOOL=OFF") + set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DPLUGIN_USE_LOCALCONTENT:BOOL=OFF") - name: Run ctest (Linux_clang) run: | diff --git a/.github/workflows/cygwin-cmake.yml b/.github/workflows/cygwin-cmake.yml index 73f13f30569..8c10a35552c 100644 --- a/.github/workflows/cygwin-cmake.yml +++ b/.github/workflows/cygwin-cmake.yml @@ -103,6 +103,7 @@ jobs: set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_ENABLE_PLUGIN_SUPPORT:BOOL=ON") set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DLIBAEC_USE_LOCALCONTENT:BOOL=OFF") set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DZLIB_USE_LOCALCONTENT:BOOL=OFF") + set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DPLUGIN_USE_LOCALCONTENT:BOOL=OFF") - name: Run ctest (Cygwin) shell: C:\cygwin\bin\bash.exe -eo pipefail -o igncr '{0}' diff --git a/.github/workflows/i386-cmake.yml b/.github/workflows/i386-cmake.yml index 9867c70558e..4eea1b2f801 100644 --- a/.github/workflows/i386-cmake.yml +++ b/.github/workflows/i386-cmake.yml @@ -40,12 +40,10 @@ jobs: -DCMAKE_BUILD_TYPE=${{ inputs.build_mode }} \ -DHDF5_ENABLE_ZLIB_SUPPORT:BOOL=OFF \ -DHDF5_ENABLE_SZIP_SUPPORT:BOOL=OFF \ + -DHDF5_ENABLE_PLUGIN_SUPPORT:BOOL=OFF \ -DHDF5_BUILD_CPP_LIB:BOOL=OFF \ - -DLIBAEC_USE_LOCALCONTENT:BOOL=OFF \ - -DZLIB_USE_LOCALCONTENT:BOOL=OFF \ -DHDF5_BUILD_FORTRAN:BOOL=OFF \ -DHDF5_BUILD_JAVA:BOOL=OFF \ - -DHDF5_ENABLE_PLUGIN_SUPPORT:BOOL=OFF \ .. - name: CMake Build diff --git a/.github/workflows/intel-cmake.yml b/.github/workflows/intel-cmake.yml index 3fc37359065..8e69c40800f 100644 --- a/.github/workflows/intel-cmake.yml +++ b/.github/workflows/intel-cmake.yml @@ -46,8 +46,6 @@ jobs: -DCMAKE_BUILD_TYPE=${{ inputs.build_mode }} \ -DHDF5_BUILD_FORTRAN:BOOL=ON \ -DHDF5_BUILD_CPP_LIB:BOOL=ON \ - -DLIBAEC_USE_LOCALCONTENT:BOOL=OFF \ - -DZLIB_USE_LOCALCONTENT:BOOL=OFF \ ${{ github.workspace }} - name: CMake Build (Linux) diff --git a/.github/workflows/main-cmake.yml b/.github/workflows/main-cmake.yml index 57b2e1dd823..598f1a8a3ab 100644 --- a/.github/workflows/main-cmake.yml +++ b/.github/workflows/main-cmake.yml @@ -176,6 +176,8 @@ jobs: -DHDF5_BUILD_FORTRAN:BOOL=${{ matrix.fortran }} \ -DHDF5_BUILD_JAVA:BOOL=${{ matrix.java }} \ -DHDF5_BUILD_DOC:BOOL=${{ matrix.docs }} \ + -DHDF5_ENABLE_ZLIB_SUPPORT:BOOL=${{ matrix.zlibfc }} \ + -DHDF5_ENABLE_SZIP_SUPPORT:BOOL=${{ matrix.libaecfc }} \ -DLIBAEC_USE_LOCALCONTENT:BOOL=${{ matrix.localaec }} \ -DZLIB_USE_LOCALCONTENT:BOOL=${{ matrix.localzlib }} \ -DHDF5_ENABLE_MIRROR_VFD:BOOL=${{ matrix.mirror_vfd }} \ @@ -206,6 +208,8 @@ jobs: -DHDF5_BUILD_JAVA:BOOL=OFF \ -DHDF5_BUILD_HL_LIB:BOOL=OFF \ -DHDF5_BUILD_DOC:BOOL=OFF \ + -DHDF5_ENABLE_ZLIB_SUPPORT:BOOL=${{ matrix.zlibfc }} \ + -DHDF5_ENABLE_SZIP_SUPPORT:BOOL=${{ matrix.libaecfc }} \ -DLIBAEC_USE_LOCALCONTENT:BOOL=${{ matrix.localaec }} \ -DZLIB_USE_LOCALCONTENT:BOOL=${{ matrix.localzlib }} \ -DHDF5_ENABLE_MIRROR_VFD:BOOL=${{ matrix.mirror_vfd }} \ diff --git a/.github/workflows/msys2-cmake.yml b/.github/workflows/msys2-cmake.yml index 363146c85d5..a1ea7ec044e 100644 --- a/.github/workflows/msys2-cmake.yml +++ b/.github/workflows/msys2-cmake.yml @@ -70,8 +70,6 @@ jobs: -DHDF5_BUILD_FORTRAN:BOOL=OFF \ -DHDF5_BUILD_JAVA:BOOL=OFF \ -DHDF5_BUILD_DOC:BOOL=OFF \ - -DLIBAEC_USE_LOCALCONTENT:BOOL=OFF \ - -DZLIB_USE_LOCALCONTENT:BOOL=OFF \ $GITHUB_WORKSPACE - name: CMake Build diff --git a/.github/workflows/netcdf.yml b/.github/workflows/netcdf.yml index 14a3a858da3..12f58ce25d4 100644 --- a/.github/workflows/netcdf.yml +++ b/.github/workflows/netcdf.yml @@ -50,9 +50,8 @@ jobs: -DHDF5_BUILD_FORTRAN:BOOL=OFF \ -DHDF5_BUILD_JAVA:BOOL=OFF \ -DHDF5_BUILD_DOC:BOOL=OFF \ - -DLIBAEC_USE_LOCALCONTENT:BOOL=OFF \ - -DZLIB_USE_LOCALCONTENT:BOOL=OFF \ -DHDF5_ENABLE_ZLIB_SUPPORT:BOOL=ON \ + -DZLIB_USE_LOCALCONTENT:BOOL=OFF \ -DH5_NO_DEPRECATED_SYMBOLS:BOOL=OFF \ -DBUILD_TESTING:BOOL=OFF \ -DCMAKE_INSTALL_PREFIX:PATH=/usr/local \ diff --git a/.github/workflows/nvhpc-cmake.yml b/.github/workflows/nvhpc-cmake.yml index ae25effc982..7f3b484ae1f 100644 --- a/.github/workflows/nvhpc-cmake.yml +++ b/.github/workflows/nvhpc-cmake.yml @@ -52,14 +52,10 @@ jobs: cd "${{ runner.workspace }}/build" cmake -C $GITHUB_WORKSPACE/config/cmake/cacheinit.cmake -G Ninja \ -DCMAKE_BUILD_TYPE=${{ inputs.build_mode }} \ - -DHDF5_ENABLE_ZLIB_SUPPORT:BOOL=OFF \ - -DHDF5_ENABLE_SZIP_SUPPORT:BOOL=OFF \ -DHDF5_ENABLE_PARALLEL:BOOL=ON \ -DMPIEXEC_NUMPROC_FLAG:STRING=-np \ -DMPIEXEC_MAX_NUMPROCS:STRING=2 \ -DHDF5_BUILD_CPP_LIB:BOOL=OFF \ - -DLIBAEC_USE_LOCALCONTENT:BOOL=OFF \ - -DZLIB_USE_LOCALCONTENT:BOOL=OFF \ -DHDF5_BUILD_FORTRAN:BOOL=ON \ -DHDF5_BUILD_JAVA:BOOL=OFF \ -DMPIEXEC_MAX_NUMPROCS:STRING="2" \ diff --git a/CMakeFilters.cmake b/CMakeFilters.cmake index 2b5297f198d..dcdbd011edd 100644 --- a/CMakeFilters.cmake +++ b/CMakeFilters.cmake @@ -85,7 +85,6 @@ endif () if(NOT DEFINED ZLIBNG_PACKAGE_NAME) set(ZLIBNG_PACKAGE_NAME "zlib-ng") endif () -option (HDF5_ENABLE_ZLIB_SUPPORT "Enable Zlib Filters" OFF) if (HDF5_ENABLE_ZLIB_SUPPORT) if (NOT H5_ZLIB_HEADER) if (NOT ZLIB_USE_EXTERNAL) @@ -151,7 +150,7 @@ if (HDF5_ENABLE_ZLIB_SUPPORT) set (HDF5_ENABLE_ZLIB_SUPPORT OFF CACHE BOOL "" FORCE) message (FATAL_ERROR " ZLib support in HDF5 was enabled but not found") endif () - message(STATUS "H5_ZLIB_HEADER=${H5_ZLIB_HEADER}") + message (VERBOSE "H5_ZLIB_HEADER=${H5_ZLIB_HEADER}") endif () #----------------------------------------------------------------------------- @@ -161,7 +160,6 @@ set(H5_SZIP_FOUND FALSE) if(NOT DEFINED LIBAEC_PACKAGE_NAME) set(LIBAEC_PACKAGE_NAME "libaec") endif () -option (HDF5_ENABLE_SZIP_SUPPORT "Use SZip Filter" OFF) if (HDF5_ENABLE_SZIP_SUPPORT) option (HDF5_ENABLE_SZIP_ENCODING "Use SZip Encoding" ON) if (NOT SZIP_USE_EXTERNAL) diff --git a/CMakeLists.txt b/CMakeLists.txt index 73dc2d3ee28..48c25154dc7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -920,7 +920,11 @@ include (UserMacros.cmake) #----------------------------------------------------------------------------- # Include filter (zlib, szip, etc.) macros #----------------------------------------------------------------------------- -include (CMakeFilters.cmake) +option (HDF5_ENABLE_SZIP_SUPPORT "Use SZip Filter" OFF) +option (HDF5_ENABLE_ZLIB_SUPPORT "Enable Zlib Filters" OFF) +if (HDF5_ENABLE_ZLIB_SUPPORT OR HDF5_ENABLE_SZIP_SUPPORT) + include (CMakeFilters.cmake) +endif () #----------------------------------------------------------------------------- # Include external VOL connectors @@ -1079,10 +1083,10 @@ if (HDF5_BUILD_DOC AND EXISTS "${HDF5_DOXYGEN_DIR}" AND IS_DIRECTORY "${HDF5_DOX else () set (HDF5_DOXY_WARNINGS "NO") endif () - message(STATUS "Doxygen version: ${DOXYGEN_VERSION}") + message(VERBOSE "Doxygen version: ${DOXYGEN_VERSION}") add_subdirectory (doxygen) else () - message(STATUS "Doxygen needs to be installed to generate the doxygen documentation") + message(WARNING "Doxygen needs to be installed to generate the doxygen documentation") endif () endif () @@ -1101,22 +1105,22 @@ if (EXISTS "${HDF5_SOURCE_DIR}/utils" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/utils option (HDF5_BUILD_PARALLEL_TOOLS "Build Parallel HDF5 Tools" OFF) if (HDF5_BUILD_PARALLEL_TOOLS AND HDF5_ENABLE_PARALLEL) set (CMAKE_PREFIX_PATH "$HDF_RESOURCES_DIR") - find_package(MFU REQUIRED) + find_package (MFU REQUIRED) if (MFU_FOUND) - message(STATUS "LL_PATH=${LL_PATH}") + message (VERBOSE "LL_PATH=${LL_PATH}") set (H5_HAVE_LIBMFU 1) set (H5_HAVE_MFU_H 1) set (CMAKE_REQUIRED_INCLUDES "${MFU_INCLUDE_DIR}") set (MFU_LIBRARY_DEBUG "$MFU_LIBRARY") set (MFU_LIBRARY_RELEASE "$MFU_LIBRARY") endif () - find_package(CIRCLE REQUIRED) + find_package (CIRCLE REQUIRED) if (CIRCLE_FOUND) set (H5_HAVE_LIBCIRCLE 1) set (H5_HAVE_CIRCLE_H 1) set (CMAKE_REQUIRED_INCLUDES "${CIRCLE_INCLUDE_DIR}") endif () - find_package(DTCMP REQUIRED) + find_package (DTCMP REQUIRED) if (DTCMP_FOUND) set (H5_HAVE_LIBDTCMP 1) set (H5_HAVE_DTCMP_H 1) @@ -1139,19 +1143,16 @@ endif () #----------------------------------------------------------------------------- # Include filter plugins #----------------------------------------------------------------------------- -if (${H5_LIBVER_DIR} EQUAL 16 OR HDF5_DEFAULT_API_VERSION MATCHES "v16") - set (HDF5_ENABLE_PLUGIN_SUPPORT OFF CACHE BOOL "" FORCE) - message (VERBOSE "Filter PLUGINs cannot be used with 1.6 API") -else () - include (CMakePlugins.cmake) +option (HDF5_ENABLE_PLUGIN_SUPPORT "Enable PLUGIN Filters" OFF) +if (HDF5_ENABLE_PLUGIN_SUPPORT) + if (${H5_LIBVER_DIR} EQUAL 16 OR HDF5_DEFAULT_API_VERSION MATCHES "v16") + set (HDF5_ENABLE_PLUGIN_SUPPORT OFF CACHE BOOL "" FORCE) + message (VERBOSE "Filter PLUGINs cannot be used with 1.6 API") + else () + include (CMakePlugins.cmake) - if (HDF5_PACKAGE_EXTLIBS AND NOT HDF5_NO_PACKAGES) - if (HDF5_ENABLE_PLUGIN_SUPPORT AND PLUGIN_FOUND) + if (HDF5_PACKAGE_EXTLIBS AND NOT HDF5_NO_PACKAGES AND PLUGIN_FOUND) PACKAGE_PLUGIN_LIBRARY (${HDF5_ALLOW_EXTERNAL_SUPPORT}) -# option (HDF5_TEST_PLUGIN "Execute plugin tests" ON) -# mark_as_advanced (HDF5_TEST_PLUGIN) - -# TEST_PLUGIN_LIBRARY () endif () endif () endif () diff --git a/CMakePlugins.cmake b/CMakePlugins.cmake index 93d40b2344a..91749c26cfd 100644 --- a/CMakePlugins.cmake +++ b/CMakePlugins.cmake @@ -20,7 +20,7 @@ else () endif () set (PLUGIN_URL ${H5PL_TGZPATH}/${PLUGIN_TGZ_NAME}) endif () -message (STATUS "Filter PLUGIN file is ${PLUGIN_URL}") +message (VERBOSE "Filter PLUGIN file is ${PLUGIN_URL}") include (ExternalProject) #option (HDF5_ALLOW_EXTERNAL_SUPPORT "Allow External Library Building (NO GIT TGZ)" "NO") @@ -50,21 +50,22 @@ endif () #----------------------------------------------------------------------------- # Option for PLUGIN support #----------------------------------------------------------------------------- -option (HDF5_ENABLE_PLUGIN_SUPPORT "Enable PLUGIN Filters" OFF) if (HDF5_ENABLE_PLUGIN_SUPPORT) if (NOT PLUGIN_USE_EXTERNAL) find_package (PLUGIN NAMES ${PLUGIN_PACKAGE_NAME}${HDF_PACKAGE_EXT}) if (NOT PLUGIN_FOUND) find_package (PLUGIN) # Legacy find endif () - endif () - if (NOT PLUGIN_FOUND) + else () if (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "GIT" OR HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "TGZ") EXTERNAL_PLUGIN_LIBRARY (${HDF5_ALLOW_EXTERNAL_SUPPORT}) message (STATUS "Filter PLUGIN is built") - else () - message (FATAL_ERROR " PLUGIN is Required for PLUGIN support in HDF5") endif () endif () - message (STATUS "Filter PLUGIN is ON") + if (PLUGIN_FOUND) + message (STATUS "Filter PLUGIN is ON") + else () + set (HDF5_ENABLE_PLUGIN_SUPPORT OFF CACHE BOOL "" FORCE) + message (FATAL_ERROR " PLUGIN support in HDF5 was enabled but not found") + endif () endif () diff --git a/HDF5Examples/CMakeLists.txt b/HDF5Examples/CMakeLists.txt index 3fd1a7eb0da..6efd8afebad 100644 --- a/HDF5Examples/CMakeLists.txt +++ b/HDF5Examples/CMakeLists.txt @@ -86,7 +86,7 @@ if (H5EX_ENABLE_PARALLEL) CHECK_SYMBOL_EXISTS (MPI_Comm_c2f "${MPI_C_INCLUDE_DIRS}/mpi.h" H5_HAVE_MPI_MULTI_LANG_Comm) CHECK_SYMBOL_EXISTS (MPI_Info_c2f "${MPI_C_INCLUDE_DIRS}/mpi.h" H5_HAVE_MPI_MULTI_LANG_Info) else () - message (STATUS "Parallel libraries not found") + message (WARNING "Parallel libraries not found") endif () endif () diff --git a/config/cmake/HDF5PluginCache.cmake b/config/cmake/HDF5PluginCache.cmake index 8c667077b88..6ad49bd3060 100644 --- a/config/cmake/HDF5PluginCache.cmake +++ b/config/cmake/HDF5PluginCache.cmake @@ -27,6 +27,10 @@ if (H5PL_ALLOW_EXTERNAL_SUPPORT MATCHES "GIT") set (ENABLE_LZF OFF CACHE BOOL "" FORCE) endif () +if (WIN32 AND (CMAKE_C_COMPILER_ID MATCHES "Intel[Ll][Ll][Vv][Mm]" OR CMAKE_C_COMPILER_ID MATCHES "Intel")) + set (ENABLE_ZFP OFF CACHE BOOL "" FORCE) +endif () + if (NOT DEFINED H5PL_TGZPATH) set (H5PL_TGZPATH "${TGZPATH}" CACHE PATH "PATH for finding plugin tgz file" FORCE) endif () diff --git a/config/cmake/HDF5PluginMacros.cmake b/config/cmake/HDF5PluginMacros.cmake index 3cb03ea2699..11ea0239f95 100644 --- a/config/cmake/HDF5PluginMacros.cmake +++ b/config/cmake/HDF5PluginMacros.cmake @@ -60,6 +60,6 @@ endmacro () #------------------------------------------------------------------------------- macro (PACKAGE_PLUGIN_LIBRARY compress_type) if (${compress_type} MATCHES "GIT" OR ${compress_type} MATCHES "TGZ") - message (STATUS "Filter PLUGIN is to be packaged") + message (VERBOSE "Filter PLUGIN is to be packaged") endif () endmacro () diff --git a/config/cmake/SignPackageFiles.cmake b/config/cmake/SignPackageFiles.cmake index 81cc5bfff21..32202c3209a 100644 --- a/config/cmake/SignPackageFiles.cmake +++ b/config/cmake/SignPackageFiles.cmake @@ -1,5 +1,5 @@ # This script signs the targets for the package -message(STATUS "Signing script in ${CPACK_TEMPORARY_INSTALL_DIRECTORY} and ${CPACK_PACKAGE_INSTALL_DIRECTORY}") +message(VERBOSE "Signing script in ${CPACK_TEMPORARY_INSTALL_DIRECTORY} and ${CPACK_PACKAGE_INSTALL_DIRECTORY}") # RPM needs ALL_COMPONENTS_IN_ONE added to path between ${CPACK_TEMPORARY_INSTALL_DIRECTORY} and ${CPACK_PACKAGE_INSTALL_DIRECTORY} if (CPACK_GENERATOR MATCHES "RPM") diff --git a/config/cmake/grepTest.cmake b/config/cmake/grepTest.cmake index 05014142ec3..841acf48483 100644 --- a/config/cmake/grepTest.cmake +++ b/config/cmake/grepTest.cmake @@ -24,7 +24,7 @@ if (NOT TEST_OUTPUT) message (FATAL_ERROR "Require TEST_OUTPUT to be defined") endif () if (NOT TEST_FILTER) - message (STATUS "Optional TEST_FILTER to be defined") + message (VERBOSE "Optional TEST_FILTER to be defined") endif () if (NOT TEST_REFERENCE) message (FATAL_ERROR "Require TEST_REFERENCE to be defined") diff --git a/config/cmake/jrunTest.cmake b/config/cmake/jrunTest.cmake index 95b2648dc48..d60d134db67 100644 --- a/config/cmake/jrunTest.cmake +++ b/config/cmake/jrunTest.cmake @@ -21,7 +21,7 @@ if (NOT TEST_PROGRAM) message (FATAL_ERROR "Require TEST_PROGRAM to be defined") endif () if (NOT TEST_LIBRARY_DIRECTORY) - message (STATUS "Require TEST_LIBRARY_DIRECTORY to be defined") + message (VERBOSE "Require TEST_LIBRARY_DIRECTORY to be defined") endif () if (NOT TEST_FOLDER) message (FATAL_ERROR "Require TEST_FOLDER to be defined") @@ -30,7 +30,7 @@ if (NOT TEST_OUTPUT) message (FATAL_ERROR "Require TEST_OUTPUT to be defined") endif () if (NOT TEST_CLASSPATH) - message (STATUS "Require TEST_CLASSPATH to be defined") + message (VERBOSE "Require TEST_CLASSPATH to be defined") endif () if (EXISTS "${TEST_FOLDER}/${TEST_OUTPUT}") diff --git a/config/cmake/runTest.cmake b/config/cmake/runTest.cmake index 3ab9e940d28..34635e61416 100644 --- a/config/cmake/runTest.cmake +++ b/config/cmake/runTest.cmake @@ -24,7 +24,7 @@ if (NOT TEST_OUTPUT) message (FATAL_ERROR "Require TEST_OUTPUT to be defined") endif () if (NOT TEST_EXPECT) - message (STATUS "Require TEST_EXPECT to be defined") + message (VERBOSE "Require TEST_EXPECT to be defined") endif () if (EXISTS "${TEST_FOLDER}/${TEST_OUTPUT}") diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 8900bae7528..e81f1d84e95 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -731,7 +731,7 @@ set (H5Z_SOURCES ${HDF5_SRC_DIR}/H5Ztrans.c ) if (H5_ZLIB_HEADER) - message(STATUS "H5_ZLIB_HEADER=${H5_ZLIB_HEADER}") + message(VERBOSE "H5_ZLIB_HEADER for library=${H5_ZLIB_HEADER}") set_source_files_properties(${HDF5_SRC_DIR}/H5Zdeflate.c PROPERTIES COMPILE_DEFINITIONS H5_ZLIB_HEADER="${H5_ZLIB_HEADER}" ) diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 792b5830003..a1f03431499 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -511,7 +511,7 @@ endif () #-- Adding test for direct_chunk if (H5_ZLIB_HEADER) - message(STATUS "H5_ZLIB_HEADER=${H5_ZLIB_HEADER}") + message(VERBOSE "H5_ZLIB_HEADER for direct_chunk=${H5_ZLIB_HEADER}") set_source_files_properties(${HDF5_TEST_SOURCE_DIR}/direct_chunk.c PROPERTIES COMPILE_DEFINITIONS H5_ZLIB_HEADER="${H5_ZLIB_HEADER}" diff --git a/tools/test/perform/CMakeLists.txt b/tools/test/perform/CMakeLists.txt index 646bd1a6de2..46170f9237d 100644 --- a/tools/test/perform/CMakeLists.txt +++ b/tools/test/perform/CMakeLists.txt @@ -113,7 +113,7 @@ set (zip_perf_SOURCES ${HDF5_TOOLS_TEST_PERFORM_SOURCE_DIR}/zip_perf.c ) if (H5_ZLIB_HEADER) - message(STATUS "H5_ZLIB_HEADER=${H5_ZLIB_HEADER}") + message (VERBOSE "H5_ZLIB_HEADER for zip_perf=${H5_ZLIB_HEADER}") if (HDF5_USE_ZLIB_NG) add_compile_definitions(H5_HAVE_ZLIBNG_H=1 H5_ZLIB_HEADER="${H5_ZLIB_HEADER}") endif () From be3f2995dc3f0e4909e7eed402de5b262daeebed Mon Sep 17 00:00:00 2001 From: Dana Robinson <43805+derobins@users.noreply.github.com> Date: Thu, 2 Jan 2025 08:09:45 -0800 Subject: [PATCH 5/6] Fix flipped calloc args (#5198) * Fix flipped calloc args in C++ tests --- c++/test/trefer.cpp | 8 ++++---- tools/src/h5repack/h5repack_refs.c | 2 +- tools/test/h5dump/h5dumpgentest.c | 10 +++++----- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/c++/test/trefer.cpp b/c++/test/trefer.cpp index ecc6de6c972..4a9a2f0447b 100644 --- a/c++/test/trefer.cpp +++ b/c++/test/trefer.cpp @@ -555,10 +555,10 @@ test_reference_region_1D() *drbuf; // Buffer for reading numeric data from disk // Allocate write & read buffers - wbuf = static_cast(calloc(sizeof(hdset_reg_ref_t), SPACE1_DIM1)); - rbuf = static_cast(malloc(sizeof(hdset_reg_ref_t) * SPACE1_DIM1)); - dwbuf = static_cast(malloc(sizeof(uint8_t) * SPACE3_DIM1)); - drbuf = static_cast(calloc(sizeof(uint8_t), SPACE3_DIM1)); + wbuf = static_cast(calloc(SPACE1_DIM1, sizeof(hdset_reg_ref_t))); + rbuf = static_cast(calloc(SPACE1_DIM1, sizeof(hdset_reg_ref_t))); + dwbuf = static_cast(calloc(SPACE3_DIM1, sizeof(uint8_t))); + drbuf = static_cast(calloc(SPACE3_DIM1, sizeof(uint8_t))); // Create file FILE1 H5File file1(FILE2, H5F_ACC_TRUNC); diff --git a/tools/src/h5repack/h5repack_refs.c b/tools/src/h5repack/h5repack_refs.c index 0c281b006e8..95f396663af 100644 --- a/tools/src/h5repack/h5repack_refs.c +++ b/tools/src/h5repack/h5repack_refs.c @@ -631,7 +631,7 @@ copy_refs_attr(hid_t loc_in, hid_t loc_out, trav_table_t *travt, hid_t fidout) / * 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)); /*init to zero */ 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 2a06a2323a3..c81d114164f 100644 --- a/tools/test/h5dump/h5dumpgentest.c +++ b/tools/test/h5dump/h5dumpgentest.c @@ -2406,10 +2406,10 @@ gent_attrreg(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 *)calloc(SPACE1_DIM1, sizeof(hdset_reg_ref_t)); + dwbuf = (uint8_t *)calloc(SPACE2_DIM1 * SPACE2_DIM2, sizeof(uint8_t)); + drbuf = (uint8_t *)calloc(SPACE2_DIM1 * SPACE2_DIM2, sizeof(uint8_t)); /* Create file */ fid1 = H5Fcreate(FILE64, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); @@ -3121,7 +3121,7 @@ gent_array1_big(void) block[0] = 1; /* Allocate write & read buffers */ - wbuf = (hdset_reg_ref_t *)calloc(sizeof(hdset_reg_ref_t), SPACE1_DIM1); + wbuf = (hdset_reg_ref_t *)calloc(SPACE1_DIM1, sizeof(hdset_reg_ref_t)); wdata = (int *)malloc(sizeof(int) * (size_t)(SPACE_ARRAY1BIG_DIM * ARRAY1BIG_DIM)); /* Allocate and initialize array data to write */ From 00adfce7a420bf56b05907001c16c0bce15e63df Mon Sep 17 00:00:00 2001 From: Dana Robinson <43805+derobins@users.noreply.github.com> Date: Thu, 2 Jan 2025 08:11:17 -0800 Subject: [PATCH 6/6] Remove duplicate MESSAGE macro (#5200) * Removes duplicate macro from C++ code * Hides global variables behind accessor functions --- c++/test/h5cpputil.h | 5 ----- test/testframe.c | 9 +++++++++ test/testframe.h | 29 ++++++++++++++++++++--------- 3 files changed, 29 insertions(+), 14 deletions(-) diff --git a/c++/test/h5cpputil.h b/c++/test/h5cpputil.h index 9288bd1e96a..ad95be47cd7 100644 --- a/c++/test/h5cpputil.h +++ b/c++/test/h5cpputil.h @@ -28,11 +28,6 @@ using namespace H5; using std::cerr; using std::endl; -#define MESSAGE(V, A) \ - do { \ - if (GetTestVerbosity() > (V)) \ - printf A; \ - } while (0) #define SUBTEST(TEST) \ do { \ printf(" Subtest: %-52s", TEST); \ diff --git a/test/testframe.c b/test/testframe.c index 05cb57967ea..b960781d153 100644 --- a/test/testframe.c +++ b/test/testframe.c @@ -537,6 +537,15 @@ TestShutdown(void) return SUCCEED; } +/* + * Retrieve the MPI rank for this process. + */ +H5_ATTR_PURE int +GetTestFrameworkProcessID(void) +{ + return TestFrameworkProcessID_g; +} + /* * Retrieve the verbosity level for the testing framework */ diff --git a/test/testframe.h b/test/testframe.h index 2b24f03c07d..f90e05fb717 100644 --- a/test/testframe.h +++ b/test/testframe.h @@ -91,16 +91,16 @@ * Verbose queries * Only None needs an exact match. The rest are at least as much. */ -#define VERBOSE_NONE (TestVerbosity_g == VERBO_NONE) -#define VERBOSE_DEF (TestVerbosity_g >= VERBO_DEF) -#define VERBOSE_LO (TestVerbosity_g >= VERBO_LO) -#define VERBOSE_MED (TestVerbosity_g >= VERBO_MED) -#define VERBOSE_HI (TestVerbosity_g >= VERBO_HI) +#define VERBOSE_NONE (GetTestVerbosity() == VERBO_NONE) +#define VERBOSE_DEF (GetTestVerbosity() >= VERBO_DEF) +#define VERBOSE_LO (GetTestVerbosity() >= VERBO_LO) +#define VERBOSE_MED (GetTestVerbosity() >= VERBO_MED) +#define VERBOSE_HI (GetTestVerbosity() >= VERBO_HI) /* Used to document process through a test */ #define MESSAGE(V, A) \ do { \ - if (TestFrameworkProcessID_g == 0 && TestVerbosity_g > (V)) \ + if (GetTestFrameworkProcessID() == 0 && GetTestVerbosity() > (V)) \ printf A; \ } while (0) @@ -112,9 +112,6 @@ /* Variables */ /*************/ -H5TEST_DLLVAR int TestFrameworkProcessID_g; -H5TEST_DLLVAR int TestVerbosity_g; - /**************/ /* Prototypes */ /**************/ @@ -422,6 +419,20 @@ H5TEST_DLL herr_t PerformTests(void); */ H5TEST_DLL void TestSummary(FILE *stream); +/** + * -------------------------------------------------------------------------- + * \ingroup H5TEST + * + * \brief Returns the MPI rank for this process + * + * \return The MPI rank of this process + * + * \details GetTestFrameworkProcessID() returns the MPI rank for this process. + * Always returns rank 0 in serial HDF5. + * + */ +H5TEST_DLL int GetTestFrameworkProcessID(void); + /** * -------------------------------------------------------------------------- * \ingroup H5TEST