From 0df712e69103d2bc2962d0ff41279434deda5853 Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Fri, 12 Dec 2025 11:02:11 +0100 Subject: [PATCH] Update OS used by the CI Check for cmake_minimum_required through the CI, and mention this in CHANGELOG.md Fix MacOS test_deflate to handle both MacOS-15 (and lesser) and MacOS-26 Update requirements for core; To Do: Update requirement for vendors --- .github/workflows/tests-macos.yml | 2 +- .github/workflows/tests.yml | 8 +- CHANGELOG.md | 7 ++ CMakeLists.txt | 16 +-- cmake/Findyaml.cmake | 2 +- cmake/SuperBuild.cmake | 2 +- example/CMakeLists.txt | 4 +- example/cmake/DefaultKind.cmake | 2 +- pdi/CMakeLists.txt | 6 +- pdi/benchmarks/CMakeLists.txt | 2 +- pdi/cmake/DefaultKind.cmake | 2 +- pdi/cmake/FindGMock.cmake | 2 +- pdi/cmake/FindPython3Path.cmake | 2 +- pdi/cmake/PDIConfig.cmake.in | 4 +- pdi/docs/CMakeLists.txt | 4 +- pdi/docs/First_steps/CMakeLists.txt | 2 +- pdi/docs/Source_installation.md | 2 +- pdi/tests/CMakeLists.txt | 2 +- pdi/tests/fortran/CMakeLists.txt | 2 +- plugins/decl_hdf5/CHANGELOG.md | 2 + plugins/decl_hdf5/CMakeLists.txt | 2 +- plugins/decl_hdf5/benchmarks/CMakeLists.txt | 2 +- plugins/decl_hdf5/tests/CMakeLists.txt | 2 +- .../tests/compatibility_tests/CMakeLists.txt | 2 +- .../tests/decl_hdf5_test_deflate.cxx | 104 +++++++++--------- .../decl_hdf5/tests/fortran/CMakeLists.txt | 2 +- plugins/decl_netcdf/CMakeLists.txt | 4 +- plugins/decl_netcdf/cmake/FindNetCDF.cmake | 2 +- plugins/decl_netcdf/tests/CMakeLists.txt | 2 +- plugins/deisa/CMakeLists.txt | 6 +- plugins/json/CMakeLists.txt | 2 +- plugins/json/tests/CMakeLists.txt | 2 +- plugins/mpi/CMakeLists.txt | 2 +- plugins/mpi/tests/CMakeLists.txt | 2 +- plugins/pycall/CHANGELOG.md | 2 +- plugins/pycall/CMakeLists.txt | 6 +- plugins/serialize/CMakeLists.txt | 2 +- plugins/serialize/tests/CMakeLists.txt | 2 +- plugins/set_value/CMakeLists.txt | 2 +- plugins/set_value/tests/CMakeLists.txt | 2 +- plugins/set_value/tests/Python/CMakeLists.txt | 4 +- plugins/trace/CMakeLists.txt | 2 +- plugins/user_code/CMakeLists.txt | 2 +- plugins/user_code/tests/CMakeLists.txt | 2 +- spack.yaml | 12 +- tests/CMakeLists.txt | 2 +- 46 files changed, 133 insertions(+), 118 deletions(-) diff --git a/.github/workflows/tests-macos.yml b/.github/workflows/tests-macos.yml index 73fdcbdf5..84b4e020a 100644 --- a/.github/workflows/tests-macos.yml +++ b/.github/workflows/tests-macos.yml @@ -38,7 +38,7 @@ jobs: strategy: fail-fast: false matrix: - os: [macos-13, macos-14, macos-15] + os: [macos-14, macos-15, macos-26] cxx_std: ['17'] build_type: ['Debug'] runs-on: ${{matrix.os}} diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index fe615162f..96e998ffa 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -1,5 +1,5 @@ #============================================================================= -# Copyright (C) 2024 Commissariat a l'energie atomique et aux energies alternatives (CEA) +# Copyright (C) 2024-2025 Commissariat a l'energie atomique et aux energies alternatives (CEA) # # All rights reserved. # @@ -48,12 +48,12 @@ jobs: - name: Test uses: ./.github/actions/test/ with: - image: 'ghcr.io/pdidev/spack/${{matrix.version}}/${{matrix.compiler}}/${{matrix.mpi}}/${{matrix.variant}}:v3' + image: 'ghcr.io/pdidev/spack/${{matrix.version}}/${{matrix.compiler}}/${{matrix.mpi}}/${{matrix.variant}}:v4' debuntu: strategy: fail-fast: false matrix: - base: ['ubuntu/focal', 'ubuntu/rolling', 'debian/bookworm', 'debian/unstable'] + base: ['ubuntu/jammy', 'ubuntu/rolling', 'debian/bookworm', 'debian/unstable'] mpi: ['openmpi', 'mpich'] variant: ['mini', 'all'] runs-on: ubuntu-24.04 @@ -64,4 +64,4 @@ jobs: - name: Test uses: ./.github/actions/test/ with: - image: 'ghcr.io/pdidev/${{matrix.base}}/${{matrix.mpi}}/${{matrix.variant}}:v3' + image: 'ghcr.io/pdidev/${{matrix.base}}/${{matrix.mpi}}/${{matrix.variant}}:v4' diff --git a/CHANGELOG.md b/CHANGELOG.md index 3bce3c3e6..196771c39 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,6 +15,13 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). trace plugins [#556](https://github.com/pdidev/pdi/issues/556) ### Changed +* Update the version of dependencies according to our policy: oldest supported non-EOL + Ubuntu (22.04 Jammy Jellyfish), oldstable Debian & Spack 0.19. The new requirements are: + CMake 3.22...3.28, NetCDF 4.9.2 (from 4.7.3), Python 3.10, mpi4py 3.1, numpy 1.21, pybind11 2.10, + HDF5 1.14.3 + For reference, the others requirements are kept : + JSON 3.11.4, libyaml 0.2.5, spdlog 1.14.1, ZPP 1.0.16 + [#613](https://github.com/pdidev/pdi/issues/613) ### Deprecated diff --git a/CMakeLists.txt b/CMakeLists.txt index 5ec9fbd33..e047e6ec2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -31,7 +31,7 @@ ### Project header -cmake_minimum_required(VERSION 3.16...3.29) +cmake_minimum_required(VERSION 3.22...3.28) project(PDI_DIST LANGUAGES C CXX) @@ -214,9 +214,9 @@ endif() ## Python3 if("${BUILD_PYTHON}") - find_package(Python3Path 3.8.2 REQUIRED COMPONENTS Interpreter Development) + find_package(Python3Path 3.10 REQUIRED COMPONENTS Interpreter Development) elseif("${BUILD_FORTRAN}") - find_package(Python3Path 3.8.2 REQUIRED COMPONENTS Interpreter) + find_package(Python3Path 3.10 REQUIRED COMPONENTS Interpreter) endif() @@ -266,7 +266,7 @@ sbuild_add_dependency(yaml "${USE_DEFAULT}" "-DINSTALL_INCLUDE_DIR:STRING=${CMAKE_INSTALL_INCLUDEDIR}" "-DINSTALL_CMAKE_DIR:STRING=share/yaml/cmake" "-DCMAKE_POLICY_VERSION_MINIMUM:STRING=3.5" # needed until upstream libyaml is updated (https://github.com/yaml/libyaml/pull/314) - VERSION 0.2.2 + VERSION 0.2.5 ) @@ -301,14 +301,14 @@ sbuild_add_dependency(spdlog "${USE_DEFAULT}" "-DSPDLOG_BUILD_EXAMPLES:BOOL=OFF" "-DSPDLOG_BUILD_TESTS:BOOL=OFF" "-DSPDLOG_FMT_EXTERNAL:BOOL=OFF" - VERSION 1.5.0 + VERSION 1.14.1 ) ## Doxygen if("${BUILD_DOCUMENTATION}") - find_package(Doxygen 1.8.17 REQUIRED OPTIONAL_COMPONENTS dot) + find_package(Doxygen 1.15 REQUIRED OPTIONAL_COMPONENTS dot) endif() @@ -416,7 +416,7 @@ if("${BUILD_DECL_NETCDF_PLUGIN}") -DENABLE_EXAMPLES:BOOL=OFF -DENABLE_FILTER_TESTING:BOOL=OFF -DENABLE_TESTS:BOOL=OFF - VERSION 4.7.3 + VERSION 4.9.2 ) if("${NETCDF_FOUND}") if("${BUILD_NETCDF_PARALLEL}" AND NOT "PARALLEL4" IN_LIST NetCDF_FEATURES) @@ -443,7 +443,7 @@ if("${BUILD_PYTHON}") "-DBUILD_TESTING:BOOL=OFF" "-DPYBIND11_TEST:BOOL=OFF" "-DPYBIND11_PYTHON_VERSION:STRING=${Python3_VERSION}" - VERSION 2.4.3 + VERSION 2.10 ) endif() diff --git a/cmake/Findyaml.cmake b/cmake/Findyaml.cmake index d5ec335cb..7acc268ab 100644 --- a/cmake/Findyaml.cmake +++ b/cmake/Findyaml.cmake @@ -24,7 +24,7 @@ # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #-------------------------------------------------------------------------------- -cmake_minimum_required(VERSION 3.16...3.25) +cmake_minimum_required(VERSION 3.22...3.28) # - Check for the presence of libyaml # diff --git a/cmake/SuperBuild.cmake b/cmake/SuperBuild.cmake index 717288dca..5bec9ba39 100644 --- a/cmake/SuperBuild.cmake +++ b/cmake/SuperBuild.cmake @@ -22,7 +22,7 @@ # THE SOFTWARE. ################################################################################ -cmake_minimum_required(VERSION 3.16...3.25) +cmake_minimum_required(VERSION 3.22...3.28) include(GNUInstallDirs) include(ExternalProject) diff --git a/example/CMakeLists.txt b/example/CMakeLists.txt index 11d6ee7e8..45659de61 100644 --- a/example/CMakeLists.txt +++ b/example/CMakeLists.txt @@ -27,7 +27,7 @@ # POSSIBILITY OF SUCH DAMAGE. #============================================================================= -cmake_minimum_required(VERSION 3.16...3.29) +cmake_minimum_required(VERSION 3.22...3.28) project(pdi_examples LANGUAGES C) list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/cmake") @@ -41,7 +41,7 @@ if("${BUILD_FORTRAN}") endif() if("${BUILD_PYTHON}") - find_package(Python3 3.8.2 REQUIRED COMPONENTS Interpreter) + find_package(Python3 3.10 REQUIRED COMPONENTS Interpreter) list(APPEND PDI_COMPONENTS python) endif() diff --git a/example/cmake/DefaultKind.cmake b/example/cmake/DefaultKind.cmake index 1fd6a7d0c..af76c7ff2 100644 --- a/example/cmake/DefaultKind.cmake +++ b/example/cmake/DefaultKind.cmake @@ -22,7 +22,7 @@ # THE SOFTWARE. ################################################################################ -cmake_minimum_required(VERSION 3.16...3.25) +cmake_minimum_required(VERSION 3.22...3.28) function(get_default_kind TYPE DEFAULT_KIND_VAR) if(DEFINED "${DEFAULT_KIND_VAR}") diff --git a/pdi/CMakeLists.txt b/pdi/CMakeLists.txt index 9a41bf259..d368ad0e5 100644 --- a/pdi/CMakeLists.txt +++ b/pdi/CMakeLists.txt @@ -27,7 +27,7 @@ # POSSIBILITY OF SUCH DAMAGE. #============================================================================= -cmake_minimum_required(VERSION 3.16...3.29) +cmake_minimum_required(VERSION 3.22...3.28) project(PDI LANGUAGES CXX C) list(APPEND CMAKE_MODULE_PATH "${PDI_SOURCE_DIR}/cmake") @@ -110,10 +110,10 @@ endif() find_package(paraconf 1.0.0 REQUIRED COMPONENTS ${PARACONF_COMPONENTS}) # must match PDIConfig.cmake.in find_package(spdlog 1.5.0 REQUIRED) # must match PDIConfig.cmake.in if("${BUILD_PYTHON}") - find_package(Python3Path 3.8.2 REQUIRED COMPONENTS Interpreter Development) + find_package(Python3Path 3.10 REQUIRED COMPONENTS Interpreter Development) set(Python_ADDITIONAL_VERSIONS "${Python3_VERSION}" CACHE STRING "Python version found by FindPython3 for coherency" FORCE) set(PYBIND11_PYTHON_VERSION "${Python3_VERSION}" CACHE STRING "Python version to use for compiling modules" FORCE) - find_package(pybind11 2.4.3 REQUIRED) # must match PDIConfig.cmake.in + find_package(pybind11 2.10 REQUIRED) # must match PDIConfig.cmake.in endif() if("${BUILD_FORTRAN}" OR "${BUILD_DOCUMENTATION}") add_subdirectory("../vendor/zpp-1.1.0/" "zpp") diff --git a/pdi/benchmarks/CMakeLists.txt b/pdi/benchmarks/CMakeLists.txt index 0c86b7fef..c5498d785 100644 --- a/pdi/benchmarks/CMakeLists.txt +++ b/pdi/benchmarks/CMakeLists.txt @@ -27,7 +27,7 @@ # POSSIBILITY OF SUCH DAMAGE. #============================================================================= -cmake_minimum_required(VERSION 3.16...3.29) +cmake_minimum_required(VERSION 3.22...3.28) project(PDI_benchmarks) diff --git a/pdi/cmake/DefaultKind.cmake b/pdi/cmake/DefaultKind.cmake index d0ae699cc..ad4c95ab7 100644 --- a/pdi/cmake/DefaultKind.cmake +++ b/pdi/cmake/DefaultKind.cmake @@ -22,7 +22,7 @@ # THE SOFTWARE. ################################################################################ -cmake_minimum_required(VERSION 3.16...3.25) +cmake_minimum_required(VERSION 3.22...3.28) list(INSERT CMAKE_MODULE_PATH 0 "${CMAKE_CURRENT_LIST_DIR}") diff --git a/pdi/cmake/FindGMock.cmake b/pdi/cmake/FindGMock.cmake index 534849219..361abea19 100644 --- a/pdi/cmake/FindGMock.cmake +++ b/pdi/cmake/FindGMock.cmake @@ -189,7 +189,7 @@ # # add_test(AllTestsInFoo foo) -cmake_minimum_required(VERSION 3.16...3.25) +cmake_minimum_required(VERSION 3.22...3.28) list(INSERT CMAKE_MODULE_PATH 0 "${CMAKE_CURRENT_LIST_DIR}") diff --git a/pdi/cmake/FindPython3Path.cmake b/pdi/cmake/FindPython3Path.cmake index a048dc863..33c8137f2 100644 --- a/pdi/cmake/FindPython3Path.cmake +++ b/pdi/cmake/FindPython3Path.cmake @@ -23,7 +23,7 @@ # THE SOFTWARE. ################################################################################ -cmake_minimum_required(VERSION 3.16...3.25) +cmake_minimum_required(VERSION 3.22...3.28) include(FindPackageHandleStandardArgs) diff --git a/pdi/cmake/PDIConfig.cmake.in b/pdi/cmake/PDIConfig.cmake.in index 7b183d563..49fefaf1d 100644 --- a/pdi/cmake/PDIConfig.cmake.in +++ b/pdi/cmake/PDIConfig.cmake.in @@ -22,7 +22,7 @@ # THE SOFTWARE. ################################################################################ -cmake_minimum_required(VERSION 3.16...3.25) +cmake_minimum_required(VERSION 3.22...3.28) list(INSERT CMAKE_MODULE_PATH 0 "${CMAKE_CURRENT_LIST_DIR}") @@ -125,7 +125,7 @@ if(TARGET PDI::PDI_plugins) find_dependency(spdlog 1.5.0) endif() if(TARGET PDI::PDI_pysupport) - find_dependency(pybind11 2.3.0) + find_dependency(pybind11 2.10) endif() if(TARGET PDI::PDI_f90) find_dependency(paraconf 1.0.0 COMPONENTS C f90) diff --git a/pdi/docs/CMakeLists.txt b/pdi/docs/CMakeLists.txt index e3b1972a2..4a0e1fae8 100644 --- a/pdi/docs/CMakeLists.txt +++ b/pdi/docs/CMakeLists.txt @@ -27,9 +27,9 @@ # POSSIBILITY OF SUCH DAMAGE. #============================================================================= -cmake_minimum_required(VERSION 3.16...3.29) +cmake_minimum_required(VERSION 3.22...3.28) -find_package(Doxygen 1.8.17 REQUIRED) +find_package(Doxygen 1.15 REQUIRED) set(DOXYGEN_INPUT "${CMAKE_CURRENT_SOURCE_DIR}/About.md" diff --git a/pdi/docs/First_steps/CMakeLists.txt b/pdi/docs/First_steps/CMakeLists.txt index 027447138..7ea4281c5 100644 --- a/pdi/docs/First_steps/CMakeLists.txt +++ b/pdi/docs/First_steps/CMakeLists.txt @@ -27,7 +27,7 @@ # POSSIBILITY OF SUCH DAMAGE. #============================================================================= -cmake_minimum_required(VERSION 3.16...3.29) +cmake_minimum_required(VERSION 3.22...3.28) if("${BUILD_FORTRAN}") add_executable(hello_access.f90 hello_access.f90) diff --git a/pdi/docs/Source_installation.md b/pdi/docs/Source_installation.md index 6c2cd7cf1..f8b89f019 100644 --- a/pdi/docs/Source_installation.md +++ b/pdi/docs/Source_installation.md @@ -196,7 +196,7 @@ Dependencies of **the Decl'HDF5 plugin**: Dependencies of **the Decl'NetCDF plugin**: * the PDI library, -* the [NetCDF](https://www.unidata.ucar.edu/software/netcdf/) library version 4.7.3 or above (provided), +* the [NetCDF](https://www.unidata.ucar.edu/software/netcdf/) library version 4.9.2 or above (provided), * the [HDF5](https://www.hdfgroup.org/solutions/hdf5/) library version 1.10.4 or above (provided), * **a MPI implementation for the parallel version of the plugin (not provided)**, such as - [openmpi](https://www.open-mpi.org/) 4.0 or above, diff --git a/pdi/tests/CMakeLists.txt b/pdi/tests/CMakeLists.txt index a54247979..0b696599f 100644 --- a/pdi/tests/CMakeLists.txt +++ b/pdi/tests/CMakeLists.txt @@ -27,7 +27,7 @@ # POSSIBILITY OF SUCH DAMAGE. #============================================================================= -cmake_minimum_required(VERSION 3.16...3.29) +cmake_minimum_required(VERSION 3.22...3.28) find_package(Threads REQUIRED) if(NOT TARGET GTest::gtest) diff --git a/pdi/tests/fortran/CMakeLists.txt b/pdi/tests/fortran/CMakeLists.txt index a93192288..6a3fc2496 100644 --- a/pdi/tests/fortran/CMakeLists.txt +++ b/pdi/tests/fortran/CMakeLists.txt @@ -28,7 +28,7 @@ # POSSIBILITY OF SUCH DAMAGE. #============================================================================= -cmake_minimum_required(VERSION 3.16...3.29) +cmake_minimum_required(VERSION 3.22...3.28) enable_language(Fortran) # Includes diff --git a/plugins/decl_hdf5/CHANGELOG.md b/plugins/decl_hdf5/CHANGELOG.md index 551a4dcdc..575ad2964 100644 --- a/plugins/decl_hdf5/CHANGELOG.md +++ b/plugins/decl_hdf5/CHANGELOG.md @@ -9,6 +9,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). ### Added * Possibility to add a regex for dataset name in datasets section [#582](https://github.com/pdidev/pkgs/issues/582) +* Fix HDF5 compression test for MacOS 26 + [#627](https://github.com/pdidev/pdi/issues/627) ### Changed diff --git a/plugins/decl_hdf5/CMakeLists.txt b/plugins/decl_hdf5/CMakeLists.txt index 4ffc07438..7ad26b49a 100644 --- a/plugins/decl_hdf5/CMakeLists.txt +++ b/plugins/decl_hdf5/CMakeLists.txt @@ -28,7 +28,7 @@ # POSSIBILITY OF SUCH DAMAGE. #============================================================================= -cmake_minimum_required(VERSION 3.16...3.29) +cmake_minimum_required(VERSION 3.22...3.28) project(pdi_decl_hdf5_plugin LANGUAGES C CXX) list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/cmake") diff --git a/plugins/decl_hdf5/benchmarks/CMakeLists.txt b/plugins/decl_hdf5/benchmarks/CMakeLists.txt index 26c3be8a2..bfa6cbb68 100644 --- a/plugins/decl_hdf5/benchmarks/CMakeLists.txt +++ b/plugins/decl_hdf5/benchmarks/CMakeLists.txt @@ -27,7 +27,7 @@ # POSSIBILITY OF SUCH DAMAGE. #============================================================================= -cmake_minimum_required(VERSION 3.16...3.29) +cmake_minimum_required(VERSION 3.22...3.28) project(decl_hdf5_benchmarks) diff --git a/plugins/decl_hdf5/tests/CMakeLists.txt b/plugins/decl_hdf5/tests/CMakeLists.txt index 432a0d08b..358079c17 100644 --- a/plugins/decl_hdf5/tests/CMakeLists.txt +++ b/plugins/decl_hdf5/tests/CMakeLists.txt @@ -28,7 +28,7 @@ # POSSIBILITY OF SUCH DAMAGE. #============================================================================= -cmake_minimum_required(VERSION 3.16...3.29) +cmake_minimum_required(VERSION 3.22...3.28) if(NOT TARGET GTest::gtest) option(INSTALL_GTEST "Enable installation of googletest. (Projects embedding googletest may want to turn this OFF.)" OFF) diff --git a/plugins/decl_hdf5/tests/compatibility_tests/CMakeLists.txt b/plugins/decl_hdf5/tests/compatibility_tests/CMakeLists.txt index a390af759..4d9e4d66d 100644 --- a/plugins/decl_hdf5/tests/compatibility_tests/CMakeLists.txt +++ b/plugins/decl_hdf5/tests/compatibility_tests/CMakeLists.txt @@ -23,7 +23,7 @@ # THE SOFTWARE. #============================================================================= -cmake_minimum_required(VERSION 3.16...3.29) +cmake_minimum_required(VERSION 3.22...3.28) set(RUNTEST_DIR "${CMAKE_CURRENT_LIST_DIR}/../../cmake/runtest-dir") diff --git a/plugins/decl_hdf5/tests/decl_hdf5_test_deflate.cxx b/plugins/decl_hdf5/tests/decl_hdf5_test_deflate.cxx index 1d8d1722d..bfef64b64 100644 --- a/plugins/decl_hdf5/tests/decl_hdf5_test_deflate.cxx +++ b/plugins/decl_hdf5/tests/decl_hdf5_test_deflate.cxx @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (C) 2015-2024 Commissariat a l'energie atomique et aux energies alternatives (CEA) + * Copyright (C) 2015-2025 Commissariat a l'energie atomique et aux energies alternatives (CEA) * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -29,6 +29,25 @@ #include #include +bool get_deflate_level(hid_t plist_id, unsigned int& level) +{ + int nfilters = H5Pget_nfilters(plist_id); + for (int i = 0; i < nfilters; i++) { + size_t nelmts = 1; + unsigned int cd_value = 0; + + H5Z_filter_t filter = H5Pget_filter2(plist_id, i, nullptr, &nelmts, &cd_value, 0, nullptr, nullptr); + + if (filter == H5Z_FILTER_DEFLATE) { + if (nelmts == 1) { + level = cd_value; + return true; + } + } + } + return false; +} + TEST(decl_hdf5_deflate, no_deflate) { const char* CONFIG_YAML @@ -52,22 +71,17 @@ TEST(decl_hdf5_deflate, no_deflate) size_t N = 1000; PDI_expose("pb_size", &N, PDI_OUT); - double** matrix_data = new double*[N]; - for (int i = 0; i < N; i++) { - matrix_data[i] = new double[N]; - for (int j = 0; j < N; j++) { - matrix_data[i][j] = N * i + j; + std::vector matrix_data(N * N); + for (size_t i = 0; i < N; i++) { + for (size_t j = 0; j < N; j++) { + matrix_data[i * N + j] = N * i + j; } } - PDI_expose("matrix_data", matrix_data, PDI_OUT); + PDI_expose("matrix_data", matrix_data.data(), PDI_OUT); PDI_finalize(); PC_tree_destroy(&conf); - for (int i = 0; i < N; i++) - delete[] matrix_data[i]; - delete[] matrix_data; - hid_t file_id, dataset_id, plist_id; herr_t status; unsigned int compression_level; @@ -78,9 +92,10 @@ TEST(decl_hdf5_deflate, no_deflate) dataset_id = H5Dopen2(file_id, "matrix_data", H5P_DEFAULT); plist_id = H5Dget_create_plist(dataset_id); - status = H5Pget_filter_by_id2(plist_id, H5Z_FILTER_DEFLATE, NULL, &cd_nelmts, &compression_level, 0, NULL, NULL); + unsigned int level = 0; + bool has_deflate = get_deflate_level(plist_id, level); - ASSERT_LT(status, 0); + ASSERT_FALSE(has_deflate); H5Pclose(plist_id); H5Dclose(dataset_id); @@ -112,22 +127,17 @@ TEST(decl_hdf5_deflate, deflate_level1) size_t N = 1000; PDI_expose("pb_size", &N, PDI_OUT); - double** matrix_data = new double*[N]; - for (int i = 0; i < N; i++) { - matrix_data[i] = new double[N]; - for (int j = 0; j < N; j++) { - matrix_data[i][j] = N * i + j; + std::vector matrix_data(N * N); + for (size_t i = 0; i < N; i++) { + for (size_t j = 0; j < N; j++) { + matrix_data[i * N + j] = N * i + j; } } - PDI_expose("matrix_data", matrix_data, PDI_OUT); + PDI_expose("matrix_data", matrix_data.data(), PDI_OUT); PDI_finalize(); PC_tree_destroy(&conf); - for (int i = 0; i < N; i++) - delete[] matrix_data[i]; - delete[] matrix_data; - hid_t file_id, dataset_id, plist_id; herr_t status; unsigned int compression_level; @@ -138,9 +148,11 @@ TEST(decl_hdf5_deflate, deflate_level1) dataset_id = H5Dopen2(file_id, "matrix_data", H5P_DEFAULT); plist_id = H5Dget_create_plist(dataset_id); - status = H5Pget_filter_by_id2(plist_id, H5Z_FILTER_DEFLATE, NULL, &cd_nelmts, &compression_level, 0, NULL, NULL); + unsigned int level = 0; + bool has_deflate = get_deflate_level(plist_id, level); - ASSERT_EQ(compression_level, 1); + ASSERT_TRUE(has_deflate); + ASSERT_EQ(level, 1); H5Pclose(plist_id); H5Dclose(dataset_id); @@ -172,22 +184,17 @@ TEST(decl_hdf5_deflate, deflate_level2) size_t N = 1000; PDI_expose("pb_size", &N, PDI_OUT); - double** matrix_data = new double*[N]; - for (int i = 0; i < N; i++) { - matrix_data[i] = new double[N]; - for (int j = 0; j < N; j++) { - matrix_data[i][j] = N * i + j; + std::vector matrix_data(N * N); + for (size_t i = 0; i < N; i++) { + for (size_t j = 0; j < N; j++) { + matrix_data[i * N + j] = N * i + j; } } - PDI_expose("matrix_data", matrix_data, PDI_OUT); + PDI_expose("matrix_data", matrix_data.data(), PDI_OUT); PDI_finalize(); PC_tree_destroy(&conf); - for (int i = 0; i < N; i++) - delete[] matrix_data[i]; - delete[] matrix_data; - hid_t file_id, dataset_id, plist_id; herr_t status; unsigned int compression_level; @@ -198,9 +205,11 @@ TEST(decl_hdf5_deflate, deflate_level2) dataset_id = H5Dopen2(file_id, "matrix_data", H5P_DEFAULT); plist_id = H5Dget_create_plist(dataset_id); - status = H5Pget_filter_by_id2(plist_id, H5Z_FILTER_DEFLATE, NULL, &cd_nelmts, &compression_level, 0, NULL, NULL); + unsigned int level = 0; + bool has_deflate = get_deflate_level(plist_id, level); - ASSERT_EQ(compression_level, 2); + ASSERT_TRUE(has_deflate); + ASSERT_EQ(level, 2); H5Pclose(plist_id); H5Dclose(dataset_id); @@ -232,22 +241,17 @@ TEST(decl_hdf5_deflate, deflate_level9) size_t N = 1000; PDI_expose("pb_size", &N, PDI_OUT); - double** matrix_data = new double*[N]; - for (int i = 0; i < N; i++) { - matrix_data[i] = new double[N]; - for (int j = 0; j < N; j++) { - matrix_data[i][j] = N * i + j; + std::vector matrix_data(N * N); + for (size_t i = 0; i < N; i++) { + for (size_t j = 0; j < N; j++) { + matrix_data[i * N + j] = N * i + j; } } - PDI_expose("matrix_data", matrix_data, PDI_OUT); + PDI_expose("matrix_data", matrix_data.data(), PDI_OUT); PDI_finalize(); PC_tree_destroy(&conf); - for (int i = 0; i < N; i++) - delete[] matrix_data[i]; - delete[] matrix_data; - hid_t file_id, dataset_id, plist_id; herr_t status; unsigned int compression_level; @@ -258,9 +262,11 @@ TEST(decl_hdf5_deflate, deflate_level9) dataset_id = H5Dopen2(file_id, "matrix_data", H5P_DEFAULT); plist_id = H5Dget_create_plist(dataset_id); - status = H5Pget_filter_by_id2(plist_id, H5Z_FILTER_DEFLATE, NULL, &cd_nelmts, &compression_level, 0, NULL, NULL); + unsigned int level = 0; + bool has_deflate = get_deflate_level(plist_id, level); - ASSERT_EQ(compression_level, 9); + ASSERT_TRUE(has_deflate); + ASSERT_EQ(level, 9); H5Pclose(plist_id); H5Dclose(dataset_id); diff --git a/plugins/decl_hdf5/tests/fortran/CMakeLists.txt b/plugins/decl_hdf5/tests/fortran/CMakeLists.txt index 6aba57b20..3f4827a53 100644 --- a/plugins/decl_hdf5/tests/fortran/CMakeLists.txt +++ b/plugins/decl_hdf5/tests/fortran/CMakeLists.txt @@ -28,7 +28,7 @@ # POSSIBILITY OF SUCH DAMAGE. #============================================================================= -cmake_minimum_required(VERSION 3.16...3.29) +cmake_minimum_required(VERSION 3.22...3.28) enable_language(Fortran) # Includes diff --git a/plugins/decl_netcdf/CMakeLists.txt b/plugins/decl_netcdf/CMakeLists.txt index 7d195b866..bf66a721c 100644 --- a/plugins/decl_netcdf/CMakeLists.txt +++ b/plugins/decl_netcdf/CMakeLists.txt @@ -28,7 +28,7 @@ # POSSIBILITY OF SUCH DAMAGE. #============================================================================= -cmake_minimum_required(VERSION 3.16...3.29) +cmake_minimum_required(VERSION 3.22...3.28) project(pdi_decl_netcdf_plugin LANGUAGES C CXX) list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/cmake") @@ -44,7 +44,7 @@ if("${BUILD_NETCDF_PARALLEL}") endif() # NetCDF -find_package(NetCDF 4.7.3 REQUIRED) +find_package(NetCDF 4.9.2 REQUIRED) if("${BUILD_NETCDF_PARALLEL}" AND NOT "PARALLEL4" IN_LIST NetCDF_FEATURES) message(FATAL_ERROR "Parallel NetCDF required, sequential NetCDF only found. Please set -DBUILD_NETCDF_PARALLEL=OFF to disable parallel NetCDF") endif() diff --git a/plugins/decl_netcdf/cmake/FindNetCDF.cmake b/plugins/decl_netcdf/cmake/FindNetCDF.cmake index fa8e907ab..c7cdc3328 100644 --- a/plugins/decl_netcdf/cmake/FindNetCDF.cmake +++ b/plugins/decl_netcdf/cmake/FindNetCDF.cmake @@ -63,7 +63,7 @@ includes: #]==] -cmake_minimum_required(VERSION 3.16...3.25) +cmake_minimum_required(VERSION 3.22...3.28) set(_NetCDF_features_list CDF5 DAP DAP2 DAP4 DISKLESS HDF4 HDF5 JNA MMAP NC2 NC4 PARALLEL PARALLEL4 PNETCDF) diff --git a/plugins/decl_netcdf/tests/CMakeLists.txt b/plugins/decl_netcdf/tests/CMakeLists.txt index 06296f4ba..70e299345 100644 --- a/plugins/decl_netcdf/tests/CMakeLists.txt +++ b/plugins/decl_netcdf/tests/CMakeLists.txt @@ -24,7 +24,7 @@ #============================================================================= -cmake_minimum_required(VERSION 3.16...3.29) +cmake_minimum_required(VERSION 3.22...3.28) if(NOT TARGET GTest::gtest) option(INSTALL_GTEST "Enable installation of googletest. (Projects embedding googletest may want to turn this OFF.)" OFF) diff --git a/plugins/deisa/CMakeLists.txt b/plugins/deisa/CMakeLists.txt index b6d720267..0af7a709a 100644 --- a/plugins/deisa/CMakeLists.txt +++ b/plugins/deisa/CMakeLists.txt @@ -8,18 +8,18 @@ # SPDX-License-Identifier: MIT #============================================================================= -cmake_minimum_required(VERSION 3.16...3.29) +cmake_minimum_required(VERSION 3.22...3.28) project(pdi_deisa_plugin LANGUAGES C CXX) list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/cmake") include(GNUInstallDirs) -find_package(Python3 3.8.2 REQUIRED COMPONENTS Interpreter Development) +find_package(Python3 3.10 REQUIRED COMPONENTS Interpreter Development) # PyBind11 set(Python_ADDITIONAL_VERSIONS "${Python3_VERSION}" CACHE STRING "Python version found by FindPython3 for coherency" FORCE) set(PYBIND11_PYTHON_VERSION "${Python3_VERSION}" CACHE STRING "Python version to use for compiling modules" FORCE) -find_package(pybind11 2.4.3 REQUIRED) +find_package(pybind11 2.10 REQUIRED) # PDI find_package(PDI REQUIRED COMPONENTS plugins pysupport) diff --git a/plugins/json/CMakeLists.txt b/plugins/json/CMakeLists.txt index 974c4ea7e..8988eecb3 100644 --- a/plugins/json/CMakeLists.txt +++ b/plugins/json/CMakeLists.txt @@ -22,7 +22,7 @@ # THE SOFTWARE. #============================================================================= -cmake_minimum_required(VERSION 3.16...3.29) +cmake_minimum_required(VERSION 3.22...3.28) project(pdi_json_plugin LANGUAGES C CXX) list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/cmake") diff --git a/plugins/json/tests/CMakeLists.txt b/plugins/json/tests/CMakeLists.txt index 96e73cb49..36b2a7c61 100644 --- a/plugins/json/tests/CMakeLists.txt +++ b/plugins/json/tests/CMakeLists.txt @@ -22,7 +22,7 @@ # THE SOFTWARE. #============================================================================= -cmake_minimum_required(VERSION 3.16...3.29) +cmake_minimum_required(VERSION 3.22...3.28) # Add the plugin path to PDI_PLUGIN_PATH set_property(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}" PROPERTY TEST_INCLUDE_FILE "${CMAKE_CURRENT_BINARY_DIR}/TestPath.cmake") diff --git a/plugins/mpi/CMakeLists.txt b/plugins/mpi/CMakeLists.txt index 7a6a8435d..3dc41284e 100644 --- a/plugins/mpi/CMakeLists.txt +++ b/plugins/mpi/CMakeLists.txt @@ -23,7 +23,7 @@ # THE SOFTWARE. #============================================================================= -cmake_minimum_required(VERSION 3.16...3.29) +cmake_minimum_required(VERSION 3.22...3.28) project(pdi_mpi_plugin LANGUAGES C CXX) list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/cmake") diff --git a/plugins/mpi/tests/CMakeLists.txt b/plugins/mpi/tests/CMakeLists.txt index 2ddb6a29d..ad08ef08c 100644 --- a/plugins/mpi/tests/CMakeLists.txt +++ b/plugins/mpi/tests/CMakeLists.txt @@ -28,7 +28,7 @@ # POSSIBILITY OF SUCH DAMAGE. #============================================================================= -cmake_minimum_required(VERSION 3.16...3.29) +cmake_minimum_required(VERSION 3.22...3.28) set(RUNTEST_DIR "${CMAKE_CURRENT_LIST_DIR}/../cmake/runtest-dir") diff --git a/plugins/pycall/CHANGELOG.md b/plugins/pycall/CHANGELOG.md index 6d8b91a81..d9139ac18 100644 --- a/plugins/pycall/CHANGELOG.md +++ b/plugins/pycall/CHANGELOG.md @@ -33,7 +33,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). [#349](https://gitlab.maisondelasimulation.fr/pdidev/pdi/-/issues/349) * Update the version of dependencies according to our policy: oldest supported Ubuntu & Fedora, oldstable debian & spack 0.18. The new requirements are: - CMake 3.16, Python 3.8, numpy 1.17, pybind11 2.4 + CMake 3.16, Python 3.8, numpy 1.17, pybind11 2.10 [#465](https://github.com/pdidev/pdi/issues/465) diff --git a/plugins/pycall/CMakeLists.txt b/plugins/pycall/CMakeLists.txt index ac46c31c8..1c3031a00 100644 --- a/plugins/pycall/CMakeLists.txt +++ b/plugins/pycall/CMakeLists.txt @@ -27,7 +27,7 @@ # POSSIBILITY OF SUCH DAMAGE. #============================================================================= -cmake_minimum_required(VERSION 3.16...3.29) +cmake_minimum_required(VERSION 3.22...3.28) project(pdi_pycall_plugin LANGUAGES C CXX) list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/cmake") @@ -35,12 +35,12 @@ include(CTest) include(GNUInstallDirs) -find_package(Python3 3.8.2 REQUIRED COMPONENTS Interpreter Development) +find_package(Python3 3.10 REQUIRED COMPONENTS Interpreter Development) # PyBind11 set(Python_ADDITIONAL_VERSIONS "${Python3_VERSION}" CACHE STRING "Python version found by FindPython3 for coherency" FORCE) set(PYBIND11_PYTHON_VERSION "${Python3_VERSION}" CACHE STRING "Python version to use for compiling modules" FORCE) -find_package(pybind11 2.4.3 REQUIRED) +find_package(pybind11 2.10 REQUIRED) # PDI find_package(PDI REQUIRED COMPONENTS pysupport) diff --git a/plugins/serialize/CMakeLists.txt b/plugins/serialize/CMakeLists.txt index ebef61664..4e2208638 100644 --- a/plugins/serialize/CMakeLists.txt +++ b/plugins/serialize/CMakeLists.txt @@ -23,7 +23,7 @@ # THE SOFTWARE. #============================================================================= -cmake_minimum_required(VERSION 3.16...3.29) +cmake_minimum_required(VERSION 3.22...3.28) project(pdi_serialize_plugin LANGUAGES C CXX) list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/cmake") diff --git a/plugins/serialize/tests/CMakeLists.txt b/plugins/serialize/tests/CMakeLists.txt index d8ad6e564..83ea49520 100644 --- a/plugins/serialize/tests/CMakeLists.txt +++ b/plugins/serialize/tests/CMakeLists.txt @@ -23,7 +23,7 @@ # THE SOFTWARE. #============================================================================= -cmake_minimum_required(VERSION 3.16...3.29) +cmake_minimum_required(VERSION 3.22...3.28) if(NOT TARGET GTest::gtest) option(INSTALL_GTEST "Enable installation of googletest. (Projects embedding googletest may want to turn this OFF.)" OFF) diff --git a/plugins/set_value/CMakeLists.txt b/plugins/set_value/CMakeLists.txt index 7c4aaeab5..0c2727004 100644 --- a/plugins/set_value/CMakeLists.txt +++ b/plugins/set_value/CMakeLists.txt @@ -23,7 +23,7 @@ # THE SOFTWARE. #============================================================================= -cmake_minimum_required(VERSION 3.16...3.29) +cmake_minimum_required(VERSION 3.22...3.28) project(pdi_set_value_plugin LANGUAGES C CXX) list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/cmake") diff --git a/plugins/set_value/tests/CMakeLists.txt b/plugins/set_value/tests/CMakeLists.txt index 5e2e10472..9b41800df 100644 --- a/plugins/set_value/tests/CMakeLists.txt +++ b/plugins/set_value/tests/CMakeLists.txt @@ -23,7 +23,7 @@ # THE SOFTWARE. #============================================================================= -cmake_minimum_required(VERSION 3.16...3.29) +cmake_minimum_required(VERSION 3.22...3.28) set(RUNTEST_DIR "${CMAKE_CURRENT_LIST_DIR}/../cmake/runtest-dir") diff --git a/plugins/set_value/tests/Python/CMakeLists.txt b/plugins/set_value/tests/Python/CMakeLists.txt index 0a1bb156c..3cc0de2ca 100644 --- a/plugins/set_value/tests/Python/CMakeLists.txt +++ b/plugins/set_value/tests/Python/CMakeLists.txt @@ -23,9 +23,9 @@ # THE SOFTWARE. #============================================================================= -cmake_minimum_required(VERSION 3.16...3.29) +cmake_minimum_required(VERSION 3.22...3.28) -find_package(Python3 3.8.2 REQUIRED COMPONENTS Interpreter) +find_package(Python3 3.10 REQUIRED COMPONENTS Interpreter) set(Python_ADDITIONAL_VERSIONS "${Python3_VERSION}" CACHE STRING "Python version found by FindPython3 for coherency") set(RUNTEST_DIR "${CMAKE_CURRENT_LIST_DIR}/../../cmake/runtest-dir") diff --git a/plugins/trace/CMakeLists.txt b/plugins/trace/CMakeLists.txt index 85b91457e..bd75ef908 100644 --- a/plugins/trace/CMakeLists.txt +++ b/plugins/trace/CMakeLists.txt @@ -22,7 +22,7 @@ # THE SOFTWARE. #============================================================================= -cmake_minimum_required(VERSION 3.16...3.29) +cmake_minimum_required(VERSION 3.22...3.28) project(pdi_trace_plugin LANGUAGES C CXX) list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/cmake") diff --git a/plugins/user_code/CMakeLists.txt b/plugins/user_code/CMakeLists.txt index 29455406a..f7826758c 100644 --- a/plugins/user_code/CMakeLists.txt +++ b/plugins/user_code/CMakeLists.txt @@ -27,7 +27,7 @@ # POSSIBILITY OF SUCH DAMAGE. #============================================================================= -cmake_minimum_required(VERSION 3.16...3.29) +cmake_minimum_required(VERSION 3.22...3.28) project(pdi_user_code_plugin LANGUAGES C CXX) list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/cmake") diff --git a/plugins/user_code/tests/CMakeLists.txt b/plugins/user_code/tests/CMakeLists.txt index 2729f1b5f..a5bdcaba3 100644 --- a/plugins/user_code/tests/CMakeLists.txt +++ b/plugins/user_code/tests/CMakeLists.txt @@ -27,7 +27,7 @@ # POSSIBILITY OF SUCH DAMAGE. #============================================================================= -cmake_minimum_required(VERSION 3.16...3.29) +cmake_minimum_required(VERSION 3.22...3.28) # Add the plugin path to PDI_PLUGIN_PATH set_property(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}" PROPERTY TEST_INCLUDE_FILE "${CMAKE_CURRENT_BINARY_DIR}/TestPath.cmake") diff --git a/spack.yaml b/spack.yaml index ded772028..658ef99dc 100644 --- a/spack.yaml +++ b/spack.yaml @@ -29,16 +29,16 @@ spack: concretization: together specs: - - 'cmake@3.16.3:3' + - 'cmake@3.22:3' - 'doxygen@1.8.17:1' - 'hdf5@1.10.4:1' - 'mpi' - - 'netcdf-c@4.7.3:4' + - 'netcdf-c@4.9.2:4' - 'paraconf@1.0.0:1' - 'pkgconfig' - - 'py-mpi4py@3.0.3:3' - - 'py-numpy@1.17.4:1' + - 'py-mpi4py@3.1:3' + - 'py-numpy@1.21:1' - 'py-pyyaml@5.3.1:5' - - 'py-pybind11@2.4.3:2' - - 'python@3.8.2:3' + - 'py-pybind11@2.10:2' + - 'python@3.10:3' - 'spdlog@1.5.0:1' diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 1706d200b..4704fe0ab 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -23,7 +23,7 @@ # THE SOFTWARE. #============================================================================= -cmake_minimum_required(VERSION 3.16...3.29) +cmake_minimum_required(VERSION 3.22...3.28) project(pdi_tests LANGUAGES C) list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/cmake")