From 19f93d8b0ad1e10884ab97b45a9f44c262630a04 Mon Sep 17 00:00:00 2001 From: Alyn James Date: Sun, 28 Dec 2025 17:49:31 +0000 Subject: [PATCH 01/64] Initial CI jobs --- .github/workflows/ci.yml | 66 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 66 insertions(+) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..8b70e22 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,66 @@ +name: HDF5 Fortran API CI + +on: + push: + pull_request: + +jobs: + build_serial_HDF5_with_gfortran: + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Install dependencies + run: | + sudo apt-get update + sudo apt-get install -y \ + gfortran \ + cmake \ + libhdf5-dev \ + libhdf5-fortran-102 + + - name: Verify compilers and HDF5 + run: | + gfortran --version + cmake --version + + - name: Configure test runner with CMake and run + run: | + cmake -S tests/. -B build-tests \ + -DCMAKE_Fortran_COMPILER=gfortran + cmake --build build-tests + ./build-tests/h5testrunner + + + build_parallel_HDF5_with_gfortran: + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Install dependencies + run: | + sudo apt-get update + sudo apt-get install -y \ + gfortran \ + cmake \ + libopenmpi-dev \ + libhdf5-openmpi-dev + + - name: Verify compilers and HDF5 + run: | + gfortran --version + cmake --version + mpif90 --version + + - name: Configure test runner with CMake and run + run: | + cmake -S tests/. -B build-tests \ + -DCMAKE_Fortran_COMPILER=mpif90 -DMPI_VERSION=ON + cmake --build build-tests + ./build-tests/h5testrunner + ./build-tests/h5testrunner_mpi + mpirun -np 4 ./build-tests/h5testrunner_mpi From 3b962c2d7f4a8adaaab16ab49013aedd9747813c Mon Sep 17 00:00:00 2001 From: Alyn James Date: Sun, 28 Dec 2025 17:52:48 +0000 Subject: [PATCH 02/64] Initial CI jobs --- .github/workflows/ci.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8b70e22..858ee32 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -28,9 +28,9 @@ jobs: - name: Configure test runner with CMake and run run: | - cmake -S tests/. -B build-tests \ + cmake -S ./tests/. -B ./build-tests \ -DCMAKE_Fortran_COMPILER=gfortran - cmake --build build-tests + cmake --build ./build-tests ./build-tests/h5testrunner @@ -58,7 +58,7 @@ jobs: - name: Configure test runner with CMake and run run: | - cmake -S tests/. -B build-tests \ + cmake -S ./test/. -B ./build-tests \ -DCMAKE_Fortran_COMPILER=mpif90 -DMPI_VERSION=ON cmake --build build-tests ./build-tests/h5testrunner From d3185bdd64b2bdf7a42ffe3326c1c080c1d1dd0e Mon Sep 17 00:00:00 2001 From: Alyn James Date: Sun, 28 Dec 2025 17:56:12 +0000 Subject: [PATCH 03/64] Initial CI jobs --- .github/workflows/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 858ee32..99343d6 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -28,7 +28,7 @@ jobs: - name: Configure test runner with CMake and run run: | - cmake -S ./tests/. -B ./build-tests \ + cmake -S ./test/. -B ./build-tests \ -DCMAKE_Fortran_COMPILER=gfortran cmake --build ./build-tests ./build-tests/h5testrunner @@ -63,4 +63,4 @@ jobs: cmake --build build-tests ./build-tests/h5testrunner ./build-tests/h5testrunner_mpi - mpirun -np 4 ./build-tests/h5testrunner_mpi + mpirun --allow-run-as-root -np 2 ./build-tests/h5testrunner_mpi From 5e21814f38bc21be9acbb9df03208442553ef46f Mon Sep 17 00:00:00 2001 From: Alyn James Date: Sun, 28 Dec 2025 17:59:11 +0000 Subject: [PATCH 04/64] Initial CI jobs --- .github/workflows/ci.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 99343d6..7a7979c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -63,4 +63,5 @@ jobs: cmake --build build-tests ./build-tests/h5testrunner ./build-tests/h5testrunner_mpi - mpirun --allow-run-as-root -np 2 ./build-tests/h5testrunner_mpi + mpirun --allow-run-as-root --oversubscribe \ + -np 2 ./build-tests/h5testrunner_mpi From 39385c280142ea46356a1cc91951432653cf9ebc Mon Sep 17 00:00:00 2001 From: Alyn James Date: Sun, 28 Dec 2025 18:11:52 +0000 Subject: [PATCH 05/64] Intel CI jobs --- .github/workflows/ci.yml | 51 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7a7979c..5bf7b23 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -65,3 +65,54 @@ jobs: ./build-tests/h5testrunner_mpi mpirun --allow-run-as-root --oversubscribe \ -np 2 ./build-tests/h5testrunner_mpi + + build_serial_HDF5_with_intel: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + + - name: Install system dependencies + run: | + sudo apt-get update + sudo apt-get install -y \ + cmake \ + libhdf5-dev \ + libhdf5-fortran-102 \ + wget \ + gpg + + - name: Install Intel oneAPI Fortran compilers + run: | + wget -qO- https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB \ + | gpg --dearmor \ + | sudo tee /usr/share/keyrings/intel-oneapi.gpg > /dev/null + + echo "deb [signed-by=/usr/share/keyrings/intel-oneapi.gpg] \ + https://apt.repos.intel.com/oneapi all main" \ + | sudo tee /etc/apt/sources.list.d/intel-oneapi.list + + sudo apt-get update + sudo apt-get install -y intel-oneapi-compiler-fortran + + - name: Build and run tests with ifort + shell: bash + run: | + source /opt/intel/oneapi/setvars.sh + ifort --version + + cmake -S ./test/. -B build-tests-ifort \ + -DCMAKE_Fortran_COMPILER=ifort + cmake --build build-tests-ifort + ./build-tests-ifort/h5testrunner + + - name: Build and run tests with ifx + shell: bash + run: | + source /opt/intel/oneapi/setvars.sh + ifx --version + + cmake -S ./test/. -B build-tests-ifx \ + -DCMAKE_Fortran_COMPILER=ifx + cmake --build build-tests-ifx + ./build-tests-ifx/h5testrunner From dc2e984e3e66ee5db2766dd3bdcc1f78759a43c9 Mon Sep 17 00:00:00 2001 From: Alyn James Date: Sun, 28 Dec 2025 18:20:17 +0000 Subject: [PATCH 06/64] Intel CI jobs --- .github/workflows/ci.yml | 140 +++++++++++++++++++++++++++++++++++++-- 1 file changed, 133 insertions(+), 7 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5bf7b23..8b884eb 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -66,7 +66,7 @@ jobs: mpirun --allow-run-as-root --oversubscribe \ -np 2 ./build-tests/h5testrunner_mpi - build_serial_HDF5_with_intel: + build_serial_HDF5_with_ifort: runs-on: ubuntu-latest steps: @@ -82,18 +82,21 @@ jobs: wget \ gpg - - name: Install Intel oneAPI Fortran compilers + - name: Install Intel oneAPI 2022.2.0 compilers run: | wget -qO- https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB \ | gpg --dearmor \ - | sudo tee /usr/share/keyrings/intel-oneapi.gpg > /dev/null + | sudo tee /usr/share/keyrings/intel-oneapi-2022.gpg > /dev/null - echo "deb [signed-by=/usr/share/keyrings/intel-oneapi.gpg] \ - https://apt.repos.intel.com/oneapi all main" \ - | sudo tee /etc/apt/sources.list.d/intel-oneapi.list + echo "deb [signed-by=/usr/share/keyrings/intel-oneapi-2022.gpg] https://apt.repos.intel.com/oneapi all main" \ + | sudo tee /etc/apt/sources.list.d/intel-oneapi-2022.list sudo apt-get update - sudo apt-get install -y intel-oneapi-compiler-fortran + + sudo apt-get install -y \ + intel-oneapi-compiler-fortran-2022.2.0 \ + intel-oneapi-mpi-2022.2.0 \ + intel-oneapi-common-vars - name: Build and run tests with ifort shell: bash @@ -106,6 +109,84 @@ jobs: cmake --build build-tests-ifort ./build-tests-ifort/h5testrunner + + build_parallel_HDF5_with_ifort: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + + - name: Install system dependencies + run: | + sudo apt-get update + sudo apt-get install -y \ + cmake \ + libopenmpi-dev \ + libhdf5-openmpi-dev \ + wget \ + gpg + + - name: Install Intel oneAPI 2022.2.0 compilers + run: | + wget -qO- https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB \ + | gpg --dearmor \ + | sudo tee /usr/share/keyrings/intel-oneapi-2022.gpg > /dev/null + + echo "deb [signed-by=/usr/share/keyrings/intel-oneapi-2022.gpg] https://apt.repos.intel.com/oneapi all main" \ + | sudo tee /etc/apt/sources.list.d/intel-oneapi-2022.list + + sudo apt-get update + + sudo apt-get install -y \ + intel-oneapi-compiler-fortran-2022.2.0 \ + intel-oneapi-mpi-2022.2.0 \ + intel-oneapi-common-vars + + - name: Build and run MPI tests with ifort + shell: bash + run: | + source /opt/intel/oneapi/setvars.sh + ifort --version + mpif90 --version + + cmake -S ./test/. -B build-tests-ifort-mpi \ + -DCMAKE_Fortran_COMPILER=mpif90 \ + -DMPI_VERSION=ON + cmake --build build-tests-ifort-mpi + + mpirun --allow-run-as-root --oversubscribe \ + -np 2 ./build-tests-ifort-mpi/h5testrunner_mpi + + + build_serial_HDF5_with_ifx: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + + - name: Install system dependencies + run: | + sudo apt-get update + sudo apt-get install -y \ + cmake \ + libhdf5-dev \ + libhdf5-fortran-102 \ + wget \ + gpg + + - name: Install Latest Intel oneAPI Fortran compilers + run: | + wget -qO- https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB \ + | gpg --dearmor \ + | sudo tee /usr/share/keyrings/intel-oneapi.gpg > /dev/null + + echo "deb [signed-by=/usr/share/keyrings/intel-oneapi.gpg] \ + https://apt.repos.intel.com/oneapi all main" \ + | sudo tee /etc/apt/sources.list.d/intel-oneapi.list + + sudo apt-get update + sudo apt-get install -y intel-oneapi-compiler-fortran + - name: Build and run tests with ifx shell: bash run: | @@ -116,3 +197,48 @@ jobs: -DCMAKE_Fortran_COMPILER=ifx cmake --build build-tests-ifx ./build-tests-ifx/h5testrunner + + + build_parallel_HDF5_with_ifx: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + + - name: Install system dependencies + run: | + sudo apt-get update + sudo apt-get install -y \ + cmake \ + libopenmpi-dev \ + libhdf5-openmpi-dev \ + wget \ + gpg + + - name: Install Latest Intel oneAPI Fortran compilers + run: | + wget -qO- https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB \ + | gpg --dearmor \ + | sudo tee /usr/share/keyrings/intel-oneapi.gpg > /dev/null + + echo "deb [signed-by=/usr/share/keyrings/intel-oneapi.gpg] \ + https://apt.repos.intel.com/oneapi all main" \ + | sudo tee /etc/apt/sources.list.d/intel-oneapi.list + + sudo apt-get update + sudo apt-get install -y intel-oneapi-compiler-fortran + + - name: Build and run MPI tests with ifx + shell: bash + run: | + source /opt/intel/oneapi/setvars.sh + ifx --version + + cmake -S ./test/. -B build-tests-ifx-mpi \ + -DCMAKE_Fortran_COMPILER=mpif90 \ + -DMPI_VERSION=ON + cmake --build build-tests-ifx-mpi + + mpirun --allow-run-as-root --oversubscribe \ + -np 2 ./build-tests-ifx-mpi/h5testrunner_mpi + \ No newline at end of file From 27ee061c1ec7efeb075a6232aa6c510252f68981 Mon Sep 17 00:00:00 2001 From: Alyn James Date: Sun, 28 Dec 2025 18:26:24 +0000 Subject: [PATCH 07/64] Intel CI jobs + ifx cmake. --- .github/workflows/ci.yml | 10 ++++------ test/CMakeLists.txt | 23 ++++++++++++++++++++++- 2 files changed, 26 insertions(+), 7 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8b884eb..dfa413d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -93,10 +93,9 @@ jobs: sudo apt-get update + # install the HPC toolkit at version 2022.2.0 sudo apt-get install -y \ - intel-oneapi-compiler-fortran-2022.2.0 \ - intel-oneapi-mpi-2022.2.0 \ - intel-oneapi-common-vars + intel-hpckit=2022.2.0-* - name: Build and run tests with ifort shell: bash @@ -137,10 +136,9 @@ jobs: sudo apt-get update + # install the HPC toolkit at version 2022.2.0 sudo apt-get install -y \ - intel-oneapi-compiler-fortran-2022.2.0 \ - intel-oneapi-mpi-2022.2.0 \ - intel-oneapi-common-vars + intel-hpckit=2022.2.0-* - name: Build and run MPI tests with ifort shell: bash diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 773b45d..cc13ad3 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -32,7 +32,28 @@ set(SOURCE_FILES # Create the executable target first (common to both compilers) add_executable(${Executable} ${SOURCE_FILES}) -# Handle Intel Fortran +# Handle Intel Fortran (ifx) +if(CMAKE_Fortran_COMPILER_ID STREQUAL "IntelLLVM") + # Check minimum version + if(CMAKE_Fortran_COMPILER_VERSION VERSION_LESS 2022.0) + message(FATAL_ERROR "Intel Fortran LLVM (ifx) version 2022.0 or later is required.") + endif() + + # Set compilation flags + if(USE_DEBUG_FLAGS) + message(STATUS "IntelLLVM Fortran debug flags are enabled.") + set(COMPILER_FLAGS "-fopenmp -cpp -g -check all -traceback -Wall -fstack-protector -O0") + else() + set(COMPILER_FLAGS "-fopenmp -O3 -cpp") + endif() + + # Apply flags to target + set_property(TARGET ${Executable} PROPERTY COMPILE_OPTIONS ${COMPILER_FLAGS}) + + # Link OpenMP library explicitly + set(OPENMP_LIB "-liomp5") + +# Handle older Intel Fortran (ifort) if(CMAKE_Fortran_COMPILER_ID STREQUAL "Intel") # Check minimum version if(CMAKE_Fortran_COMPILER_VERSION VERSION_LESS 18.0) From f799f8c7fe8bc2411679753405a74ab55341574b Mon Sep 17 00:00:00 2001 From: Alyn James Date: Sun, 28 Dec 2025 18:28:50 +0000 Subject: [PATCH 08/64] Intel CI jobs + ifx cmake. --- test/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index cc13ad3..d7ba1d3 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -54,7 +54,7 @@ if(CMAKE_Fortran_COMPILER_ID STREQUAL "IntelLLVM") set(OPENMP_LIB "-liomp5") # Handle older Intel Fortran (ifort) -if(CMAKE_Fortran_COMPILER_ID STREQUAL "Intel") +elseif(CMAKE_Fortran_COMPILER_ID STREQUAL "Intel") # Check minimum version if(CMAKE_Fortran_COMPILER_VERSION VERSION_LESS 18.0) message(FATAL_ERROR "Intel Fortran Compiler version 18.0 or later is required.") From b8ab7a32e945e61adbf973e6cd1aa414dcd043e0 Mon Sep 17 00:00:00 2001 From: Alyn James Date: Mon, 29 Dec 2025 10:56:34 +0000 Subject: [PATCH 09/64] Intel CI jobs + ifx cmake. --- .github/workflows/ci.yml | 110 ++++++++++++++++++++++----------------- test/CMakeLists.txt | 8 +-- 2 files changed, 67 insertions(+), 51 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index dfa413d..d249ce9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -68,6 +68,8 @@ jobs: build_serial_HDF5_with_ifort: runs-on: ubuntu-latest + container: + image: intel/oneapi-hpckit:2022.2.0 steps: - uses: actions/checkout@v4 @@ -77,25 +79,25 @@ jobs: sudo apt-get update sudo apt-get install -y \ cmake \ - libhdf5-dev \ - libhdf5-fortran-102 \ wget \ gpg - - name: Install Intel oneAPI 2022.2.0 compilers + - name: Install serial HDF5 1.14.1 with iFort run: | - wget -qO- https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB \ - | gpg --dearmor \ - | sudo tee /usr/share/keyrings/intel-oneapi-2022.gpg > /dev/null - echo "deb [signed-by=/usr/share/keyrings/intel-oneapi-2022.gpg] https://apt.repos.intel.com/oneapi all main" \ - | sudo tee /etc/apt/sources.list.d/intel-oneapi-2022.list + # download HDF5 source + wget https://www.hdfgroup.org/package/hdf5-1-14-1-source-tar-gz/?wpdmdl=14584 -O hdf5-1.14.1.tar.gz + tar xzf hdf5-1.14.1.tar.gz + cd hdf5-1.14.1 - sudo apt-get update + # configure with ifx + cmake -S . -B build-ifort \ + -DCMAKE_Fortran_COMPILER=ifort \ + -DHDF5_BUILD_FORTRAN=ON \ + -DCMAKE_INSTALL_PREFIX=$HOME/hdf5-ifort - # install the HPC toolkit at version 2022.2.0 - sudo apt-get install -y \ - intel-hpckit=2022.2.0-* + cmake --build build-ifort -j + cmake --install build-ifort - name: Build and run tests with ifort shell: bash @@ -111,6 +113,8 @@ jobs: build_parallel_HDF5_with_ifort: runs-on: ubuntu-latest + container: + image: intel/oneapi-hpckit:2022.2.0 steps: - uses: actions/checkout@v4 @@ -121,26 +125,28 @@ jobs: sudo apt-get install -y \ cmake \ libopenmpi-dev \ - libhdf5-openmpi-dev \ wget \ gpg - - name: Install Intel oneAPI 2022.2.0 compilers + - name: Install parallel HDF5 1.14.1 with iFort run: | - wget -qO- https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB \ - | gpg --dearmor \ - | sudo tee /usr/share/keyrings/intel-oneapi-2022.gpg > /dev/null - echo "deb [signed-by=/usr/share/keyrings/intel-oneapi-2022.gpg] https://apt.repos.intel.com/oneapi all main" \ - | sudo tee /etc/apt/sources.list.d/intel-oneapi-2022.list + # download HDF5 source + wget https://www.hdfgroup.org/package/hdf5-1-14-1-source-tar-gz/?wpdmdl=14584 -O hdf5-1.14.1.tar.gz + tar xzf hdf5-1.14.1.tar.gz + cd hdf5-1.14.1 - sudo apt-get update + # configure with ifx + cmake -S . -B build-ifort \ + -DCMAKE_Fortran_COMPILER=ifort \ + -DBUILD_SHARED_LIBS=ON \ + -DHDF5_BUILD_FORTRAN=ON \ + -DCMAKE_INSTALL_PREFIX=$HOME/hdf5-ifort - # install the HPC toolkit at version 2022.2.0 - sudo apt-get install -y \ - intel-hpckit=2022.2.0-* + cmake --build build-ifort -j + cmake --install build-ifort - - name: Build and run MPI tests with ifort + - name: Build and run MPI tests with iFort shell: bash run: | source /opt/intel/oneapi/setvars.sh @@ -158,6 +164,8 @@ jobs: build_serial_HDF5_with_ifx: runs-on: ubuntu-latest + container: + image: intel/oneapi-hpckit:latest steps: - uses: actions/checkout@v4 @@ -166,24 +174,27 @@ jobs: run: | sudo apt-get update sudo apt-get install -y \ - cmake \ + cmake make gcc g++ \ libhdf5-dev \ - libhdf5-fortran-102 \ wget \ gpg - - name: Install Latest Intel oneAPI Fortran compilers + - name: Install serial HDF5 1.14.1 with IFX run: | - wget -qO- https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB \ - | gpg --dearmor \ - | sudo tee /usr/share/keyrings/intel-oneapi.gpg > /dev/null - echo "deb [signed-by=/usr/share/keyrings/intel-oneapi.gpg] \ - https://apt.repos.intel.com/oneapi all main" \ - | sudo tee /etc/apt/sources.list.d/intel-oneapi.list + # download HDF5 source + wget https://www.hdfgroup.org/package/hdf5-1-14-1-source-tar-gz/?wpdmdl=14584 -O hdf5-1.14.1.tar.gz + tar xzf hdf5-1.14.1.tar.gz + cd hdf5-1.14.1 - sudo apt-get update - sudo apt-get install -y intel-oneapi-compiler-fortran + # configure with ifx + cmake -S . -B build-ifx \ + -DCMAKE_Fortran_COMPILER=ifx \ + -DHDF5_BUILD_FORTRAN=ON \ + -DCMAKE_INSTALL_PREFIX=$HOME/hdf5-ifx + + cmake --build build-ifx -j + cmake --install build-ifx - name: Build and run tests with ifx shell: bash @@ -199,6 +210,8 @@ jobs: build_parallel_HDF5_with_ifx: runs-on: ubuntu-latest + container: + image: intel/oneapi-hpckit:latest steps: - uses: actions/checkout@v4 @@ -207,24 +220,27 @@ jobs: run: | sudo apt-get update sudo apt-get install -y \ - cmake \ - libopenmpi-dev \ - libhdf5-openmpi-dev \ + cmake make gcc g++ \ wget \ gpg - - name: Install Latest Intel oneAPI Fortran compilers + - name: Install parallel HDF5 1.14.1 with IFX run: | - wget -qO- https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB \ - | gpg --dearmor \ - | sudo tee /usr/share/keyrings/intel-oneapi.gpg > /dev/null - echo "deb [signed-by=/usr/share/keyrings/intel-oneapi.gpg] \ - https://apt.repos.intel.com/oneapi all main" \ - | sudo tee /etc/apt/sources.list.d/intel-oneapi.list + # download HDF5 source + wget https://www.hdfgroup.org/package/hdf5-1-14-1-source-tar-gz/?wpdmdl=14584 -O hdf5-1.14.1.tar.gz + tar xzf hdf5-1.14.1.tar.gz + cd hdf5-1.14.1 - sudo apt-get update - sudo apt-get install -y intel-oneapi-compiler-fortran + # configure with ifx + cmake -S . -B build-ifx \ + -DCMAKE_Fortran_COMPILER=ifx \ + -DBUILD_SHARED_LIBS=ON \ + -DHDF5_BUILD_FORTRAN=ON \ + -DCMAKE_INSTALL_PREFIX=$HOME/hdf5-ifx + + cmake --build build-ifx -j + cmake --install build-ifx - name: Build and run MPI tests with ifx shell: bash diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index d7ba1d3..3cb5a46 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -42,9 +42,9 @@ if(CMAKE_Fortran_COMPILER_ID STREQUAL "IntelLLVM") # Set compilation flags if(USE_DEBUG_FLAGS) message(STATUS "IntelLLVM Fortran debug flags are enabled.") - set(COMPILER_FLAGS "-fopenmp -cpp -g -check all -traceback -Wall -fstack-protector -O0") + set(COMPILER_FLAGS "-fopenmp -fpp -g -check all -traceback -Wall -fstack-protector -O0") else() - set(COMPILER_FLAGS "-fopenmp -O3 -cpp") + set(COMPILER_FLAGS "-fopenmp -O3 -fpp") endif() # Apply flags to target @@ -63,9 +63,9 @@ elseif(CMAKE_Fortran_COMPILER_ID STREQUAL "Intel") # Set compilation flags if(USE_DEBUG_FLAGS) message(STATUS "Intel Fortran debug flags are enabled.") - set(COMPILER_FLAGS "-qopenmp -cpp -g -assume realloc_lhs -check all -traceback -warn all -fstack-protector -assume protect_parens -O0") + set(COMPILER_FLAGS "-qopenmp -fpp -g -assume realloc_lhs -check all -traceback -warn all -fstack-protector -assume protect_parens -O0") else() - set(COMPILER_FLAGS "-qopenmp -O3 -cpp") + set(COMPILER_FLAGS "-qopenmp -O3 -fpp") endif() # Apply flags to target From 6f52d215fd4a78e4780a73fce45fc7fd4741438f Mon Sep 17 00:00:00 2001 From: Alyn James Date: Mon, 29 Dec 2025 11:13:19 +0000 Subject: [PATCH 10/64] Intel CI jobs + ifx cmake. --- .github/workflows/ci.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d249ce9..3c8bd5b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -69,7 +69,7 @@ jobs: build_serial_HDF5_with_ifort: runs-on: ubuntu-latest container: - image: intel/oneapi-hpckit:2022.2.0 + image: intel/oneapi-hpckit:2022.2-devel-ubuntu18.04 steps: - uses: actions/checkout@v4 @@ -114,7 +114,7 @@ jobs: build_parallel_HDF5_with_ifort: runs-on: ubuntu-latest container: - image: intel/oneapi-hpckit:2022.2.0 + image: intel/oneapi-hpckit:2022.2-devel-ubuntu18.04 steps: - uses: actions/checkout@v4 @@ -165,7 +165,7 @@ jobs: build_serial_HDF5_with_ifx: runs-on: ubuntu-latest container: - image: intel/oneapi-hpckit:latest + image: intel/fortran-essentials:latest steps: - uses: actions/checkout@v4 @@ -211,7 +211,7 @@ jobs: build_parallel_HDF5_with_ifx: runs-on: ubuntu-latest container: - image: intel/oneapi-hpckit:latest + image: intel/fortran-essentials:latest steps: - uses: actions/checkout@v4 @@ -220,7 +220,7 @@ jobs: run: | sudo apt-get update sudo apt-get install -y \ - cmake make gcc g++ \ + cmake make gcc g++ intel-oneapi-mpi-runtime \ wget \ gpg From 5cd7a63dd9211f4dad51691e87e23255d3ee0ae8 Mon Sep 17 00:00:00 2001 From: Alyn James Date: Mon, 29 Dec 2025 11:17:02 +0000 Subject: [PATCH 11/64] Intel CI jobs + ifx cmake. --- .github/workflows/ci.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3c8bd5b..5461df5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -172,8 +172,8 @@ jobs: - name: Install system dependencies run: | - sudo apt-get update - sudo apt-get install -y \ + apt-get update + apt-get install -y \ cmake make gcc g++ \ libhdf5-dev \ wget \ @@ -218,8 +218,8 @@ jobs: - name: Install system dependencies run: | - sudo apt-get update - sudo apt-get install -y \ + apt-get update + apt-get install -y \ cmake make gcc g++ intel-oneapi-mpi-runtime \ wget \ gpg From e1b54bddef10357b9d3c964cbf3394cd287cba5e Mon Sep 17 00:00:00 2001 From: Alyn James Date: Mon, 29 Dec 2025 11:24:28 +0000 Subject: [PATCH 12/64] Intel CI jobs + ifx cmake. --- .github/workflows/ci.yml | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5461df5..a75ad3f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -132,9 +132,10 @@ jobs: run: | # download HDF5 source - wget https://www.hdfgroup.org/package/hdf5-1-14-1-source-tar-gz/?wpdmdl=14584 -O hdf5-1.14.1.tar.gz - tar xzf hdf5-1.14.1.tar.gz - cd hdf5-1.14.1 + HDF5_VER=1.14.1 + wget -O hdf5-${HDF5_VER}.tar.gz https://support.hdfgroup.org/ftp/HDF5/releases/hdf5-${HDF5_VER:0:4}/hdf5-${HDF5_VER}/src/hdf5-${HDF5_VER}.tar.gz + tar -xzf hdf5-${HDF5_VER}.tar.gz + cd hdf5-${HDF5_VER} # configure with ifx cmake -S . -B build-ifort \ @@ -183,9 +184,10 @@ jobs: run: | # download HDF5 source - wget https://www.hdfgroup.org/package/hdf5-1-14-1-source-tar-gz/?wpdmdl=14584 -O hdf5-1.14.1.tar.gz - tar xzf hdf5-1.14.1.tar.gz - cd hdf5-1.14.1 + HDF5_VER=1.14.1 + wget -O hdf5-${HDF5_VER}.tar.gz https://support.hdfgroup.org/ftp/HDF5/releases/hdf5-${HDF5_VER:0:4}/hdf5-${HDF5_VER}/src/hdf5-${HDF5_VER}.tar.gz + tar -xzf hdf5-${HDF5_VER}.tar.gz + cd hdf5-${HDF5_VER} # configure with ifx cmake -S . -B build-ifx \ From 9e17e6763fc2921e689f6f3300585a89e7162d7f Mon Sep 17 00:00:00 2001 From: Alyn James Date: Mon, 29 Dec 2025 11:30:57 +0000 Subject: [PATCH 13/64] Intel CI jobs + ifx cmake. --- .github/workflows/ci.yml | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a75ad3f..8a628cb 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -181,13 +181,13 @@ jobs: gpg - name: Install serial HDF5 1.14.1 with IFX + shell: bash run: | - - # download HDF5 source HDF5_VER=1.14.1 - wget -O hdf5-${HDF5_VER}.tar.gz https://support.hdfgroup.org/ftp/HDF5/releases/hdf5-${HDF5_VER:0:4}/hdf5-${HDF5_VER}/src/hdf5-${HDF5_VER}.tar.gz + HDF5_MAJOR=1.14 + wget -O hdf5-${HDF5_VER}.tar.gz \ + https://support.hdfgroup.org/ftp/HDF5/releases/hdf5-${HDF5_MAJOR}/hdf5-${HDF5_VER}/src/hdf5-${HDF5_VER}.tar.gz tar -xzf hdf5-${HDF5_VER}.tar.gz - cd hdf5-${HDF5_VER} # configure with ifx cmake -S . -B build-ifx \ @@ -227,12 +227,13 @@ jobs: gpg - name: Install parallel HDF5 1.14.1 with IFX + shell: bash run: | - - # download HDF5 source - wget https://www.hdfgroup.org/package/hdf5-1-14-1-source-tar-gz/?wpdmdl=14584 -O hdf5-1.14.1.tar.gz - tar xzf hdf5-1.14.1.tar.gz - cd hdf5-1.14.1 + HDF5_VER=1.14.1 + HDF5_MAJOR=1.14 + wget -O hdf5-${HDF5_VER}.tar.gz \ + https://support.hdfgroup.org/ftp/HDF5/releases/hdf5-${HDF5_MAJOR}/hdf5-${HDF5_VER}/src/hdf5-${HDF5_VER}.tar.gz + tar -xzf hdf5-${HDF5_VER}.tar.gz # configure with ifx cmake -S . -B build-ifx \ From 4e67a8d595faaa746d9d8e218a1755cf7553c216 Mon Sep 17 00:00:00 2001 From: Alyn James Date: Mon, 29 Dec 2025 11:39:19 +0000 Subject: [PATCH 14/64] Intel CI jobs + ifx cmake. --- .github/workflows/ci.yml | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8a628cb..0c4469f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -133,7 +133,8 @@ jobs: # download HDF5 source HDF5_VER=1.14.1 - wget -O hdf5-${HDF5_VER}.tar.gz https://support.hdfgroup.org/ftp/HDF5/releases/hdf5-${HDF5_VER:0:4}/hdf5-${HDF5_VER}/src/hdf5-${HDF5_VER}.tar.gz + wget \ + https://support.hdfgroup.org/ftp/HDF5/releases/hdf5-${HDF5_VER}/src/hdf5-${HDF5_VER}.tar.gz tar -xzf hdf5-${HDF5_VER}.tar.gz cd hdf5-${HDF5_VER} @@ -183,11 +184,9 @@ jobs: - name: Install serial HDF5 1.14.1 with IFX shell: bash run: | - HDF5_VER=1.14.1 - HDF5_MAJOR=1.14 - wget -O hdf5-${HDF5_VER}.tar.gz \ - https://support.hdfgroup.org/ftp/HDF5/releases/hdf5-${HDF5_MAJOR}/hdf5-${HDF5_VER}/src/hdf5-${HDF5_VER}.tar.gz - tar -xzf hdf5-${HDF5_VER}.tar.gz + wget -O hdf5-1.14.6.tar.gz \ + https://sourceforge.net/projects/hdf5.mirror/files/hdf5_1.14.6/hdf5-1.14.6.tar.gz/download + tar -xzf hdf5-1.14.6.tar.gz # configure with ifx cmake -S . -B build-ifx \ @@ -229,11 +228,9 @@ jobs: - name: Install parallel HDF5 1.14.1 with IFX shell: bash run: | - HDF5_VER=1.14.1 - HDF5_MAJOR=1.14 - wget -O hdf5-${HDF5_VER}.tar.gz \ - https://support.hdfgroup.org/ftp/HDF5/releases/hdf5-${HDF5_MAJOR}/hdf5-${HDF5_VER}/src/hdf5-${HDF5_VER}.tar.gz - tar -xzf hdf5-${HDF5_VER}.tar.gz + wget -O hdf5-1.14.6.tar.gz \ + https://sourceforge.net/projects/hdf5.mirror/files/hdf5_1.14.6/hdf5-1.14.6.tar.gz/download + tar -xzf hdf5-1.14.6.tar.gz # configure with ifx cmake -S . -B build-ifx \ From 60d43a5d69a11ef1faa9421d265256dc13c3961f Mon Sep 17 00:00:00 2001 From: Alyn James Date: Mon, 29 Dec 2025 11:46:08 +0000 Subject: [PATCH 15/64] Intel CI jobs + ifx cmake. --- .github/workflows/ci.yml | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0c4469f..bcbd010 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -187,15 +187,16 @@ jobs: wget -O hdf5-1.14.6.tar.gz \ https://sourceforge.net/projects/hdf5.mirror/files/hdf5_1.14.6/hdf5-1.14.6.tar.gz/download tar -xzf hdf5-1.14.6.tar.gz + mkdir -p build-hdf5-ifx # configure with ifx - cmake -S . -B build-ifx \ + cmake -S ./hdf5-1.14.6 -B build-hdf5-ifx \ -DCMAKE_Fortran_COMPILER=ifx \ -DHDF5_BUILD_FORTRAN=ON \ -DCMAKE_INSTALL_PREFIX=$HOME/hdf5-ifx - cmake --build build-ifx -j - cmake --install build-ifx + cmake --build build-hdf5-ifx -j + cmake --install build-hdf5-ifx - name: Build and run tests with ifx shell: bash @@ -231,16 +232,17 @@ jobs: wget -O hdf5-1.14.6.tar.gz \ https://sourceforge.net/projects/hdf5.mirror/files/hdf5_1.14.6/hdf5-1.14.6.tar.gz/download tar -xzf hdf5-1.14.6.tar.gz + mkdir -p build-hdf5-ifx # configure with ifx - cmake -S . -B build-ifx \ + cmake -S ./hdf5-1.14.6 -B build-hdf5-ifx \ -DCMAKE_Fortran_COMPILER=ifx \ -DBUILD_SHARED_LIBS=ON \ -DHDF5_BUILD_FORTRAN=ON \ -DCMAKE_INSTALL_PREFIX=$HOME/hdf5-ifx - cmake --build build-ifx -j - cmake --install build-ifx + cmake --build build-hdf5-ifx -j + cmake --install build-hdf5-ifx - name: Build and run MPI tests with ifx shell: bash From 39342ccc7b1c9a1bd7edbe1f29f3f9b84cda0b01 Mon Sep 17 00:00:00 2001 From: Alyn James Date: Mon, 29 Dec 2025 11:53:55 +0000 Subject: [PATCH 16/64] Intel CI jobs + ifx cmake. --- .github/workflows/ci.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index bcbd010..9171992 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -193,7 +193,8 @@ jobs: cmake -S ./hdf5-1.14.6 -B build-hdf5-ifx \ -DCMAKE_Fortran_COMPILER=ifx \ -DHDF5_BUILD_FORTRAN=ON \ - -DCMAKE_INSTALL_PREFIX=$HOME/hdf5-ifx + -DCMAKE_INSTALL_PREFIX=$HOME/hdf5-ifx \ + -DCMAKE_POSITION_INDEPENDENT_CODE=ON cmake --build build-hdf5-ifx -j cmake --install build-hdf5-ifx @@ -205,6 +206,7 @@ jobs: ifx --version cmake -S ./test/. -B build-tests-ifx \ + -HDF5_DIR=$HOME/hdf5-ifx/lib/cmake/hdf5 \ -DCMAKE_Fortran_COMPILER=ifx cmake --build build-tests-ifx ./build-tests-ifx/h5testrunner @@ -239,7 +241,8 @@ jobs: -DCMAKE_Fortran_COMPILER=ifx \ -DBUILD_SHARED_LIBS=ON \ -DHDF5_BUILD_FORTRAN=ON \ - -DCMAKE_INSTALL_PREFIX=$HOME/hdf5-ifx + -DCMAKE_INSTALL_PREFIX=$HOME/hdf5-ifx \ + -DCMAKE_POSITION_INDEPENDENT_CODE=ON cmake --build build-hdf5-ifx -j cmake --install build-hdf5-ifx @@ -252,6 +255,7 @@ jobs: cmake -S ./test/. -B build-tests-ifx-mpi \ -DCMAKE_Fortran_COMPILER=mpif90 \ + -HDF5_DIR=$HOME/hdf5-ifx/lib/cmake/hdf5 \ -DMPI_VERSION=ON cmake --build build-tests-ifx-mpi From ac600cec8c11e8538c8344521fdabbf19f6d6958 Mon Sep 17 00:00:00 2001 From: Alyn James Date: Mon, 29 Dec 2025 11:57:37 +0000 Subject: [PATCH 17/64] Intel CI jobs + ifx cmake. --- .github/workflows/ci.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9171992..8f6e4ef 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -194,6 +194,7 @@ jobs: -DCMAKE_Fortran_COMPILER=ifx \ -DHDF5_BUILD_FORTRAN=ON \ -DCMAKE_INSTALL_PREFIX=$HOME/hdf5-ifx \ + -DCMAKE_Fortran_FLAGS="-fPIE" \ -DCMAKE_POSITION_INDEPENDENT_CODE=ON cmake --build build-hdf5-ifx -j @@ -242,6 +243,7 @@ jobs: -DBUILD_SHARED_LIBS=ON \ -DHDF5_BUILD_FORTRAN=ON \ -DCMAKE_INSTALL_PREFIX=$HOME/hdf5-ifx \ + -DCMAKE_Fortran_FLAGS="-fPIE" \ -DCMAKE_POSITION_INDEPENDENT_CODE=ON cmake --build build-hdf5-ifx -j From ba2d08cd3547143e4285845c6135e7fa11ac01cc Mon Sep 17 00:00:00 2001 From: Alyn James Date: Mon, 29 Dec 2025 12:14:15 +0000 Subject: [PATCH 18/64] Intel CI jobs + ifx cmake. --- .github/workflows/ci.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8f6e4ef..52dc29f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -203,7 +203,6 @@ jobs: - name: Build and run tests with ifx shell: bash run: | - source /opt/intel/oneapi/setvars.sh ifx --version cmake -S ./test/. -B build-tests-ifx \ @@ -225,7 +224,7 @@ jobs: run: | apt-get update apt-get install -y \ - cmake make gcc g++ intel-oneapi-mpi-runtime \ + cmake make gcc g++ \ wget \ gpg @@ -252,7 +251,6 @@ jobs: - name: Build and run MPI tests with ifx shell: bash run: | - source /opt/intel/oneapi/setvars.sh ifx --version cmake -S ./test/. -B build-tests-ifx-mpi \ From 782dd516abadbf8e656295e6bbdd9e7fb61bc5ed Mon Sep 17 00:00:00 2001 From: Alyn James Date: Mon, 29 Dec 2025 12:25:00 +0000 Subject: [PATCH 19/64] Intel CI jobs + ifx cmake. --- .github/workflows/ci.yml | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 52dc29f..14cfee5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -206,7 +206,7 @@ jobs: ifx --version cmake -S ./test/. -B build-tests-ifx \ - -HDF5_DIR=$HOME/hdf5-ifx/lib/cmake/hdf5 \ + -DHDF5_DIR=$HOME/hdf5-ifx/lib/cmake/hdf5 \ -DCMAKE_Fortran_COMPILER=ifx cmake --build build-tests-ifx ./build-tests-ifx/h5testrunner @@ -238,27 +238,29 @@ jobs: # configure with ifx cmake -S ./hdf5-1.14.6 -B build-hdf5-ifx \ - -DCMAKE_Fortran_COMPILER=ifx \ + -DCMAKE_Fortran_COMPILER=mpiifx \ -DBUILD_SHARED_LIBS=ON \ -DHDF5_BUILD_FORTRAN=ON \ - -DCMAKE_INSTALL_PREFIX=$HOME/hdf5-ifx \ + -DCMAKE_INSTALL_PREFIX=$HOME/hdf5-mpiifx \ -DCMAKE_Fortran_FLAGS="-fPIE" \ -DCMAKE_POSITION_INDEPENDENT_CODE=ON - cmake --build build-hdf5-ifx -j - cmake --install build-hdf5-ifx + cmake --build build-hdf5-mpiifx -j + cmake --install build-hdf5-mpiifx - - name: Build and run MPI tests with ifx + - name: Build and run MPI tests with mpiifx shell: bash run: | - ifx --version + mpiifx --version - cmake -S ./test/. -B build-tests-ifx-mpi \ - -DCMAKE_Fortran_COMPILER=mpif90 \ - -HDF5_DIR=$HOME/hdf5-ifx/lib/cmake/hdf5 \ + cmake -S ./test/. -B build-tests-mpiifx \ + -DCMAKE_Fortran_COMPILER=mpiifx \ + -DHDF5_DIR=$HOME/hdf5-mpiifx/lib/cmake/hdf5 \ -DMPI_VERSION=ON - cmake --build build-tests-ifx-mpi + cmake --build build-tests-mpiifx + ./build-tests-mpiifx/h5testrunner + ./build-tests-mpiifx/h5testrunner_mpi mpirun --allow-run-as-root --oversubscribe \ - -np 2 ./build-tests-ifx-mpi/h5testrunner_mpi + -np 2 ./build-tests-mpiifx/h5testrunner_mpi \ No newline at end of file From 199cd9f72742f5cfc6d4f206e74ccec9e30eadb2 Mon Sep 17 00:00:00 2001 From: Alyn James Date: Mon, 29 Dec 2025 12:36:06 +0000 Subject: [PATCH 20/64] Intel CI jobs + ifx cmake. --- .github/workflows/ci.yml | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 14cfee5..97cc9d8 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -82,13 +82,13 @@ jobs: wget \ gpg - - name: Install serial HDF5 1.14.1 with iFort + - name: Install serial HDF5 1.14.6 with iFort run: | # download HDF5 source - wget https://www.hdfgroup.org/package/hdf5-1-14-1-source-tar-gz/?wpdmdl=14584 -O hdf5-1.14.1.tar.gz - tar xzf hdf5-1.14.1.tar.gz - cd hdf5-1.14.1 + wget https://www.hdfgroup.org/package/hdf5-1-14-1-source-tar-gz/?wpdmdl=14584 -O hdf5-1.14.6.tar.gz + tar xzf hdf5-1.14.6.tar.gz + cd hdf5-1.14.6 # configure with ifx cmake -S . -B build-ifort \ @@ -128,11 +128,11 @@ jobs: wget \ gpg - - name: Install parallel HDF5 1.14.1 with iFort + - name: Install parallel HDF5 1.14.6 with iFort run: | # download HDF5 source - HDF5_VER=1.14.1 + HDF5_VER=1.14.6 wget \ https://support.hdfgroup.org/ftp/HDF5/releases/hdf5-${HDF5_VER}/src/hdf5-${HDF5_VER}.tar.gz tar -xzf hdf5-${HDF5_VER}.tar.gz @@ -181,7 +181,7 @@ jobs: wget \ gpg - - name: Install serial HDF5 1.14.1 with IFX + - name: Install serial HDF5 1.14.6 with IFX shell: bash run: | wget -O hdf5-1.14.6.tar.gz \ @@ -206,7 +206,7 @@ jobs: ifx --version cmake -S ./test/. -B build-tests-ifx \ - -DHDF5_DIR=$HOME/hdf5-ifx/lib/cmake/hdf5 \ + -DCMAKE_PREFIX_PATH=$HOME/hdf5-ifx \ -DCMAKE_Fortran_COMPILER=ifx cmake --build build-tests-ifx ./build-tests-ifx/h5testrunner @@ -228,7 +228,7 @@ jobs: wget \ gpg - - name: Install parallel HDF5 1.14.1 with IFX + - name: Install parallel HDF5 1.14.6 with IFX shell: bash run: | wget -O hdf5-1.14.6.tar.gz \ @@ -255,7 +255,7 @@ jobs: cmake -S ./test/. -B build-tests-mpiifx \ -DCMAKE_Fortran_COMPILER=mpiifx \ - -DHDF5_DIR=$HOME/hdf5-mpiifx/lib/cmake/hdf5 \ + -DCMAKE_PREFIX_PATH=$HOME/hdf5-ifx \ -DMPI_VERSION=ON cmake --build build-tests-mpiifx From 8fa4974e722fe1e1954762f3ab5c7abcf48015aa Mon Sep 17 00:00:00 2001 From: Alyn James Date: Mon, 29 Dec 2025 12:48:15 +0000 Subject: [PATCH 21/64] Intel CI jobs + ifx cmake. --- .github/workflows/ci.yml | 97 ---------------------------------------- test/CMakeLists.txt | 4 +- 2 files changed, 2 insertions(+), 99 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 97cc9d8..2e39242 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -66,103 +66,6 @@ jobs: mpirun --allow-run-as-root --oversubscribe \ -np 2 ./build-tests/h5testrunner_mpi - build_serial_HDF5_with_ifort: - runs-on: ubuntu-latest - container: - image: intel/oneapi-hpckit:2022.2-devel-ubuntu18.04 - - steps: - - uses: actions/checkout@v4 - - - name: Install system dependencies - run: | - sudo apt-get update - sudo apt-get install -y \ - cmake \ - wget \ - gpg - - - name: Install serial HDF5 1.14.6 with iFort - run: | - - # download HDF5 source - wget https://www.hdfgroup.org/package/hdf5-1-14-1-source-tar-gz/?wpdmdl=14584 -O hdf5-1.14.6.tar.gz - tar xzf hdf5-1.14.6.tar.gz - cd hdf5-1.14.6 - - # configure with ifx - cmake -S . -B build-ifort \ - -DCMAKE_Fortran_COMPILER=ifort \ - -DHDF5_BUILD_FORTRAN=ON \ - -DCMAKE_INSTALL_PREFIX=$HOME/hdf5-ifort - - cmake --build build-ifort -j - cmake --install build-ifort - - - name: Build and run tests with ifort - shell: bash - run: | - source /opt/intel/oneapi/setvars.sh - ifort --version - - cmake -S ./test/. -B build-tests-ifort \ - -DCMAKE_Fortran_COMPILER=ifort - cmake --build build-tests-ifort - ./build-tests-ifort/h5testrunner - - - build_parallel_HDF5_with_ifort: - runs-on: ubuntu-latest - container: - image: intel/oneapi-hpckit:2022.2-devel-ubuntu18.04 - - steps: - - uses: actions/checkout@v4 - - - name: Install system dependencies - run: | - sudo apt-get update - sudo apt-get install -y \ - cmake \ - libopenmpi-dev \ - wget \ - gpg - - - name: Install parallel HDF5 1.14.6 with iFort - run: | - - # download HDF5 source - HDF5_VER=1.14.6 - wget \ - https://support.hdfgroup.org/ftp/HDF5/releases/hdf5-${HDF5_VER}/src/hdf5-${HDF5_VER}.tar.gz - tar -xzf hdf5-${HDF5_VER}.tar.gz - cd hdf5-${HDF5_VER} - - # configure with ifx - cmake -S . -B build-ifort \ - -DCMAKE_Fortran_COMPILER=ifort \ - -DBUILD_SHARED_LIBS=ON \ - -DHDF5_BUILD_FORTRAN=ON \ - -DCMAKE_INSTALL_PREFIX=$HOME/hdf5-ifort - - cmake --build build-ifort -j - cmake --install build-ifort - - - name: Build and run MPI tests with iFort - shell: bash - run: | - source /opt/intel/oneapi/setvars.sh - ifort --version - mpif90 --version - - cmake -S ./test/. -B build-tests-ifort-mpi \ - -DCMAKE_Fortran_COMPILER=mpif90 \ - -DMPI_VERSION=ON - cmake --build build-tests-ifort-mpi - - mpirun --allow-run-as-root --oversubscribe \ - -np 2 ./build-tests-ifort-mpi/h5testrunner_mpi - build_serial_HDF5_with_ifx: runs-on: ubuntu-latest diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 3cb5a46..c80b048 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -42,9 +42,9 @@ if(CMAKE_Fortran_COMPILER_ID STREQUAL "IntelLLVM") # Set compilation flags if(USE_DEBUG_FLAGS) message(STATUS "IntelLLVM Fortran debug flags are enabled.") - set(COMPILER_FLAGS "-fopenmp -fpp -g -check all -traceback -Wall -fstack-protector -O0") + set(COMPILER_FLAGS "-fpp -O3 -fopenmp -g -check all -traceback -Wall -fstack-protector -O0") else() - set(COMPILER_FLAGS "-fopenmp -O3 -fpp") + set(COMPILER_FLAGS "-fpp -O3 -fopenmp") endif() # Apply flags to target From 89ab93a64d8066be817b3026e9b49c23dd2a0ce3 Mon Sep 17 00:00:00 2001 From: Alyn James Date: Mon, 29 Dec 2025 12:55:05 +0000 Subject: [PATCH 22/64] Intel CI jobs + ifx cmake. --- .github/workflows/ci.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2e39242..3f79fb7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -144,6 +144,8 @@ jobs: -DCMAKE_Fortran_COMPILER=mpiifx \ -DBUILD_SHARED_LIBS=ON \ -DHDF5_BUILD_FORTRAN=ON \ + -DHDF5_ENABLE_ZLIB=OFF \ + -DHDF5_ENABLE_SZIP=OFF \ -DCMAKE_INSTALL_PREFIX=$HOME/hdf5-mpiifx \ -DCMAKE_Fortran_FLAGS="-fPIE" \ -DCMAKE_POSITION_INDEPENDENT_CODE=ON @@ -158,7 +160,7 @@ jobs: cmake -S ./test/. -B build-tests-mpiifx \ -DCMAKE_Fortran_COMPILER=mpiifx \ - -DCMAKE_PREFIX_PATH=$HOME/hdf5-ifx \ + -DCMAKE_PREFIX_PATH=$HOME/hdf5-mpiifx \ -DMPI_VERSION=ON cmake --build build-tests-mpiifx From 39711abc0a86e1a31d5a04b45e26a72330d8d21d Mon Sep 17 00:00:00 2001 From: Alyn James Date: Mon, 29 Dec 2025 17:33:04 +0000 Subject: [PATCH 23/64] =?UTF-8?q?Do=20the=20h5dwrite/h5dread=20calls=20wit?= =?UTF-8?q?hin=20the=20readHDF5*/writeHDF5*=20subroutines=20to=20avoid=20I?= =?UTF-8?q?ntelLLVM=E2=80=99s=20restriction=20on=20polymorphic=20assumed-r?= =?UTF-8?q?ank=20dummies=20+=20optional=20arguments.=20Also=20adjusted=20t?= =?UTF-8?q?he=20.inc=20files=20and=20added=20new=20ones=20to=20be=20used?= =?UTF-8?q?=20directly=20in=20the=20readHDF5*/writeHDF5*=20subroutines.=20?= =?UTF-8?q?Updated=20CI=20.yml=20file.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/ci.yml | 4 +- src/modhdf5.f90 | 134 +++++++++++++++++++----------------- src/modhdf5_read.inc | 27 ++------ src/modhdf5_read_hyper.inc | 15 ++++ src/modhdf5_write.inc | 29 ++------ src/modhdf5_write_hyper.inc | 15 ++++ 6 files changed, 112 insertions(+), 112 deletions(-) create mode 100644 src/modhdf5_read_hyper.inc create mode 100644 src/modhdf5_write_hyper.inc diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3f79fb7..eb9e156 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -127,7 +127,7 @@ jobs: run: | apt-get update apt-get install -y \ - cmake make gcc g++ \ + cmake make gcc g++ zlib1g-dev libszip-dev \ wget \ gpg @@ -144,8 +144,6 @@ jobs: -DCMAKE_Fortran_COMPILER=mpiifx \ -DBUILD_SHARED_LIBS=ON \ -DHDF5_BUILD_FORTRAN=ON \ - -DHDF5_ENABLE_ZLIB=OFF \ - -DHDF5_ENABLE_SZIP=OFF \ -DCMAKE_INSTALL_PREFIX=$HOME/hdf5-mpiifx \ -DCMAKE_Fortran_FLAGS="-fPIE" \ -DCMAKE_POSITION_INDEPENDENT_CODE=ON diff --git a/src/modhdf5.f90 b/src/modhdf5.f90 index 61ea857..ec2ed36 100644 --- a/src/modhdf5.f90 +++ b/src/modhdf5.f90 @@ -14,8 +14,7 @@ module modhdf5 write_attributeHDF5, read_attributeHDF5, writeHDF5, readHDF5, writeHDF5_hypersplice, & readHDF5_hypersplice private :: mpi_open_hdf5_file, set_dxpl_id, get_var_dims, get_file_or_group_id, get_file_or_group_hyp, & - get_array_dset_type, get_dset_type, create_char_dset_type, config_hyper_dims, h5dataset_write, & - h5dataset_read + get_array_dset_type, get_dset_type, create_char_dset_type, config_hyper_dims ! modHDF5 variables ! !HDF5 extension @@ -582,7 +581,25 @@ subroutine writeHDF5(id_idx,dataset_name,variable_to_write,write_to_group,fdtype ! Create dataspace (within group or not) for integer and save within that space call h5screate_simple_f(r, h5_ids%dims(1:r), h5_ids%dspace, hdferr) call h5dcreate_f(file_or_group_id, trim(dataset_name), h5_ids%dset_type, h5_ids%dspace, h5_ids%dset, hdferr) -call h5dataset_write(variable_to_write, h5_ids%dims, h5_ids%dset_type, h5_ids%dset, h5_ids%dxpl) + +select rank(variable_to_write) +rank(0) +#include "modhdf5_write.inc" +rank(1) +#include "modhdf5_write.inc" +rank(2) +#include "modhdf5_write.inc" +rank(3) +#include "modhdf5_write.inc" +rank(4) +#include "modhdf5_write.inc" +rank(5) +#include "modhdf5_write.inc" +rank(6) +#include "modhdf5_write.inc" +rank(7) +#include "modhdf5_write.inc" +end select if (present(fdtype_name)) call write_attributeHDF5(id_idx,dataset_name,"fortran_type",fdtype_name,write_to_group,h5_ids%dset) @@ -632,7 +649,25 @@ subroutine writeHDF5_hypersplice(id_idx,dataset_name,variable_to_write,write_to_ call h5sselect_hyperslab_f(hyp%dspace, H5S_SELECT_SET_F, offset(1:r), dims(1:r), hdferr) call h5screate_simple_f(r, dims(1:r), memspace_id, hdferr) -call h5dataset_write(variable_to_write, dims, dset_type, hyp%dset, hyp%dxpl, memspace_id, hyp%dspace) + +select rank(variable_to_write) +rank(0) +#include "modhdf5_write_hyper.inc" +rank(1) +#include "modhdf5_write_hyper.inc" +rank(2) +#include "modhdf5_write_hyper.inc" +rank(3) +#include "modhdf5_write_hyper.inc" +rank(4) +#include "modhdf5_write_hyper.inc" +rank(5) +#include "modhdf5_write_hyper.inc" +rank(6) +#include "modhdf5_write_hyper.inc" +rank(7) +#include "modhdf5_write_hyper.inc" +end select if (custom_type) call h5tclose_f(dset_type, hdferr) !close custom dset_type call h5sclose_f(memspace_id, hdferr) @@ -671,7 +706,25 @@ subroutine readHDF5(id_idx,dataset_name,variable_to_read,read_group,fdtype_name) call set_dxpl_id(h5_ids%dxpl,using_mpi,mpi_independent=.true.) call h5dopen_f(file_or_group_id, trim(dataset_name), h5_ids%dset, hdferr) -call h5dataset_read(variable_to_read, h5_ids%dims, h5_ids%dset_type, h5_ids%dset, h5_ids%dxpl) + +select rank(variable_to_read) +rank(0) +#include "modhdf5_read.inc" +rank(1) +#include "modhdf5_read.inc" +rank(2) +#include "modhdf5_read.inc" +rank(3) +#include "modhdf5_read.inc" +rank(4) +#include "modhdf5_read.inc" +rank(5) +#include "modhdf5_read.inc" +rank(6) +#include "modhdf5_read.inc" +rank(7) +#include "modhdf5_read.inc" +end select if (present(fdtype_name)) call read_attributeHDF5(id_idx,dataset_name,"fortran_type",fdtype_name,read_group,h5_ids%dset) @@ -714,77 +767,30 @@ subroutine readHDF5_hypersplice(id_idx,dataset_name,variable_to_read,read_group, call h5sselect_hyperslab_f(hyp%dspace, H5S_SELECT_SET_F, offset(1:r), dims(1:r), hdferr) if (nslice == 1) r = r - 1 !hypersplice call h5screate_simple_f(r, dims(1:r), memspace_id, hdferr) -call h5dataset_read(variable_to_read, dims, dset_type, hyp%dset, hyp%dxpl, memspace_id, hyp%dspace) -if (custom_type) call h5tclose_f(dset_type, hdferr) !close custom dset_type -call h5sclose_f(memspace_id, hdferr) - -end subroutine readHDF5_hypersplice - - -!----------------------------------! -! IO Interface Subroutines ! -!----------------------------------! - - -subroutine h5dataset_write(variable, dims, dset_type, dset_id, dxpl_id, memspace_id, filespace_id) -integer(HID_T), intent(in) :: dset_id, dset_type, dxpl_id -class(*), intent(in), dimension(..) :: variable !value to be written -integer(HSIZE_T), intent(in) :: dims(7) -integer(HID_T), intent(in), optional :: memspace_id, filespace_id - -integer :: hdferr, rnk - -select rank(variable) +select rank(variable_to_read) rank(0) -#include "modhdf5_write.inc" +#include "modhdf5_read_hyper.inc" rank(1) -#include "modhdf5_write.inc" +#include "modhdf5_read_hyper.inc" rank(2) -#include "modhdf5_write.inc" +#include "modhdf5_read_hyper.inc" rank(3) -#include "modhdf5_write.inc" +#include "modhdf5_read_hyper.inc" rank(4) -#include "modhdf5_write.inc" +#include "modhdf5_read_hyper.inc" rank(5) -#include "modhdf5_write.inc" +#include "modhdf5_read_hyper.inc" rank(6) -#include "modhdf5_write.inc" +#include "modhdf5_read_hyper.inc" rank(7) -#include "modhdf5_write.inc" +#include "modhdf5_read_hyper.inc" end select -end subroutine h5dataset_write - - -subroutine h5dataset_read(variable, dims, dset_type, dset_id, dxpl_id, memspace_id, filespace_id) -integer(HID_T), intent(in) :: dset_id, dset_type, dxpl_id -class(*), intent(inout), dimension(..) :: variable !value to be written -integer(HSIZE_T), intent(in) :: dims(7) -integer(HID_T), intent(in), optional :: memspace_id, filespace_id - -integer :: hdferr, rnk - -select rank(variable) -rank(0) -#include "modhdf5_read.inc" -rank(1) -#include "modhdf5_read.inc" -rank(2) -#include "modhdf5_read.inc" -rank(3) -#include "modhdf5_read.inc" -rank(4) -#include "modhdf5_read.inc" -rank(5) -#include "modhdf5_read.inc" -rank(6) -#include "modhdf5_read.inc" -rank(7) -#include "modhdf5_read.inc" -end select +if (custom_type) call h5tclose_f(dset_type, hdferr) !close custom dset_type +call h5sclose_f(memspace_id, hdferr) -end subroutine h5dataset_read +end subroutine readHDF5_hypersplice end module diff --git a/src/modhdf5_read.inc b/src/modhdf5_read.inc index 86c1cc7..fbea7b3 100644 --- a/src/modhdf5_read.inc +++ b/src/modhdf5_read.inc @@ -3,30 +3,13 @@ ! See the file COPYING for license details. ! can only be used in h5dataset_read() -rnk = rank(variable) -select type(variable) +select type(variable_to_read) type is (integer) - if (present(memspace_id) .and. present(filespace_id)) then - call h5dread_f(dset_id, dset_type, variable, dims(1:rnk), hdferr, memspace_id, filespace_id, xfer_prp=dxpl_id) - else - call h5dread_f(dset_id, dset_type, variable, dims(1:rnk), hdferr, xfer_prp=dxpl_id) - end if + call h5dread_f(h5_ids%dset, h5_ids%dset_type, variable_to_read, h5_ids%dims(1:r), hdferr, xfer_prp=h5_ids%dxpl) type is (real) - if (present(memspace_id) .and. present(filespace_id)) then - call h5dread_f(dset_id, dset_type, variable, dims(1:rnk), hdferr, memspace_id, filespace_id, xfer_prp=dxpl_id) - else - call h5dread_f(dset_id, dset_type, variable, dims(1:rnk), hdferr, xfer_prp=dxpl_id) - end if + call h5dread_f(h5_ids%dset, h5_ids%dset_type, variable_to_read, h5_ids%dims(1:r), hdferr, xfer_prp=h5_ids%dxpl) type is (real(8)) - if (present(memspace_id) .and. present(filespace_id)) then - call h5dread_f(dset_id, dset_type, variable, dims(1:rnk), hdferr, memspace_id, filespace_id, xfer_prp=dxpl_id) - else - call h5dread_f(dset_id, dset_type, variable, dims(1:rnk), hdferr, xfer_prp=dxpl_id) - end if + call h5dread_f(h5_ids%dset, h5_ids%dset_type, variable_to_read, h5_ids%dims(1:r), hdferr, xfer_prp=h5_ids%dxpl) type is (character(*)) - if (present(memspace_id) .and. present(filespace_id)) then - call h5dread_f(dset_id, dset_type, variable, dims(1:rnk), hdferr, memspace_id, filespace_id, xfer_prp=dxpl_id) - else - call h5dread_f(dset_id, dset_type, variable, dims(1:rnk), hdferr, xfer_prp=dxpl_id) - end if + call h5dread_f(h5_ids%dset, h5_ids%dset_type, variable_to_read, h5_ids%dims(1:r), hdferr, xfer_prp=h5_ids%dxpl) end select \ No newline at end of file diff --git a/src/modhdf5_read_hyper.inc b/src/modhdf5_read_hyper.inc new file mode 100644 index 0000000..4038d44 --- /dev/null +++ b/src/modhdf5_read_hyper.inc @@ -0,0 +1,15 @@ +! Copyright (C) 2025 A. D. N. James. +! This file is distributed under the terms of the GNU General Public License. +! See the file COPYING for license details. + +! can only be used in h5dataset_read() +select type(variable_to_read) +type is (integer) + call h5dread_f(hyp%dset, dset_type, variable_to_read, dims(1:r), hdferr, memspace_id, hyp%dspace, xfer_prp=hyp%dxpl) +type is (real) + call h5dread_f(hyp%dset, dset_type, variable_to_read, dims(1:r), hdferr, memspace_id, hyp%dspace, xfer_prp=hyp%dxpl) +type is (real(8)) + call h5dread_f(hyp%dset, dset_type, variable_to_read, dims(1:r), hdferr, memspace_id, hyp%dspace, xfer_prp=hyp%dxpl) +type is (character(*)) + call h5dread_f(hyp%dset, dset_type, variable_to_read, dims(1:r), hdferr, memspace_id, hyp%dspace, xfer_prp=hyp%dxpl) +end select \ No newline at end of file diff --git a/src/modhdf5_write.inc b/src/modhdf5_write.inc index 5348e99..aeb9faa 100644 --- a/src/modhdf5_write.inc +++ b/src/modhdf5_write.inc @@ -2,31 +2,14 @@ ! This file is distributed under the terms of the GNU General Public License. ! See the file COPYING for license details. -! can only be used in h5dataset_write() -rnk = rank(variable) -select type(variable) +! can only be used in writeHDF5() +select type(variable_to_write) type is (integer) - if (present(memspace_id) .and. present(filespace_id)) then - call h5dwrite_f(dset_id, dset_type, variable, dims(1:rnk), hdferr, memspace_id, filespace_id, xfer_prp=dxpl_id) - else - call h5dwrite_f(dset_id, dset_type, variable, dims(1:rnk), hdferr, xfer_prp=dxpl_id) - end if + call h5dwrite_f(h5_ids%dset, h5_ids%dset_type, variable_to_write, h5_ids%dims(1:r), hdferr, xfer_prp=h5_ids%dxpl) type is (real) - if (present(memspace_id) .and. present(filespace_id)) then - call h5dwrite_f(dset_id, dset_type, variable, dims(1:rnk), hdferr, memspace_id, filespace_id, xfer_prp=dxpl_id) - else - call h5dwrite_f(dset_id, dset_type, variable, dims(1:rnk), hdferr, xfer_prp=dxpl_id) - end if + call h5dwrite_f(h5_ids%dset, h5_ids%dset_type, variable_to_write, h5_ids%dims(1:r), hdferr, xfer_prp=h5_ids%dxpl) type is (real(8)) - if (present(memspace_id) .and. present(filespace_id)) then - call h5dwrite_f(dset_id, dset_type, variable, dims(1:rnk), hdferr, memspace_id, filespace_id, xfer_prp=dxpl_id) - else - call h5dwrite_f(dset_id, dset_type, variable, dims(1:rnk), hdferr, xfer_prp=dxpl_id) - end if + call h5dwrite_f(h5_ids%dset, h5_ids%dset_type, variable_to_write, h5_ids%dims(1:r), hdferr, xfer_prp=h5_ids%dxpl) type is (character(*)) - if (present(memspace_id) .and. present(filespace_id)) then - call h5dwrite_f(dset_id, dset_type, variable, dims(1:rnk), hdferr, memspace_id, filespace_id, xfer_prp=dxpl_id) - else - call h5dwrite_f(dset_id, dset_type, variable, dims(1:rnk), hdferr, xfer_prp=dxpl_id) - end if + call h5dwrite_f(h5_ids%dset, h5_ids%dset_type, variable_to_write, h5_ids%dims(1:r), hdferr, xfer_prp=h5_ids%dxpl) end select \ No newline at end of file diff --git a/src/modhdf5_write_hyper.inc b/src/modhdf5_write_hyper.inc new file mode 100644 index 0000000..334f264 --- /dev/null +++ b/src/modhdf5_write_hyper.inc @@ -0,0 +1,15 @@ +! Copyright (C) 2025 A. D. N. James. +! This file is distributed under the terms of the GNU General Public License. +! See the file COPYING for license details. + +! can only be used in writeHDF5_hypersplice() +select type(variable_to_write) +type is (integer) + call h5dwrite_f(hyp%dset, dset_type, variable_to_write, dims(1:r), hdferr, memspace_id, hyp%dspace, xfer_prp=hyp%dxpl) +type is (real) + call h5dwrite_f(hyp%dset, dset_type, variable_to_write, dims(1:r), hdferr, memspace_id, hyp%dspace, xfer_prp=hyp%dxpl) +type is (real(8)) + call h5dwrite_f(hyp%dset, dset_type, variable_to_write, dims(1:r), hdferr, memspace_id, hyp%dspace, xfer_prp=hyp%dxpl) +type is (character(*)) + call h5dwrite_f(hyp%dset, dset_type, variable_to_write, dims(1:r), hdferr, memspace_id, hyp%dspace, xfer_prp=hyp%dxpl) +end select \ No newline at end of file From 5655a8dbf0266a9ed20c2f83f1770212664bad24 Mon Sep 17 00:00:00 2001 From: Alyn James Date: Mon, 29 Dec 2025 17:47:01 +0000 Subject: [PATCH 24/64] Intel CI jobs + ifx cmake. --- .github/workflows/ci.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index eb9e156..aed0ab0 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -144,6 +144,8 @@ jobs: -DCMAKE_Fortran_COMPILER=mpiifx \ -DBUILD_SHARED_LIBS=ON \ -DHDF5_BUILD_FORTRAN=ON \ + -DHDF5_ENABLE_SZIP=OFF \ + -DHDF5_ENABLE_ZLIB=OFF \ -DCMAKE_INSTALL_PREFIX=$HOME/hdf5-mpiifx \ -DCMAKE_Fortran_FLAGS="-fPIE" \ -DCMAKE_POSITION_INDEPENDENT_CODE=ON From e85a032c2e48eda433e2183ef7f43ed76fb14b6d Mon Sep 17 00:00:00 2001 From: Alyn James Date: Mon, 29 Dec 2025 17:49:20 +0000 Subject: [PATCH 25/64] Intel CI jobs + ifx cmake. --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index aed0ab0..bb938c7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -127,7 +127,7 @@ jobs: run: | apt-get update apt-get install -y \ - cmake make gcc g++ zlib1g-dev libszip-dev \ + cmake make gcc g++ \ wget \ gpg From ff25bb61f2704c473390d7089704c5f4c03c5f59 Mon Sep 17 00:00:00 2001 From: Alyn James Date: Mon, 29 Dec 2025 17:57:44 +0000 Subject: [PATCH 26/64] Intel CI jobs + ifx cmake. --- .github/workflows/ci.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index bb938c7..5a34ebc 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -118,7 +118,7 @@ jobs: build_parallel_HDF5_with_ifx: runs-on: ubuntu-latest container: - image: intel/fortran-essentials:latest + image: intel/oneapi-hpckit:latest steps: - uses: actions/checkout@v4 @@ -142,8 +142,10 @@ jobs: # configure with ifx cmake -S ./hdf5-1.14.6 -B build-hdf5-ifx \ -DCMAKE_Fortran_COMPILER=mpiifx \ + -DCMAKE_C_COMPILER=mpiicc \ -DBUILD_SHARED_LIBS=ON \ -DHDF5_BUILD_FORTRAN=ON \ + -DHDF5_ENABLE_PARALLEL=ON \ -DHDF5_ENABLE_SZIP=OFF \ -DHDF5_ENABLE_ZLIB=OFF \ -DCMAKE_INSTALL_PREFIX=$HOME/hdf5-mpiifx \ From 7b05d45a4d20cfe0de1ab4da80e5aef292d32bbc Mon Sep 17 00:00:00 2001 From: Alyn James Date: Mon, 29 Dec 2025 18:12:10 +0000 Subject: [PATCH 27/64] Intel CI jobs + ifx cmake. --- .github/workflows/ci.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5a34ebc..5b84736 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -118,7 +118,7 @@ jobs: build_parallel_HDF5_with_ifx: runs-on: ubuntu-latest container: - image: intel/oneapi-hpckit:latest + image: intel/fortran-essentials:latest steps: - uses: actions/checkout@v4 @@ -142,7 +142,6 @@ jobs: # configure with ifx cmake -S ./hdf5-1.14.6 -B build-hdf5-ifx \ -DCMAKE_Fortran_COMPILER=mpiifx \ - -DCMAKE_C_COMPILER=mpiicc \ -DBUILD_SHARED_LIBS=ON \ -DHDF5_BUILD_FORTRAN=ON \ -DHDF5_ENABLE_PARALLEL=ON \ From 70fccf6c31978dad34901815de9703bc246a9eda Mon Sep 17 00:00:00 2001 From: Alyn James Date: Mon, 29 Dec 2025 18:56:42 +0000 Subject: [PATCH 28/64] Intel CI jobs + ifx cmake. --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5b84736..66b421b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -144,7 +144,7 @@ jobs: -DCMAKE_Fortran_COMPILER=mpiifx \ -DBUILD_SHARED_LIBS=ON \ -DHDF5_BUILD_FORTRAN=ON \ - -DHDF5_ENABLE_PARALLEL=ON \ + -DHDF5_ENABLE_PARALLEL=ON \ -DHDF5_ENABLE_SZIP=OFF \ -DHDF5_ENABLE_ZLIB=OFF \ -DCMAKE_INSTALL_PREFIX=$HOME/hdf5-mpiifx \ From 5662fd8467d0664ca73821ade4de6967ea41c956 Mon Sep 17 00:00:00 2001 From: Alyn James Date: Mon, 29 Dec 2025 19:01:02 +0000 Subject: [PATCH 29/64] Intel CI jobs + ifx cmake. --- .github/workflows/ci.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 66b421b..ec4fc81 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -145,10 +145,11 @@ jobs: -DBUILD_SHARED_LIBS=ON \ -DHDF5_BUILD_FORTRAN=ON \ -DHDF5_ENABLE_PARALLEL=ON \ - -DHDF5_ENABLE_SZIP=OFF \ - -DHDF5_ENABLE_ZLIB=OFF \ -DCMAKE_INSTALL_PREFIX=$HOME/hdf5-mpiifx \ - -DCMAKE_Fortran_FLAGS="-fPIE" \ + -DHDF5_ENABLE_ZLIB=OFF \ + -DHDF5_ENABLE_ZLIB_SUPPORT=OFF \ + -DHDF5_ENABLE_SZIP=OFF \ + -DHDF5_ENABLE_SZIP_SUPPORT=OFF \ -DCMAKE_POSITION_INDEPENDENT_CODE=ON cmake --build build-hdf5-mpiifx -j From 45ee2eefd8d1cd14ce9e414c96899a87ed152229 Mon Sep 17 00:00:00 2001 From: Alyn James Date: Mon, 29 Dec 2025 19:06:17 +0000 Subject: [PATCH 30/64] Intel CI jobs + ifx cmake. --- .github/workflows/ci.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ec4fc81..600bc70 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -142,6 +142,7 @@ jobs: # configure with ifx cmake -S ./hdf5-1.14.6 -B build-hdf5-ifx \ -DCMAKE_Fortran_COMPILER=mpiifx \ + -DCMAKE_C_COMPILER=mpiicc \ -DBUILD_SHARED_LIBS=ON \ -DHDF5_BUILD_FORTRAN=ON \ -DHDF5_ENABLE_PARALLEL=ON \ @@ -150,6 +151,8 @@ jobs: -DHDF5_ENABLE_ZLIB_SUPPORT=OFF \ -DHDF5_ENABLE_SZIP=OFF \ -DHDF5_ENABLE_SZIP_SUPPORT=OFF \ + -DCMAKE_C_FLAGS="-fPIE" \ + -DCMAKE_Fortran_FLAGS="-fPIE" \ -DCMAKE_POSITION_INDEPENDENT_CODE=ON cmake --build build-hdf5-mpiifx -j From 3a900be37aa6c7a5cbd2b50b9f3a3627de83ffc3 Mon Sep 17 00:00:00 2001 From: Alyn James Date: Mon, 29 Dec 2025 19:10:19 +0000 Subject: [PATCH 31/64] Intel CI jobs + ifx cmake. --- .github/workflows/ci.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 600bc70..ff9d90b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -142,7 +142,6 @@ jobs: # configure with ifx cmake -S ./hdf5-1.14.6 -B build-hdf5-ifx \ -DCMAKE_Fortran_COMPILER=mpiifx \ - -DCMAKE_C_COMPILER=mpiicc \ -DBUILD_SHARED_LIBS=ON \ -DHDF5_BUILD_FORTRAN=ON \ -DHDF5_ENABLE_PARALLEL=ON \ @@ -151,8 +150,8 @@ jobs: -DHDF5_ENABLE_ZLIB_SUPPORT=OFF \ -DHDF5_ENABLE_SZIP=OFF \ -DHDF5_ENABLE_SZIP_SUPPORT=OFF \ - -DCMAKE_C_FLAGS="-fPIE" \ -DCMAKE_Fortran_FLAGS="-fPIE" \ + -DHDF5_ENABLE_FORTRAN_C_INTERFACE_VERIFY=OFF \ -DCMAKE_POSITION_INDEPENDENT_CODE=ON cmake --build build-hdf5-mpiifx -j From cc973d01bbcf0f5852f0835a5f9dc4b880e6c06f Mon Sep 17 00:00:00 2001 From: Alyn James Date: Mon, 29 Dec 2025 19:14:17 +0000 Subject: [PATCH 32/64] Intel CI jobs + ifx cmake. --- .github/workflows/ci.yml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ff9d90b..02d390d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -139,7 +139,6 @@ jobs: tar -xzf hdf5-1.14.6.tar.gz mkdir -p build-hdf5-ifx - # configure with ifx cmake -S ./hdf5-1.14.6 -B build-hdf5-ifx \ -DCMAKE_Fortran_COMPILER=mpiifx \ -DBUILD_SHARED_LIBS=ON \ @@ -147,10 +146,7 @@ jobs: -DHDF5_ENABLE_PARALLEL=ON \ -DCMAKE_INSTALL_PREFIX=$HOME/hdf5-mpiifx \ -DHDF5_ENABLE_ZLIB=OFF \ - -DHDF5_ENABLE_ZLIB_SUPPORT=OFF \ -DHDF5_ENABLE_SZIP=OFF \ - -DHDF5_ENABLE_SZIP_SUPPORT=OFF \ - -DCMAKE_Fortran_FLAGS="-fPIE" \ -DHDF5_ENABLE_FORTRAN_C_INTERFACE_VERIFY=OFF \ -DCMAKE_POSITION_INDEPENDENT_CODE=ON From ce4408bbf6ae11e2309994cd154729f611d7bfb1 Mon Sep 17 00:00:00 2001 From: Alyn James Date: Mon, 29 Dec 2025 19:18:07 +0000 Subject: [PATCH 33/64] Intel CI jobs + ifx cmake. --- .github/workflows/ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 02d390d..ee8690f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -148,6 +148,7 @@ jobs: -DHDF5_ENABLE_ZLIB=OFF \ -DHDF5_ENABLE_SZIP=OFF \ -DHDF5_ENABLE_FORTRAN_C_INTERFACE_VERIFY=OFF \ + -DCMAKE_Fortran_FLAGS="-fPIC" \ -DCMAKE_POSITION_INDEPENDENT_CODE=ON cmake --build build-hdf5-mpiifx -j From 1794eb763244ab37399653744294f97d5b9f4d3e Mon Sep 17 00:00:00 2001 From: Alyn James Date: Mon, 29 Dec 2025 19:23:03 +0000 Subject: [PATCH 34/64] Intel CI jobs + ifx cmake. --- .github/workflows/ci.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ee8690f..8921311 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -141,15 +141,14 @@ jobs: cmake -S ./hdf5-1.14.6 -B build-hdf5-ifx \ -DCMAKE_Fortran_COMPILER=mpiifx \ - -DBUILD_SHARED_LIBS=ON \ + -DBUILD_SHARED_LIBS=OFF \ -DHDF5_BUILD_FORTRAN=ON \ -DHDF5_ENABLE_PARALLEL=ON \ -DCMAKE_INSTALL_PREFIX=$HOME/hdf5-mpiifx \ -DHDF5_ENABLE_ZLIB=OFF \ -DHDF5_ENABLE_SZIP=OFF \ -DHDF5_ENABLE_FORTRAN_C_INTERFACE_VERIFY=OFF \ - -DCMAKE_Fortran_FLAGS="-fPIC" \ - -DCMAKE_POSITION_INDEPENDENT_CODE=ON + -DCMAKE_POSITION_INDEPENDENT_CODE=OFF cmake --build build-hdf5-mpiifx -j cmake --install build-hdf5-mpiifx From ae47b1c98d93977c9c48b6cf3fdea1c9b15b56e5 Mon Sep 17 00:00:00 2001 From: Alyn James Date: Mon, 29 Dec 2025 19:26:14 +0000 Subject: [PATCH 35/64] Intel CI jobs + ifx cmake. --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8921311..30df49f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -139,7 +139,7 @@ jobs: tar -xzf hdf5-1.14.6.tar.gz mkdir -p build-hdf5-ifx - cmake -S ./hdf5-1.14.6 -B build-hdf5-ifx \ + cmake -S ./hdf5-1.14.6 -B build-hdf5-mpiifx \ -DCMAKE_Fortran_COMPILER=mpiifx \ -DBUILD_SHARED_LIBS=OFF \ -DHDF5_BUILD_FORTRAN=ON \ From 686e5ab9ca5ee43b541e93a0f8da120e9f4ec5ba Mon Sep 17 00:00:00 2001 From: Alyn James Date: Mon, 29 Dec 2025 19:30:36 +0000 Subject: [PATCH 36/64] Intel CI jobs + ifx cmake. --- .github/workflows/ci.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 30df49f..02cff1e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -148,8 +148,10 @@ jobs: -DHDF5_ENABLE_ZLIB=OFF \ -DHDF5_ENABLE_SZIP=OFF \ -DHDF5_ENABLE_FORTRAN_C_INTERFACE_VERIFY=OFF \ - -DCMAKE_POSITION_INDEPENDENT_CODE=OFF - + -DCMAKE_POSITION_INDEPENDENT_CODE=OFF \ + -DCMAKE_EXE_LINKER_FLAGS="" \ + -DCMAKE_SHARED_LINKER_FLAGS="" + cmake --build build-hdf5-mpiifx -j cmake --install build-hdf5-mpiifx From eebe846efc2c446023dcf90428e4570041338867 Mon Sep 17 00:00:00 2001 From: Alyn James Date: Mon, 29 Dec 2025 19:33:20 +0000 Subject: [PATCH 37/64] Intel CI jobs + ifx cmake. --- .github/workflows/ci.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 02cff1e..1d3798c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -131,15 +131,15 @@ jobs: wget \ gpg - - name: Install parallel HDF5 1.14.6 with IFX + - name: Install parallel HDF5 1.14.7 with IFX shell: bash run: | - wget -O hdf5-1.14.6.tar.gz \ - https://sourceforge.net/projects/hdf5.mirror/files/hdf5_1.14.6/hdf5-1.14.6.tar.gz/download - tar -xzf hdf5-1.14.6.tar.gz + wget -O hdf5-1.14.7.tar.gz \ + https://sourceforge.net/projects/hdf5.mirror/files/hdf5_1.14.7/hdf5-1.14.7.tar.gz/download + tar -xzf hdf5-1.14.7.tar.gz mkdir -p build-hdf5-ifx - cmake -S ./hdf5-1.14.6 -B build-hdf5-mpiifx \ + cmake -S ./hdf5-1.14.7 -B build-hdf5-mpiifx \ -DCMAKE_Fortran_COMPILER=mpiifx \ -DBUILD_SHARED_LIBS=OFF \ -DHDF5_BUILD_FORTRAN=ON \ @@ -151,7 +151,7 @@ jobs: -DCMAKE_POSITION_INDEPENDENT_CODE=OFF \ -DCMAKE_EXE_LINKER_FLAGS="" \ -DCMAKE_SHARED_LINKER_FLAGS="" - + cmake --build build-hdf5-mpiifx -j cmake --install build-hdf5-mpiifx From bab205bac7aa3b8a2a0256d0ddcd27ccc0041034 Mon Sep 17 00:00:00 2001 From: Alyn James Date: Mon, 29 Dec 2025 19:38:25 +0000 Subject: [PATCH 38/64] Intel CI jobs + ifx cmake. --- .github/workflows/ci.yml | 33 +++++++++++++++------------------ 1 file changed, 15 insertions(+), 18 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1d3798c..426006b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -131,27 +131,24 @@ jobs: wget \ gpg - - name: Install parallel HDF5 1.14.7 with IFX + - name: Install parallel HDF5 1.14.6 with IFX shell: bash run: | - wget -O hdf5-1.14.7.tar.gz \ - https://sourceforge.net/projects/hdf5.mirror/files/hdf5_1.14.7/hdf5-1.14.7.tar.gz/download - tar -xzf hdf5-1.14.7.tar.gz - mkdir -p build-hdf5-ifx - - cmake -S ./hdf5-1.14.7 -B build-hdf5-mpiifx \ - -DCMAKE_Fortran_COMPILER=mpiifx \ - -DBUILD_SHARED_LIBS=OFF \ - -DHDF5_BUILD_FORTRAN=ON \ - -DHDF5_ENABLE_PARALLEL=ON \ - -DCMAKE_INSTALL_PREFIX=$HOME/hdf5-mpiifx \ - -DHDF5_ENABLE_ZLIB=OFF \ - -DHDF5_ENABLE_SZIP=OFF \ - -DHDF5_ENABLE_FORTRAN_C_INTERFACE_VERIFY=OFF \ - -DCMAKE_POSITION_INDEPENDENT_CODE=OFF \ - -DCMAKE_EXE_LINKER_FLAGS="" \ - -DCMAKE_SHARED_LINKER_FLAGS="" + wget -O hdf5-1.14.6.tar.gz \ + https://sourceforge.net/projects/hdf5.mirror/files/hdf5_1.14.6/hdf5-1.14.6.tar.gz/download + tar -xzf hdf5-1.14.6.tar.gz + mkdir -p build-hdf5-mpiifx + cmake -S hdf5-1.14.6 -B build-hdf5-mpiifx \ + -DCMAKE_Fortran_COMPILER=mpiifx \ + -DCMAKE_C_COMPILER=gcc \ + -DBUILD_SHARED_LIBS=OFF \ + -DHDF5_BUILD_FORTRAN=ON \ + -DHDF5_ENABLE_PARALLEL=ON \ + -DHDF5_ENABLE_FORTRAN_C_INTERFACE_VERIFY=OFF \ + -DCMAKE_POSITION_INDEPENDENT_CODE=OFF \ + -DCMAKE_INSTALL_PREFIX=$HOME/hdf5-mpiifx + cmake --build build-hdf5-mpiifx -j cmake --install build-hdf5-mpiifx From 39146905d388aa9277ddcb17df7f8a867f02aa6d Mon Sep 17 00:00:00 2001 From: Alyn James Date: Mon, 29 Dec 2025 19:48:58 +0000 Subject: [PATCH 39/64] Intel CI jobs + ifx cmake. --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 426006b..697cb98 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -141,7 +141,7 @@ jobs: cmake -S hdf5-1.14.6 -B build-hdf5-mpiifx \ -DCMAKE_Fortran_COMPILER=mpiifx \ - -DCMAKE_C_COMPILER=gcc \ + -DCMAKE_C_COMPILER=mpiicc \ -DBUILD_SHARED_LIBS=OFF \ -DHDF5_BUILD_FORTRAN=ON \ -DHDF5_ENABLE_PARALLEL=ON \ From 360b7c5285181903b4d438f1e3dafa6b587784cd Mon Sep 17 00:00:00 2001 From: Alyn James Date: Mon, 29 Dec 2025 19:53:29 +0000 Subject: [PATCH 40/64] Intel CI jobs + ifx cmake. --- .github/workflows/ci.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 697cb98..33f067a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -141,14 +141,15 @@ jobs: cmake -S hdf5-1.14.6 -B build-hdf5-mpiifx \ -DCMAKE_Fortran_COMPILER=mpiifx \ - -DCMAKE_C_COMPILER=mpiicc \ + -DCMAKE_C_COMPILER=gcc \ + -DCMAKE_CXX_COMPILER=g++ \ -DBUILD_SHARED_LIBS=OFF \ -DHDF5_BUILD_FORTRAN=ON \ -DHDF5_ENABLE_PARALLEL=ON \ -DHDF5_ENABLE_FORTRAN_C_INTERFACE_VERIFY=OFF \ -DCMAKE_POSITION_INDEPENDENT_CODE=OFF \ -DCMAKE_INSTALL_PREFIX=$HOME/hdf5-mpiifx - + cmake --build build-hdf5-mpiifx -j cmake --install build-hdf5-mpiifx From 84b720cf34b2c8dc8f99f8b05863d6aff33c1e90 Mon Sep 17 00:00:00 2001 From: Alyn James Date: Mon, 29 Dec 2025 19:57:46 +0000 Subject: [PATCH 41/64] Intel CI jobs + ifx cmake. --- .github/workflows/ci.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 33f067a..c035f95 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -146,8 +146,10 @@ jobs: -DBUILD_SHARED_LIBS=OFF \ -DHDF5_BUILD_FORTRAN=ON \ -DHDF5_ENABLE_PARALLEL=ON \ - -DHDF5_ENABLE_FORTRAN_C_INTERFACE_VERIFY=OFF \ - -DCMAKE_POSITION_INDEPENDENT_CODE=OFF \ + -DHDF5_ENABLE_FORTRAN_C_INTERFACE_VERIFY=ON \ + -DHDF5_ENABLE_Z_LIB_SUPPORT=OFF \ + -DHDF5_ENABLE_SZIP_SUPPORT=OFF \ + -DCMAKE_POSITION_INDEPENDENT_CODE=ON \ -DCMAKE_INSTALL_PREFIX=$HOME/hdf5-mpiifx cmake --build build-hdf5-mpiifx -j From 88a716916ffbecc09c99f1ca20d03ae9629b1be9 Mon Sep 17 00:00:00 2001 From: Alyn James Date: Mon, 29 Dec 2025 20:01:35 +0000 Subject: [PATCH 42/64] Intel CI jobs + ifx cmake. --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c035f95..6ad74e7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -146,7 +146,7 @@ jobs: -DBUILD_SHARED_LIBS=OFF \ -DHDF5_BUILD_FORTRAN=ON \ -DHDF5_ENABLE_PARALLEL=ON \ - -DHDF5_ENABLE_FORTRAN_C_INTERFACE_VERIFY=ON \ + -DHDF5_SKIP_FORTRAN_C_INTERFACE_VERIFY=ON \ -DHDF5_ENABLE_Z_LIB_SUPPORT=OFF \ -DHDF5_ENABLE_SZIP_SUPPORT=OFF \ -DCMAKE_POSITION_INDEPENDENT_CODE=ON \ From 74b9ed684f1c4a1bedbb9981537471ea7ee8ebc5 Mon Sep 17 00:00:00 2001 From: Alyn James Date: Mon, 29 Dec 2025 20:04:46 +0000 Subject: [PATCH 43/64] Intel CI jobs + ifx cmake. --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6ad74e7..8e9ebe8 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -146,7 +146,7 @@ jobs: -DBUILD_SHARED_LIBS=OFF \ -DHDF5_BUILD_FORTRAN=ON \ -DHDF5_ENABLE_PARALLEL=ON \ - -DHDF5_SKIP_FORTRAN_C_INTERFACE_VERIFY=ON \ + -DHDF5_ENABLE_FORTRAN_C_INTERFACE_VERIFY=OFF \ -DHDF5_ENABLE_Z_LIB_SUPPORT=OFF \ -DHDF5_ENABLE_SZIP_SUPPORT=OFF \ -DCMAKE_POSITION_INDEPENDENT_CODE=ON \ From 99c6ae4172c25290b74a8b50e59134ba2edfc226 Mon Sep 17 00:00:00 2001 From: Alyn James Date: Mon, 29 Dec 2025 20:09:39 +0000 Subject: [PATCH 44/64] Intel CI jobs + ifx cmake. --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8e9ebe8..52c3f6f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -146,7 +146,7 @@ jobs: -DBUILD_SHARED_LIBS=OFF \ -DHDF5_BUILD_FORTRAN=ON \ -DHDF5_ENABLE_PARALLEL=ON \ - -DHDF5_ENABLE_FORTRAN_C_INTERFACE_VERIFY=OFF \ + -DBUILD_FORTRAN_EXAMPLES=OFF -DHDF5_ENABLE_Z_LIB_SUPPORT=OFF \ -DHDF5_ENABLE_SZIP_SUPPORT=OFF \ -DCMAKE_POSITION_INDEPENDENT_CODE=ON \ From 4c027f457e6fe723b0e033144aaa082fee47ff4d Mon Sep 17 00:00:00 2001 From: Alyn James Date: Mon, 29 Dec 2025 20:13:44 +0000 Subject: [PATCH 45/64] Intel CI jobs + ifx cmake. --- .github/workflows/ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 52c3f6f..8de3c70 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -151,6 +151,7 @@ jobs: -DHDF5_ENABLE_SZIP_SUPPORT=OFF \ -DCMAKE_POSITION_INDEPENDENT_CODE=ON \ -DCMAKE_INSTALL_PREFIX=$HOME/hdf5-mpiifx + -DCMAKE_Fortran_FLAGS="-fPIC" cmake --build build-hdf5-mpiifx -j cmake --install build-hdf5-mpiifx From ca24b46be4a14d58f9f398cb674c9c6046377a36 Mon Sep 17 00:00:00 2001 From: Alyn James Date: Mon, 29 Dec 2025 20:27:03 +0000 Subject: [PATCH 46/64] Intel CI jobs + ifx cmake. --- .github/workflows/ci.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8de3c70..2234b82 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -146,12 +146,12 @@ jobs: -DBUILD_SHARED_LIBS=OFF \ -DHDF5_BUILD_FORTRAN=ON \ -DHDF5_ENABLE_PARALLEL=ON \ - -DBUILD_FORTRAN_EXAMPLES=OFF + -DBUILD_FORTRAN_EXAMPLES=OFF \ -DHDF5_ENABLE_Z_LIB_SUPPORT=OFF \ -DHDF5_ENABLE_SZIP_SUPPORT=OFF \ -DCMAKE_POSITION_INDEPENDENT_CODE=ON \ - -DCMAKE_INSTALL_PREFIX=$HOME/hdf5-mpiifx - -DCMAKE_Fortran_FLAGS="-fPIC" + -DCMAKE_INSTALL_PREFIX=$HOME/hdf5-mpiifx \ + -DHDF5_SKIP_FORTRAN_INTERFACE_CHECK=ON cmake --build build-hdf5-mpiifx -j cmake --install build-hdf5-mpiifx From 83ea47d91008a7bbc50146716d405f6fcfeb2189 Mon Sep 17 00:00:00 2001 From: Alyn James Date: Mon, 29 Dec 2025 20:33:10 +0000 Subject: [PATCH 47/64] Intel CI jobs + ifx cmake. --- .github/workflows/ci.yml | 31 ++++++++++++++++--------------- 1 file changed, 16 insertions(+), 15 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2234b82..0849a1a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -128,6 +128,7 @@ jobs: apt-get update apt-get install -y \ cmake make gcc g++ \ + libopenmpi-dev \ wget \ gpg @@ -137,10 +138,10 @@ jobs: wget -O hdf5-1.14.6.tar.gz \ https://sourceforge.net/projects/hdf5.mirror/files/hdf5_1.14.6/hdf5-1.14.6.tar.gz/download tar -xzf hdf5-1.14.6.tar.gz - mkdir -p build-hdf5-mpiifx + mkdir -p build-hdf5-ifx - cmake -S hdf5-1.14.6 -B build-hdf5-mpiifx \ - -DCMAKE_Fortran_COMPILER=mpiifx \ + cmake -S hdf5-1.14.6 -B build-hdf5-ifx \ + -DCMAKE_Fortran_COMPILER=mpif90 \ -DCMAKE_C_COMPILER=gcc \ -DCMAKE_CXX_COMPILER=g++ \ -DBUILD_SHARED_LIBS=OFF \ @@ -150,25 +151,25 @@ jobs: -DHDF5_ENABLE_Z_LIB_SUPPORT=OFF \ -DHDF5_ENABLE_SZIP_SUPPORT=OFF \ -DCMAKE_POSITION_INDEPENDENT_CODE=ON \ - -DCMAKE_INSTALL_PREFIX=$HOME/hdf5-mpiifx \ + -DCMAKE_INSTALL_PREFIX=$HOME/hdf5-ifx \ -DHDF5_SKIP_FORTRAN_INTERFACE_CHECK=ON - cmake --build build-hdf5-mpiifx -j - cmake --install build-hdf5-mpiifx + cmake --build build-hdf5-ifx -j + cmake --install build-hdf5-ifx - - name: Build and run MPI tests with mpiifx + - name: Build and run MPI tests with ifx + mpif90 shell: bash run: | - mpiifx --version + mpif90 --version - cmake -S ./test/. -B build-tests-mpiifx \ - -DCMAKE_Fortran_COMPILER=mpiifx \ - -DCMAKE_PREFIX_PATH=$HOME/hdf5-mpiifx \ + cmake -S ./test/. -B build-tests-ifx \ + -DCMAKE_Fortran_COMPILER=ifx \ + -DCMAKE_PREFIX_PATH=$HOME/hdf5-ifx \ -DMPI_VERSION=ON - cmake --build build-tests-mpiifx + cmake --build build-tests-ifx - ./build-tests-mpiifx/h5testrunner - ./build-tests-mpiifx/h5testrunner_mpi + ./build-tests-ifx/h5testrunner + ./build-tests-ifx/h5testrunner_mpi mpirun --allow-run-as-root --oversubscribe \ - -np 2 ./build-tests-mpiifx/h5testrunner_mpi + -np 2 ./build-tests-ifx/h5testrunner_mpi \ No newline at end of file From c92e0eb5152298b560261c4de1d0b84319874df7 Mon Sep 17 00:00:00 2001 From: Alyn James Date: Mon, 29 Dec 2025 21:01:43 +0000 Subject: [PATCH 48/64] Intel CI jobs + ifx cmake. --- .github/workflows/ci.yml | 40 ++++++++++++++++++---------------------- 1 file changed, 18 insertions(+), 22 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0849a1a..dfa0998 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -127,10 +127,10 @@ jobs: run: | apt-get update apt-get install -y \ - cmake make gcc g++ \ - libopenmpi-dev \ + cmake make intel-oneapi-basekit\ wget \ gpg + source /opt/intel/oneapi/basekit/setvars.sh - name: Install parallel HDF5 1.14.6 with IFX shell: bash @@ -138,38 +138,34 @@ jobs: wget -O hdf5-1.14.6.tar.gz \ https://sourceforge.net/projects/hdf5.mirror/files/hdf5_1.14.6/hdf5-1.14.6.tar.gz/download tar -xzf hdf5-1.14.6.tar.gz - mkdir -p build-hdf5-ifx + mkdir -p build-hdf5-mpiifx - cmake -S hdf5-1.14.6 -B build-hdf5-ifx \ - -DCMAKE_Fortran_COMPILER=mpif90 \ - -DCMAKE_C_COMPILER=gcc \ - -DCMAKE_CXX_COMPILER=g++ \ + cmake -S hdf5-1.14.6 -B build-hdf5-mpiifx \ + -DCMAKE_Fortran_COMPILER=mpiifx \ + -DCMAKE_C_COMPILER=mpiicx \ -DBUILD_SHARED_LIBS=OFF \ -DHDF5_BUILD_FORTRAN=ON \ -DHDF5_ENABLE_PARALLEL=ON \ - -DBUILD_FORTRAN_EXAMPLES=OFF \ -DHDF5_ENABLE_Z_LIB_SUPPORT=OFF \ -DHDF5_ENABLE_SZIP_SUPPORT=OFF \ - -DCMAKE_POSITION_INDEPENDENT_CODE=ON \ - -DCMAKE_INSTALL_PREFIX=$HOME/hdf5-ifx \ - -DHDF5_SKIP_FORTRAN_INTERFACE_CHECK=ON + -DCMAKE_INSTALL_PREFIX=$HOME/hdf5-mpiifx \ - cmake --build build-hdf5-ifx -j - cmake --install build-hdf5-ifx + cmake --build build-hdf5-mpiifx -j + cmake --install build-hdf5-mpiifx - - name: Build and run MPI tests with ifx + mpif90 + - name: Build and run MPI tests with mpiifx shell: bash run: | - mpif90 --version + mpiifx --version - cmake -S ./test/. -B build-tests-ifx \ - -DCMAKE_Fortran_COMPILER=ifx \ - -DCMAKE_PREFIX_PATH=$HOME/hdf5-ifx \ + cmake -S ./test/. -B build-tests-mpiifx \ + -DCMAKE_Fortran_COMPILER=mpiifx \ + -DCMAKE_PREFIX_PATH=$HOME/hdf5-mpiifx \ -DMPI_VERSION=ON - cmake --build build-tests-ifx + cmake --build build-tests-mpiifx - ./build-tests-ifx/h5testrunner - ./build-tests-ifx/h5testrunner_mpi + ./build-tests-mpiifx/h5testrunner + ./build-tests-mpiifx/h5testrunner_mpi mpirun --allow-run-as-root --oversubscribe \ - -np 2 ./build-tests-ifx/h5testrunner_mpi + -np 2 ./build-tests-mpiifx/h5testrunner_mpi \ No newline at end of file From f009a30a349b06e68a7500c11b10e897d081e3eb Mon Sep 17 00:00:00 2001 From: Alyn James Date: Mon, 29 Dec 2025 21:04:34 +0000 Subject: [PATCH 49/64] Intel CI jobs + ifx cmake. --- .github/workflows/ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index dfa0998..987b4ac 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -125,6 +125,7 @@ jobs: - name: Install system dependencies run: | + wget -qO- https://apt.repos.intel.com/oneapi/gpgkey | gpg --dearmor | sudo tee /usr/share/keyrings/oneapi.gpg > /dev/null apt-get update apt-get install -y \ cmake make intel-oneapi-basekit\ From 191e50c6b63522f74b45ce293cd66cc9e829172d Mon Sep 17 00:00:00 2001 From: Alyn James Date: Mon, 29 Dec 2025 21:07:12 +0000 Subject: [PATCH 50/64] Intel CI jobs + ifx cmake. --- .github/workflows/ci.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 987b4ac..0ede814 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -125,12 +125,13 @@ jobs: - name: Install system dependencies run: | - wget -qO- https://apt.repos.intel.com/oneapi/gpgkey | gpg --dearmor | sudo tee /usr/share/keyrings/oneapi.gpg > /dev/null apt-get update apt-get install -y \ cmake make intel-oneapi-basekit\ wget \ gpg + wget -qO- https://apt.repos.intel.com/oneapi/gpgkey | gpg --dearmor | sudo tee /usr/share/keyrings/oneapi.gpg > /dev/null + apt-get update source /opt/intel/oneapi/basekit/setvars.sh - name: Install parallel HDF5 1.14.6 with IFX From 9a73f1a8eaa4e08db7b5b32c4b9d455ca51b667d Mon Sep 17 00:00:00 2001 From: Alyn James Date: Mon, 29 Dec 2025 21:12:12 +0000 Subject: [PATCH 51/64] Intel CI jobs + ifx cmake. --- .github/workflows/ci.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0ede814..d6a6e61 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -127,10 +127,12 @@ jobs: run: | apt-get update apt-get install -y \ - cmake make intel-oneapi-basekit\ + cmake make gnupg\ wget \ gpg + wget -qO- https://apt.repos.intel.com/oneapi/gpgkey | gpg --dearmor | sudo tee /usr/share/keyrings/oneapi.gpg > /dev/null + apt-get install -y intel-oneapi-basekit apt-get update source /opt/intel/oneapi/basekit/setvars.sh From 1820e0dae3cba7ce7c624ac718792282c2e07208 Mon Sep 17 00:00:00 2001 From: Alyn James Date: Mon, 29 Dec 2025 21:17:36 +0000 Subject: [PATCH 52/64] Intel CI jobs + ifx cmake. --- .github/workflows/ci.yml | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d6a6e61..184baff 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -126,15 +126,17 @@ jobs: - name: Install system dependencies run: | apt-get update - apt-get install -y \ - cmake make gnupg\ - wget \ - gpg + apt-get install -y wget gnupg cmake make - wget -qO- https://apt.repos.intel.com/oneapi/gpgkey | gpg --dearmor | sudo tee /usr/share/keyrings/oneapi.gpg > /dev/null - apt-get install -y intel-oneapi-basekit + wget -qO- https://apt.repos.intel.com/oneapi/gpgkey | gpg --dearmor > /usr/share/keyrings/oneapi.gpg + + # Add Intel oneAPI repository + echo "deb [signed-by=/usr/share/keyrings/oneapi.gpg] https://apt.repos.intel.com/oneapi all main" > /etc/apt/sources.list.d/oneapi.list apt-get update - source /opt/intel/oneapi/basekit/setvars.sh + apt-get install -y intel-oneapi-compiler-dpcpp-cpp-and-cpp-classic + + # Source the Intel environment + source /opt/intel/oneapi/setvars.sh - name: Install parallel HDF5 1.14.6 with IFX shell: bash From ed54a37b44af85374f7d8d2d5ab24a9b6bcb47a8 Mon Sep 17 00:00:00 2001 From: Alyn James Date: Mon, 29 Dec 2025 21:19:05 +0000 Subject: [PATCH 53/64] Intel CI jobs + ifx cmake. --- .github/workflows/ci.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 184baff..2da03eb 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -130,12 +130,9 @@ jobs: wget -qO- https://apt.repos.intel.com/oneapi/gpgkey | gpg --dearmor > /usr/share/keyrings/oneapi.gpg - # Add Intel oneAPI repository echo "deb [signed-by=/usr/share/keyrings/oneapi.gpg] https://apt.repos.intel.com/oneapi all main" > /etc/apt/sources.list.d/oneapi.list apt-get update apt-get install -y intel-oneapi-compiler-dpcpp-cpp-and-cpp-classic - - # Source the Intel environment source /opt/intel/oneapi/setvars.sh - name: Install parallel HDF5 1.14.6 with IFX From 96731c50c40d3902fc758ea7b22f6cf29a47feca Mon Sep 17 00:00:00 2001 From: Alyn James Date: Mon, 29 Dec 2025 21:24:19 +0000 Subject: [PATCH 54/64] Intel CI jobs + ifx cmake. --- .github/workflows/ci.yml | 27 ++++++++++++++++++--------- 1 file changed, 18 insertions(+), 9 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2da03eb..3d884e2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -117,24 +117,33 @@ jobs: build_parallel_HDF5_with_ifx: runs-on: ubuntu-latest - container: - image: intel/fortran-essentials:latest steps: - uses: actions/checkout@v4 - name: Install system dependencies run: | - apt-get update - apt-get install -y wget gnupg cmake make + sudo apt-get update + sudo apt-get install -y wget cmake make gcc g++ - wget -qO- https://apt.repos.intel.com/oneapi/gpgkey | gpg --dearmor > /usr/share/keyrings/oneapi.gpg + - name: Add Intel oneAPI repository + run: | + # Intel official setup script adds repo and keys + wget -qO- https://apt.repos.intel.com/oneapi/2025/setup.sh | sudo bash - echo "deb [signed-by=/usr/share/keyrings/oneapi.gpg] https://apt.repos.intel.com/oneapi all main" > /etc/apt/sources.list.d/oneapi.list - apt-get update - apt-get install -y intel-oneapi-compiler-dpcpp-cpp-and-cpp-classic - source /opt/intel/oneapi/setvars.sh + - name: Install Intel compilers and MPI + run: | + sudo apt-get update + sudo apt-get install -y \ + intel-oneapi-compiler-dpcpp-cpp \ + intel-oneapi-fortran-essentials \ + intel-oneapi-mpi + - name: Load Intel oneAPI environment + shell: bash + run: | + source /opt/intel/oneapi/setvars.sh + - name: Install parallel HDF5 1.14.6 with IFX shell: bash run: | From b9e7d6b5de2b10f91a20b0946e7342662c070224 Mon Sep 17 00:00:00 2001 From: Alyn James Date: Mon, 29 Dec 2025 21:28:07 +0000 Subject: [PATCH 55/64] Intel CI jobs + ifx cmake. --- .github/workflows/ci.yml | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3d884e2..adcc1de 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -123,18 +123,17 @@ jobs: - name: Install system dependencies run: | - sudo apt-get update - sudo apt-get install -y wget cmake make gcc g++ + apt-get update + apt-get install -y wget cmake make gcc g++ - name: Add Intel oneAPI repository run: | - # Intel official setup script adds repo and keys wget -qO- https://apt.repos.intel.com/oneapi/2025/setup.sh | sudo bash - name: Install Intel compilers and MPI run: | - sudo apt-get update - sudo apt-get install -y \ + apt-get update + apt-get install -y \ intel-oneapi-compiler-dpcpp-cpp \ intel-oneapi-fortran-essentials \ intel-oneapi-mpi @@ -143,7 +142,7 @@ jobs: shell: bash run: | source /opt/intel/oneapi/setvars.sh - + - name: Install parallel HDF5 1.14.6 with IFX shell: bash run: | From 7ca1074666014b6acc7f59e860407dce2d5c7143 Mon Sep 17 00:00:00 2001 From: Alyn James Date: Mon, 29 Dec 2025 21:29:14 +0000 Subject: [PATCH 56/64] Intel CI jobs + ifx cmake. --- .github/workflows/ci.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index adcc1de..f458f25 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -123,8 +123,8 @@ jobs: - name: Install system dependencies run: | - apt-get update - apt-get install -y wget cmake make gcc g++ + sudo apt-get update + sudo apt-get install -y wget cmake make gcc g++ - name: Add Intel oneAPI repository run: | @@ -132,8 +132,8 @@ jobs: - name: Install Intel compilers and MPI run: | - apt-get update - apt-get install -y \ + sudo apt-get update + sudo apt-get install -y \ intel-oneapi-compiler-dpcpp-cpp \ intel-oneapi-fortran-essentials \ intel-oneapi-mpi @@ -142,7 +142,7 @@ jobs: shell: bash run: | source /opt/intel/oneapi/setvars.sh - + - name: Install parallel HDF5 1.14.6 with IFX shell: bash run: | From db0a6223b2e0921f71514d04e3e15cd2610aee4e Mon Sep 17 00:00:00 2001 From: Alyn James Date: Mon, 29 Dec 2025 21:31:54 +0000 Subject: [PATCH 57/64] Intel CI jobs + ifx cmake. --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f458f25..5ccbcc4 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -128,7 +128,7 @@ jobs: - name: Add Intel oneAPI repository run: | - wget -qO- https://apt.repos.intel.com/oneapi/2025/setup.sh | sudo bash + wget -qO- https://apt.repos.intel.com/oneapi/latest/setup.sh | sudo bash - name: Install Intel compilers and MPI run: | From f4a38791f6c8386b903696c5e2f8d50618cea90e Mon Sep 17 00:00:00 2001 From: Alyn James Date: Mon, 29 Dec 2025 21:36:15 +0000 Subject: [PATCH 58/64] Intel CI jobs + ifx cmake. --- .github/workflows/ci.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5ccbcc4..6d85090 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -117,6 +117,8 @@ jobs: build_parallel_HDF5_with_ifx: runs-on: ubuntu-latest + container: + image: intel/fortran-essentials:latest steps: - uses: actions/checkout@v4 @@ -134,9 +136,7 @@ jobs: run: | sudo apt-get update sudo apt-get install -y \ - intel-oneapi-compiler-dpcpp-cpp \ - intel-oneapi-fortran-essentials \ - intel-oneapi-mpi + intel-basekit - name: Load Intel oneAPI environment shell: bash From c3e65ef9e050042498e474cc92eb1e925ba5b938 Mon Sep 17 00:00:00 2001 From: Alyn James Date: Mon, 29 Dec 2025 21:38:25 +0000 Subject: [PATCH 59/64] Intel CI jobs + ifx cmake. --- .github/workflows/ci.yml | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6d85090..cccec97 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -125,18 +125,17 @@ jobs: - name: Install system dependencies run: | - sudo apt-get update - sudo apt-get install -y wget cmake make gcc g++ + apt-get update + apt-get install -y wget cmake make gcc g++ - name: Add Intel oneAPI repository run: | - wget -qO- https://apt.repos.intel.com/oneapi/latest/setup.sh | sudo bash + wget -qO- https://apt.repos.intel.com/oneapi/latest/setup.sh | bash - name: Install Intel compilers and MPI run: | - sudo apt-get update - sudo apt-get install -y \ - intel-basekit + apt-get update + apt-get install -y intel-basekit - name: Load Intel oneAPI environment shell: bash From 9c4fd8b5d97f69b84bab773851acd1b5766a3328 Mon Sep 17 00:00:00 2001 From: Alyn James Date: Mon, 29 Dec 2025 22:23:57 +0000 Subject: [PATCH 60/64] Intel CI jobs + ifx cmake. --- .github/workflows/ci.yml | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index cccec97..ad19a27 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -117,25 +117,27 @@ jobs: build_parallel_HDF5_with_ifx: runs-on: ubuntu-latest - container: - image: intel/fortran-essentials:latest steps: - uses: actions/checkout@v4 - name: Install system dependencies run: | - apt-get update - apt-get install -y wget cmake make gcc g++ + sudo apt-get update + sudo apt-get install -y wget cmake make gcc g++ gpg - name: Add Intel oneAPI repository run: | - wget -qO- https://apt.repos.intel.com/oneapi/latest/setup.sh | bash + wget -qO- https://apt.repos.intel.com/oneapi/latest/setup.sh | sudo bash - name: Install Intel compilers and MPI run: | - apt-get update - apt-get install -y intel-basekit + sudo apt-get update + sudo apt-get install -y \ + intel-oneapi-compiler-fortran \ + intel-oneapi-compiler-dpcpp-cpp \ + intel-oneapi-mpi \ + intel-oneapi-mpi-devel - name: Load Intel oneAPI environment shell: bash From c1e7f6016c230be96295681bd35a85906a001229 Mon Sep 17 00:00:00 2001 From: Alyn James Date: Mon, 29 Dec 2025 22:26:37 +0000 Subject: [PATCH 61/64] Intel CI jobs + ifx cmake. --- .github/workflows/ci.yml | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ad19a27..230a63c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -132,12 +132,11 @@ jobs: - name: Install Intel compilers and MPI run: | - sudo apt-get update sudo apt-get install -y \ - intel-oneapi-compiler-fortran \ - intel-oneapi-compiler-dpcpp-cpp \ - intel-oneapi-mpi \ - intel-oneapi-mpi-devel + intel-oneapi-compiler-fortran-2025.0.2 \ + intel-oneapi-compiler-dpcpp-cpp-2025.0.2 \ + intel-oneapi-mpi-2025.0.2 \ + intel-oneapi-mpi-devel-2025.0.2 - name: Load Intel oneAPI environment shell: bash From 5d35a9fe087189d401280eb8a3ca9fffac940efd Mon Sep 17 00:00:00 2001 From: Alyn James Date: Mon, 29 Dec 2025 22:36:02 +0000 Subject: [PATCH 62/64] Intel CI jobs + ifx cmake. --- .github/workflows/ci.yml | 113 +++++++++++++++++---------------------- 1 file changed, 49 insertions(+), 64 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 230a63c..c8d81b4 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -114,69 +114,54 @@ jobs: cmake --build build-tests-ifx ./build-tests-ifx/h5testrunner - - build_parallel_HDF5_with_ifx: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v4 - - - name: Install system dependencies - run: | - sudo apt-get update - sudo apt-get install -y wget cmake make gcc g++ gpg - - - name: Add Intel oneAPI repository - run: | - wget -qO- https://apt.repos.intel.com/oneapi/latest/setup.sh | sudo bash - - - name: Install Intel compilers and MPI - run: | - sudo apt-get install -y \ - intel-oneapi-compiler-fortran-2025.0.2 \ - intel-oneapi-compiler-dpcpp-cpp-2025.0.2 \ - intel-oneapi-mpi-2025.0.2 \ - intel-oneapi-mpi-devel-2025.0.2 - - - name: Load Intel oneAPI environment - shell: bash - run: | - source /opt/intel/oneapi/setvars.sh + # hpckit requires more disk space than available on GitHub runner + # build_parallel_HDF5_with_ifx: + # runs-on: ubuntu-latest + # container: + # image: intel/fortran-hpckit:latest + + # steps: + # - uses: actions/checkout@v4 + + # - name: Install system dependencies + # run: | + # sudo apt-get update + # sudo apt-get install -y wget cmake make gcc g++ gpg - - name: Install parallel HDF5 1.14.6 with IFX - shell: bash - run: | - wget -O hdf5-1.14.6.tar.gz \ - https://sourceforge.net/projects/hdf5.mirror/files/hdf5_1.14.6/hdf5-1.14.6.tar.gz/download - tar -xzf hdf5-1.14.6.tar.gz - mkdir -p build-hdf5-mpiifx - - cmake -S hdf5-1.14.6 -B build-hdf5-mpiifx \ - -DCMAKE_Fortran_COMPILER=mpiifx \ - -DCMAKE_C_COMPILER=mpiicx \ - -DBUILD_SHARED_LIBS=OFF \ - -DHDF5_BUILD_FORTRAN=ON \ - -DHDF5_ENABLE_PARALLEL=ON \ - -DHDF5_ENABLE_Z_LIB_SUPPORT=OFF \ - -DHDF5_ENABLE_SZIP_SUPPORT=OFF \ - -DCMAKE_INSTALL_PREFIX=$HOME/hdf5-mpiifx \ - - cmake --build build-hdf5-mpiifx -j - cmake --install build-hdf5-mpiifx - - - name: Build and run MPI tests with mpiifx - shell: bash - run: | - mpiifx --version - - cmake -S ./test/. -B build-tests-mpiifx \ - -DCMAKE_Fortran_COMPILER=mpiifx \ - -DCMAKE_PREFIX_PATH=$HOME/hdf5-mpiifx \ - -DMPI_VERSION=ON - cmake --build build-tests-mpiifx - - ./build-tests-mpiifx/h5testrunner - ./build-tests-mpiifx/h5testrunner_mpi - mpirun --allow-run-as-root --oversubscribe \ - -np 2 ./build-tests-mpiifx/h5testrunner_mpi + # - name: Install parallel HDF5 1.14.6 with IFX + # shell: bash + # run: | + # wget -O hdf5-1.14.6.tar.gz \ + # https://sourceforge.net/projects/hdf5.mirror/files/hdf5_1.14.6/hdf5-1.14.6.tar.gz/download + # tar -xzf hdf5-1.14.6.tar.gz + # mkdir -p build-hdf5-mpiifx + + # cmake -S hdf5-1.14.6 -B build-hdf5-mpiifx \ + # -DCMAKE_Fortran_COMPILER=mpiifx \ + # -DCMAKE_C_COMPILER=mpiicx \ + # -DBUILD_SHARED_LIBS=OFF \ + # -DHDF5_BUILD_FORTRAN=ON \ + # -DHDF5_ENABLE_PARALLEL=ON \ + # -DHDF5_ENABLE_Z_LIB_SUPPORT=OFF \ + # -DHDF5_ENABLE_SZIP_SUPPORT=OFF \ + # -DCMAKE_INSTALL_PREFIX=$HOME/hdf5-mpiifx \ + + # cmake --build build-hdf5-mpiifx -j + # cmake --install build-hdf5-mpiifx + + # - name: Build and run MPI tests with mpiifx + # shell: bash + # run: | + # mpiifx --version + + # cmake -S ./test/. -B build-tests-mpiifx \ + # -DCMAKE_Fortran_COMPILER=mpiifx \ + # -DCMAKE_PREFIX_PATH=$HOME/hdf5-mpiifx \ + # -DMPI_VERSION=ON + # cmake --build build-tests-mpiifx + + # ./build-tests-mpiifx/h5testrunner + # ./build-tests-mpiifx/h5testrunner_mpi + # mpirun --allow-run-as-root --oversubscribe \ + # -np 2 ./build-tests-mpiifx/h5testrunner_mpi \ No newline at end of file From 95b1fa2ccb9024466bff3deb4dba6b333fad9972 Mon Sep 17 00:00:00 2001 From: Alyn James Date: Mon, 29 Dec 2025 22:44:53 +0000 Subject: [PATCH 63/64] Intel CI jobs + ifx cmake. --- src/modhdf5_read.inc | 2 +- src/modhdf5_read_hyper.inc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/modhdf5_read.inc b/src/modhdf5_read.inc index fbea7b3..0ce2ad3 100644 --- a/src/modhdf5_read.inc +++ b/src/modhdf5_read.inc @@ -2,7 +2,7 @@ ! This file is distributed under the terms of the GNU General Public License. ! See the file COPYING for license details. -! can only be used in h5dataset_read() +! can only be used in readHDF5() select type(variable_to_read) type is (integer) call h5dread_f(h5_ids%dset, h5_ids%dset_type, variable_to_read, h5_ids%dims(1:r), hdferr, xfer_prp=h5_ids%dxpl) diff --git a/src/modhdf5_read_hyper.inc b/src/modhdf5_read_hyper.inc index 4038d44..1ccdb93 100644 --- a/src/modhdf5_read_hyper.inc +++ b/src/modhdf5_read_hyper.inc @@ -2,7 +2,7 @@ ! This file is distributed under the terms of the GNU General Public License. ! See the file COPYING for license details. -! can only be used in h5dataset_read() +! can only be used in readHDF5_hypersplice() select type(variable_to_read) type is (integer) call h5dread_f(hyp%dset, dset_type, variable_to_read, dims(1:r), hdferr, memspace_id, hyp%dspace, xfer_prp=hyp%dxpl) From 9dee7fc4e26616c421e3fea46cee3d784b9d3f8d Mon Sep 17 00:00:00 2001 From: Alyn James Date: Wed, 31 Dec 2025 12:33:07 +0000 Subject: [PATCH 64/64] Add further documentation to README.md and comments on the subroutines' dummy inputs and outputs (and some minor docstrings). Tidy variables used in subroutines. Reorder subroutines in modhdf5. Added version global variable to module. --- README.md | 78 +++++- src/modhdf5.f90 | 412 ++++++++++++++++---------------- src/modhdf5_attribute_read.inc | 1 - src/modhdf5_attribute_write.inc | 1 - src/modhdf5_read.inc | 8 +- src/modhdf5_read_hyper.inc | 8 +- src/modhdf5_write.inc | 8 +- src/modhdf5_write_hyper.inc | 8 +- 8 files changed, 299 insertions(+), 225 deletions(-) diff --git a/README.md b/README.md index 7b71736..bf4a91f 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,50 @@ # HDF5_Fortran_API -A Fortran library which handles the interface to HDF5 library to give simpler I/O proceedures usable within Fortran coding projects + +A Fortran library which handles the interface to HDF5 library to give simpler I/O proceedures usable within Fortran coding projects. + +The modhdf5.f90 module contains subroutines which interface with the HDF5 library so that you do not need to use it directly in your code. You only need to call upon this module to perform the I/O to the .h5 file. + +You can look at examples of how this module is used within the `./tests/testio.f90` code. + +__Author:__ Alyn D. N. James + +__Version:__ 0.1.0 + +## How to use + +To add this to your Fortran code, add this module .f90 file to the compilation (cmake, make and so on) and load the public subroutines module in your Fortran code via + +```Fortran +use modhdf5 +``` + +The .inc files will needed to be in the same directory as the .f90 file, but these will automatically be included during the compilation. (These .inc files are used to reduce the amount of repetative code.) + +This module uses macro preprocessors to be compatible with both the serial and parallel HDF5 library. However, to enable the (MPI) parallel HDF5 capabilities in modhdf5, you need to add the -DMPI_modhdf5 flag to the `make` compilation step. This is done within cmake as seen in the `Tests` section below. + +## Dependencies + +Here is the list of libraries required for the modhdf5 module (with the version it was tested with): +- HDF5 library (1.14.6) +- Fortran 2018+ (gcc 15.1.0 and ifx 2025.3.0) +- MPI (for parallel enabled version) (Openmpi 5.0.8) + +For the repository, the following additional packages (with the version it was tested with) are needed: +- cmake (3.22.1) + +## Documentation + +Within modhdf5, the public subroutines to be used in your code are given at the top of the file. All the global variables are commented, and the inputs and outputs of all of the subroutines are labelled. The subroutines are named to be self-explanatory (some have short doc-strings for clarity). ## Tests -Compile the test runner (within gnu) with +This repository uses the [naturalFRUIT v0.7.4](https://cibinjoseph.github.io/naturalFRUIT/index.html) .f90 code for constructing the test runner for testing the functionality of the code base. Credit goes to the developers for `naturalfruit.f90`. + +Please look at the `.github/workflows/ci.yml` to see how modhdf5 has been compiled in different setups. + +### Serial Tests + +Compile the test runner (within GCC+Openmpi) with ``` cmake ../ -DCMAKE_Fortran_COMPILER=mpif90 @@ -20,3 +61,36 @@ run the test suite via ``` ./h5testrunner ``` + + +### (MPI) Parallel Tests + +Compile the test runner (within GCC+Openmpi) with + +``` +cmake ../ -DCMAKE_Fortran_COMPILER=mpif90 -DMPI_VERSION=ON +``` + +For conda environment, use + +``` +cmake ../ -DCMAKE_Fortran_COMPILER=mpif90 -DMPI_VERSION=ON -DCMAKE_PREFIX_PATH=$CONDA_PREFIX +``` + +run the test suite via + +``` +mpirun -np 2 ./h5testrunner_mpi +``` + +## Developer notes + +This modhdf5 has been written for HDF5 version 1.x.y. The additional functionality of HDF5 2.x.y has not been included. + +modhdf5 uses polymorphic, assumed-rank variable inputs to keep the interface generic. The variable rank and type are resolved within the read/write subroutines to interface with the HDF5 library Fortran APIs. modhdf5 currently sticks to the standard H5 native types available within the HDF5 library. These are: +- H5T_NATIVE_INTEGER +- H5T_NATIVE_REAL +- H5T_NATIVE_DOUBLE +- H5T_FORTRAN_S1 (modhdf5 extends this to a custom n-sized character type to handle aribitary sized character variable.) + +It is suggested for users to resolve their data types to conform with these native types and add the Fortran data type it was originally to the `fortran_type` attribute (via `fdtype_name` subroutine input/output) so that other users know its origin. \ No newline at end of file diff --git a/src/modhdf5.f90 b/src/modhdf5.f90 index ec2ed36..dadd037 100644 --- a/src/modhdf5.f90 +++ b/src/modhdf5.f90 @@ -19,47 +19,49 @@ module modhdf5 ! modHDF5 variables ! !HDF5 extension character(256), public :: h5filext='.h5' +!HDF5 extension +character(256), public :: modhdf5_version='0.1.0' !user input to use the hdf5 files logical, public :: use_hdf5=.false. !h5 compression level integer, private :: compression_level = 4 type h5_ids_t -!hyperslab/hypersplice property list ids -integer(HID_T) :: plist = -1 -!hyperslab/hypersplice dataset ids -integer(HID_T) :: dset = -1 -!hyperslab/hypersplice dataspace ids -integer(HID_T) :: dspace = -1 -!dimensions of the hyperspliced array -integer(HSIZE_T) :: dims(7) -!used for h5 collective mpi read/write (when mpi_h5=.true.) -integer(HID_T) :: dxpl = -1 -!h5 compatible data type for variable to/from h5 file -integer(HID_T) :: dset_type = -1 + !hyperslab/hypersplice property list ids + integer(HID_T) :: plist = -1 + !hyperslab/hypersplice dataset ids + integer(HID_T) :: dset = -1 + !hyperslab/hypersplice dataspace ids + integer(HID_T) :: dspace = -1 + !dimensions of the hyperspliced array + integer(HSIZE_T) :: dims(7) + !used for h5 collective mpi read/write (when mpi_h5=.true.) + integer(HID_T) :: dxpl = -1 + !h5 compatible data type for variable to/from h5 file + integer(HID_T) :: dset_type = -1 end type h5_ids_t ! derived type containing the h5 file ids for each file in use type h5_file_ids_t -!HDF5 file handle -integer(HID_T) :: fid -!h5 mpicheck - set to false by default -logical :: mpi_h5 = .false. -!h5 mpicomm copy -integer :: mpicomm_h5 = -1 -!hyperslab/hypersplice ids -type(h5_ids_t) :: hyp(10) + !HDF5 file handle + integer(HID_T) :: fid + !h5 mpicheck - set to false by default + logical :: mpi_h5 = .false. + !h5 mpicomm copy + integer :: mpicomm_h5 = -1 + !hyperslab/hypersplice ids + type(h5_ids_t) :: hyp(10) end type h5_file_ids_t type(h5_file_ids_t), private, target :: h5_fids(10) ! derived type containing the h5 file ids for each file in use type h5_group_ids_t -!HDF5 file index for h5_file_ids_t -integer :: file_idx -!h5 group id -integer(HID_T) :: gid -!hyperslab/hypersplice ids -type(h5_ids_t) :: hyp(10) + !HDF5 file index for h5_file_ids_t + integer :: file_idx + !h5 group id + integer(HID_T) :: gid + !hyperslab/hypersplice ids + type(h5_ids_t) :: hyp(10) end type h5_group_ids_t type(h5_group_ids_t), private, target :: h5_gids(10) @@ -67,11 +69,11 @@ module modhdf5 subroutine open_hdf5_file(fid_idx,filename,writing,mpi_file,mpicom) -character(len=*), intent(in) :: filename -integer, intent(in) :: fid_idx -logical, intent(in) :: writing -logical, optional, intent(in) :: mpi_file -integer, optional, intent(in) :: mpicom +character(len=*), intent(in) :: filename !prefix of .h5 file +integer, intent(in) :: fid_idx !file index to use this file +logical, intent(in) :: writing !writing (.true.) or reading (.false.) file +logical, optional, intent(in) :: mpi_file !.true. if open file in mpi mode +integer, optional, intent(in) :: mpicom !mpi communicator integer hdferr @@ -94,15 +96,16 @@ end subroutine open_hdf5_file subroutine mpi_open_hdf5_file(fid_idx,filename,writing,mpicom) + ! use the mpi library within mpi HDF5 enabled #ifdef MPI_modhdf5 use mpi, only: MPI_COMM_NULL, MPI_INFO_NULL #endif -character(len=*), intent(in) :: filename -integer, intent(in) :: fid_idx -logical, intent(in) :: writing -integer, intent(in) :: mpicom +character(len=*), intent(in) :: filename !prefix of .h5 file +integer, intent(in) :: fid_idx !file index to use this file +logical, intent(in) :: writing !writing (.true.) or reading (.false.) file +integer, intent(in) :: mpicom !mpi communicator integer hdferr type(h5_ids_t) :: h5_id @@ -139,8 +142,8 @@ end subroutine mpi_open_hdf5_file subroutine create_hdf5_group(fid_idx,gid_idx,groupname) -character(len=*), intent(in) :: groupname -integer, intent(in) :: fid_idx, gid_idx +character(len=*), intent(in) :: groupname !h5 group name +integer, intent(in) :: fid_idx, gid_idx !file and group indices (used to associate group to file) integer hdferr @@ -152,8 +155,8 @@ end subroutine create_hdf5_group subroutine open_hdf5_group(fid_idx,gid_idx,groupname) -character(len=*), intent(in) :: groupname -integer, intent(in) :: fid_idx, gid_idx +character(len=*), intent(in) :: groupname !h5 group name +integer, intent(in) :: fid_idx, gid_idx !file and group indices (used to associate group to file) integer hdferr @@ -165,7 +168,7 @@ end subroutine open_hdf5_group subroutine close_hdf5_group(gid_idx) -integer, intent(in) :: gid_idx +integer, intent(in) :: gid_idx !group index integer hdferr @@ -176,7 +179,7 @@ end subroutine close_hdf5_group subroutine close_hdf5_file(fid_idx) -integer, intent(in) :: fid_idx +integer, intent(in) :: fid_idx !file index integer hdferr @@ -191,6 +194,7 @@ end subroutine close_hdf5_file subroutine set_dxpl_id(dxpl_id,using_mpi,mpi_independent) +! Set dxpl id for mpi handling (independent or collective modes) within the .h5 file integer(HID_T), intent(inout) :: dxpl_id logical, intent(in) :: using_mpi, mpi_independent @@ -215,9 +219,9 @@ end subroutine set_dxpl_id subroutine get_var_dims(variable,rnk,dims) -class(*), intent(in), dimension(..) :: variable -integer, intent(inout) :: rnk -integer(HSIZE_T), intent(inout) :: dims(7) +class(*), intent(in), dimension(..) :: variable !variable of interest +integer, intent(inout) :: rnk !rank of variable +integer(HSIZE_T), intent(inout) :: dims(7) !dimension of each rank integer i @@ -235,10 +239,10 @@ end subroutine get_var_dims subroutine get_file_or_group_id(to_group,id_idx,file_or_group_id,using_mpi) -logical, intent(in) :: to_group !logical for distinguishing whether to write to group or not -integer, intent(in) :: id_idx !index for file_id/group_id -integer(HID_T), intent(out) :: file_or_group_id -logical, intent(out) :: using_mpi +logical, intent(in) :: to_group !logical for distinguishing whether to write to group or file +integer, intent(in) :: id_idx !index for file/group +integer(HID_T), intent(out) :: file_or_group_id !h5 file/group id +logical, intent(out) :: using_mpi !.true. if file is using mpi mode if (to_group) then file_or_group_id = h5_gids(id_idx)%gid @@ -253,8 +257,8 @@ end subroutine get_file_or_group_id subroutine get_file_or_group_hyp(to_group,id_idx,hyp_id_idx,hyp) -logical, intent(in) :: to_group !logical for distinguishing whether to write to group or not -integer, intent(in) :: id_idx, hyp_id_idx +logical, intent(in) :: to_group !logical for whether to read/write to group or not +integer, intent(in) :: id_idx, hyp_id_idx !group/file index and hypersplice/hyperslab index type(h5_ids_t), intent(inout), pointer :: hyp !hypersplice/hyperslab datatype if (to_group) then @@ -267,9 +271,9 @@ end subroutine get_file_or_group_hyp subroutine get_array_dset_type(variable,dset_type,custom_type) -class(*), intent(in), dimension(..) :: variable -integer(HID_T), intent(out) :: dset_type -logical, intent(out) :: custom_type +class(*), intent(in), dimension(..) :: variable !variable of interest +integer(HID_T), intent(out) :: dset_type !corresponding h5 dataset type for I/O +logical, intent(out) :: custom_type !.true. if dset_type is a custom type select rank(variable) rank(0); call get_dset_type(variable,dset_type,custom_type) @@ -286,9 +290,10 @@ end subroutine get_array_dset_type subroutine get_dset_type(variable,dset_type,custom_type) -class(*), intent(in) :: variable -integer(HID_T), intent(out) :: dset_type -logical, intent(out) :: custom_type + +class(*), intent(in) :: variable !variable of interest +integer(HID_T), intent(out) :: dset_type !corresponding h5 dataset type for I/O +logical, intent(out) :: custom_type !.true. if dset_type is a custom type custom_type=.false. @@ -303,9 +308,10 @@ end subroutine get_dset_type subroutine create_char_dset_type(variable,char_type,custom_type) -character(*), intent(in) :: variable -integer(HID_T), intent(out) :: char_type -logical, intent(out) :: custom_type + +character(*), intent(in) :: variable !variable of interest +integer(HID_T), intent(out) :: char_type !corresponding custom h5 character type for I/O +logical, intent(out) :: custom_type !.true. if dset_type is a custom type integer :: hdferr @@ -317,51 +323,51 @@ subroutine create_char_dset_type(variable,char_type,custom_type) subroutine init_hyperspliced_array(id_idx,dataset_name,variable,write_to_group,hyp_id_idx,n_hyp_dim,fdtype_name) +! Initiate the hypersplice/hyperslab array for writing -integer, intent(in) :: id_idx -character(len=*), intent(in) :: dataset_name -class(*), intent(in), dimension(..) :: variable -logical, intent(in) :: write_to_group -integer, intent(in) :: hyp_id_idx,n_hyp_dim -character(len=*), optional, intent(in) :: fdtype_name +integer, intent(in) :: id_idx !index for file/group +character(len=*), intent(in) :: dataset_name !name of h5 dataset +class(*), intent(in), dimension(..) :: variable !variable slice to write +logical, intent(in) :: write_to_group !.true. to write to group, otherwise to file +integer, intent(in) :: hyp_id_idx,n_hyp_dim !hypersplice/slab index and hyper dimension size (for last rank not in slice) +character(len=*), optional, intent(in) :: fdtype_name !variable datatype name within dataset attribute integer(HID_T) :: dspace_id, dset_id, file_or_group_id, dset_type -integer :: hdferr, i, r +integer :: hdferr, i, rnk integer(HSIZE_T) :: dims(7), chunk_dims(7) logical custom_type, using_mpi type(h5_ids_t), pointer :: hyp -r = rank(variable) +rnk = rank(variable) -if ((r < 0) .or. (r > 6)) then +if ((rnk < 0) .or. (rnk > 6)) then write(*,*) "(init_hyperspliced_array): input variable has invalid rank. Only a rank between 0 and 6 can be used." stop "Stopping." end if call get_file_or_group_id(write_to_group,id_idx,file_or_group_id,using_mpi) call get_file_or_group_hyp(write_to_group,id_idx,hyp_id_idx,hyp) -call get_var_dims(variable,r,hyp%dims) +call get_var_dims(variable,rnk,hyp%dims) call get_array_dset_type(variable,hyp%dset_type,custom_type) call set_dxpl_id(hyp%dxpl,using_mpi,mpi_independent=.false.) chunk_dims = hyp%dims -r = r + 1 -hyp%dims(r) = n_hyp_dim -chunk_dims(r) = 1 +rnk = rnk + 1 +hyp%dims(rnk) = n_hyp_dim +chunk_dims(rnk) = 1 ! Create dataspace for whole dataset -call h5screate_simple_f(r, hyp%dims(1:r), hyp%dspace, hdferr) +call h5screate_simple_f(rnk, hyp%dims(1:rnk), hyp%dspace, hdferr) ! Create property list for chunking, and then compression call h5pcreate_f(H5P_DATASET_CREATE_F, hyp%plist, hdferr) -call h5pset_chunk_f(hyp%plist, r, chunk_dims, hdferr) ! Set chunking +call h5pset_chunk_f(hyp%plist, rnk, chunk_dims, hdferr) ! Set chunking call h5pset_deflate_f(hyp%plist, compression_level, hdferr) ! Enable compression (GZIP level 4) call h5pset_shuffle_f(hyp%plist, hdferr) ! Enable shuffle filter (best compression) ! Create dataset with chunking + compression -call h5dcreate_f(file_or_group_id, trim(dataset_name), hyp%dset_type, & - hyp%dspace, hyp%dset, hdferr, hyp%plist) +call h5dcreate_f(file_or_group_id, trim(dataset_name), hyp%dset_type, hyp%dspace, hyp%dset, hdferr, hyp%plist) if (present(fdtype_name)) call write_attributeHDF5(id_idx,dataset_name,"fortran_type",fdtype_name,write_to_group,hyp%dset) @@ -369,31 +375,32 @@ end subroutine init_hyperspliced_array subroutine open_hyperspliced_array(id_idx,dataset_name,variable,read_group,hyp_id_idx,fdtype_name) +! Open the hypersplice/hyperslab array for reading -integer, intent(in) :: id_idx -character(len=*), intent(in) :: dataset_name -class(*), intent(in), dimension(..) :: variable -logical, intent(in) :: read_group -integer, intent(in) :: hyp_id_idx -character(len=*), optional, intent(inout) :: fdtype_name +integer, intent(in) :: id_idx !index for file/group +character(len=*), intent(in) :: dataset_name !name of h5 dataset +class(*), intent(in), dimension(..) :: variable !variable slice/slab to read +logical, intent(in) :: read_group !.true. to read from group, otherwise from file +integer, intent(in) :: hyp_id_idx !hypersplice/slab index +character(len=*), optional, intent(inout) :: fdtype_name !datatype name for corresponding attribute integer(HID_T) :: dspace_id, dset_id, file_or_group_id, dset_type -integer :: hdferr, i, r +integer :: hdferr, i, rnk integer(HSIZE_T) :: dims(7), chunk_dims(7) logical custom_type, using_mpi type(h5_ids_t), pointer :: hyp -r = rank(variable) +rnk = rank(variable) -if ((r < 0) .or. (r > 6)) then +if ((rnk < 0) .or. (rnk > 6)) then write(*,*) "(init_hyperspliced_array): input variable has invalid rank. Only a rank between 0 and 6 can be used." stop "Stopping." end if call get_file_or_group_id(read_group,id_idx,file_or_group_id,using_mpi) call get_file_or_group_hyp(read_group,id_idx,hyp_id_idx,hyp) -call get_var_dims(variable,r,hyp%dims) +call get_var_dims(variable,rnk,hyp%dims) call get_array_dset_type(variable,hyp%dset_type,custom_type) call set_dxpl_id(hyp%dxpl,using_mpi,mpi_independent=.true.) @@ -407,8 +414,8 @@ end subroutine open_hyperspliced_array subroutine close_entire_hyperspliced_dataset(id_idx,hyp_id_idx,in_group) -integer, intent(in) :: id_idx, hyp_id_idx -logical, intent(in) :: in_group +integer, intent(in) :: id_idx, hyp_id_idx !index for file/group and hypersplice/slab index +logical, intent(in) :: in_group !.true. if variable is in group integer :: hdferr type(h5_ids_t) :: reset_hyp @@ -425,9 +432,10 @@ end subroutine close_entire_hyperspliced_dataset subroutine config_hyper_dims(rnk,nslice,hyp_idx,dims,offset) -integer, intent(inout) :: rnk -integer, intent(in) :: nslice, hyp_idx -integer(HSIZE_T), intent(inout) :: dims(7), offset(7) + +integer, intent(inout) :: rnk !variable rank +integer, intent(in) :: nslice, hyp_idx !number of hyper slices and hypersplice/slab index +integer(HSIZE_T), intent(inout) :: dims(7), offset(7) !variable dimensions and offset position for I/O offset(:) = 0 if (nslice == 1) then !hypersplice @@ -437,24 +445,20 @@ subroutine config_hyper_dims(rnk,nslice,hyp_idx,dims,offset) else if (nslice >= 1) then !hyperslab dims(rnk) = nslice offset(rnk) = hyp_idx - 1 -else !dummy write +else !dummy write dims(:) = 0 end if end subroutine config_hyper_dims -!-----------------------------! -! Writing Subroutines ! -!-----------------------------! - - subroutine write_attributeHDF5(id_idx,dataset_name,attr_name,attr,write_group,dset_id) +! Write the attribute to h5 dataset -integer, intent(in) :: id_idx -character(len=*), intent(in) :: dataset_name,attr_name -class(*), intent(in), dimension(..) :: attr -logical, intent(in) :: write_group -integer(HID_T), optional, intent(in) :: dset_id +integer, intent(in) :: id_idx !index for file/group +character(len=*), intent(in) :: dataset_name,attr_name !h5 dataset and attribute name +class(*), intent(in), dimension(..) :: attr !attribute of interest +logical, intent(in) :: write_group !.true. to write to group, otherwise to file +integer(HID_T), optional, intent(in) :: dset_id !corresponding h5 dataset id integer(HID_T) :: dset_id_, space_id, file_or_group_id, type_id, attr_id integer(HSIZE_T) :: dims(7) @@ -501,85 +505,34 @@ subroutine write_attributeHDF5(id_idx,dataset_name,attr_name,attr,write_group,ds end subroutine -subroutine read_attributeHDF5(id_idx,dataset_name,attr_name,attr,read_group,dset_id) - -integer, intent(in) :: id_idx -character(len=*), intent(in) :: dataset_name,attr_name -class(*), intent(inout), dimension(..) :: attr -logical, intent(in) :: read_group -integer(HID_T), optional, intent(in) :: dset_id - -integer(HID_T) :: dset_id_, file_or_group_id, type_id, attr_id -integer(HSIZE_T) :: dims(7) -integer :: hdferr, rnk -logical :: custom_type,using_mpi - -rnk = rank(attr) -call get_var_dims(attr,rnk,dims) -call get_file_or_group_id(read_group,id_idx,file_or_group_id,using_mpi) -call get_array_dset_type(attr,type_id,custom_type) - -if(.not. present(dset_id)) then - call h5dopen_f(file_or_group_id, trim(dataset_name), dset_id_, hdferr) -else - dset_id_ = dset_id -end if -! Get read attribute -call h5aopen_f(dset_id_, trim(attr_name), attr_id, hdferr) - -select rank(attr) -rank(0) -#include "modhdf5_attribute_read.inc" -rank(1) -#include "modhdf5_attribute_read.inc" -rank(2) -#include "modhdf5_attribute_read.inc" -rank(3) -#include "modhdf5_attribute_read.inc" -rank(4) -#include "modhdf5_attribute_read.inc" -rank(5) -#include "modhdf5_attribute_read.inc" -rank(6) -#include "modhdf5_attribute_read.inc" -rank(7) -#include "modhdf5_attribute_read.inc" -end select - -call h5aclose_f(attr_id, hdferr) -if (custom_type) call h5tclose_f(type_id, hdferr) !close custom dset_type -if(.not. present(dset_id)) call h5dclose_f(dset_id_, hdferr) - -end subroutine read_attributeHDF5 - - subroutine writeHDF5(id_idx,dataset_name,variable_to_write,write_to_group,fdtype_name) +! Write the variable_to_write to h5 dataset -integer, intent(in) :: id_idx -character(len=*), intent(in) :: dataset_name -class(*), intent(in), dimension(..) :: variable_to_write -logical, intent(in) :: write_to_group -character(len=*), optional, intent(in) :: fdtype_name +integer, intent(in) :: id_idx !index for file/group +character(len=*), intent(in) :: dataset_name !h5 dataset name +class(*), intent(in), dimension(..) :: variable_to_write !variable of interest +logical, intent(in) :: write_to_group !.true. to write to group, otherwise to file +character(len=*), optional, intent(in) :: fdtype_name !variable datatype name within dataset attribute integer(HID_T) :: file_or_group_id -integer :: hdferr, i, r +integer :: hdferr, rnk logical custom_type,using_mpi type(h5_ids_t) :: h5_ids -r = rank(variable_to_write) +rnk = rank(variable_to_write) -if ((r < 0) .or. (r > 7)) then +if ((rnk < 0) .or. (rnk > 7)) then write(*,*) "(writeHDF5): input variable to write has invalid rank. Only a rank between 0 and 7 can be used." stop "Stopping." end if -call get_var_dims(variable_to_write,r,h5_ids%dims) +call get_var_dims(variable_to_write,rnk,h5_ids%dims) call get_array_dset_type(variable_to_write,h5_ids%dset_type,custom_type) call get_file_or_group_id(write_to_group,id_idx,file_or_group_id,using_mpi) call set_dxpl_id(h5_ids%dxpl,using_mpi,mpi_independent=.true.) ! Create dataspace (within group or not) for integer and save within that space -call h5screate_simple_f(r, h5_ids%dims(1:r), h5_ids%dspace, hdferr) +call h5screate_simple_f(rnk, h5_ids%dims(1:rnk), h5_ids%dspace, hdferr) call h5dcreate_f(file_or_group_id, trim(dataset_name), h5_ids%dset_type, h5_ids%dspace, h5_ids%dset, hdferr) select rank(variable_to_write) @@ -612,33 +565,33 @@ end subroutine writeHDF5 subroutine writeHDF5_hypersplice(id_idx,dataset_name,variable_to_write,write_to_group,hyp_id_idx,hyp_idx,nslice) +! Write the hypersplice/hyperslab array to h5 dataset -integer, intent(in) :: id_idx !index for file_id/group_id -character(len=*), intent(in) :: dataset_name !name of dataset in h5 file -class(*), intent(in), dimension(..) :: variable_to_write !value to be written -logical, intent(in) :: write_to_group !logical for distinguishing whether to write to group or not -integer, intent(in) :: hyp_id_idx -integer, intent(in) :: hyp_idx -integer, intent(in) :: nslice !>= 1 to write slice/slab, else do not write data +integer, intent(in) :: id_idx !index for file/group +character(len=*), intent(in) :: dataset_name !name of h5 dataset +class(*), intent(in), dimension(..) :: variable_to_write !variable of interest +logical, intent(in) :: write_to_group !.true. to write to group, otherwise to file +integer, intent(in) :: hyp_id_idx, hyp_idx !hypersplice/slab index and hyper array index (for last rank not in slice) +integer, intent(in) :: nslice !number of hyper slices (> 1 to write slab, = 1 for slice, else do not write data) integer(HID_T) :: file_or_group_id, dset_type, memspace_id -integer :: hdferr, i, r +integer :: hdferr, rnk integer(HSIZE_T) :: dims(7), offset(7) logical :: dset_exists, custom_type,using_mpi type(h5_ids_t), pointer :: hyp -r = rank(variable_to_write) +rnk = rank(variable_to_write) -if ((r < 0) .or. (r > 6)) then +if ((rnk < 0) .or. (rnk > 6)) then write(*,*) "(writeHDF5_hypersplice): input variable to write has invalid rank. Only a rank between 0 and 6 can be used." stop "Stopping." end if call get_file_or_group_id(write_to_group,id_idx,file_or_group_id,using_mpi) call get_file_or_group_hyp(write_to_group,id_idx,hyp_id_idx,hyp) -call get_var_dims(variable_to_write,r,dims) +call get_var_dims(variable_to_write,rnk,dims) call get_array_dset_type(variable_to_write,dset_type,custom_type) -call config_hyper_dims(r,nslice,hyp_idx,dims,offset) +call config_hyper_dims(rnk,nslice,hyp_idx,dims,offset) ! Check if dataset already exists call h5lexists_f(file_or_group_id, trim(dataset_name), dset_exists, hdferr) @@ -647,8 +600,8 @@ subroutine writeHDF5_hypersplice(id_idx,dataset_name,variable_to_write,write_to_ stop "Stopping." end if -call h5sselect_hyperslab_f(hyp%dspace, H5S_SELECT_SET_F, offset(1:r), dims(1:r), hdferr) -call h5screate_simple_f(r, dims(1:r), memspace_id, hdferr) +call h5sselect_hyperslab_f(hyp%dspace, H5S_SELECT_SET_F, offset(1:rnk), dims(1:rnk), hdferr) +call h5screate_simple_f(rnk, dims(1:rnk), memspace_id, hdferr) select rank(variable_to_write) rank(0) @@ -675,33 +628,82 @@ subroutine writeHDF5_hypersplice(id_idx,dataset_name,variable_to_write,write_to_ end subroutine writeHDF5_hypersplice -!-----------------------------! -! Reading Subroutines ! -!-----------------------------! +subroutine read_attributeHDF5(id_idx,dataset_name,attr_name,attr,read_group,dset_id) +! Read the attribute from h5 dataset + +integer, intent(in) :: id_idx !index for file/group +character(len=*), intent(in) :: dataset_name,attr_name !h5 dataset and attribute name +class(*), intent(inout), dimension(..) :: attr !attribute of interest +logical, intent(in) :: read_group !.true. to read from group, otherwise from file +integer(HID_T), optional, intent(in) :: dset_id !corresponding h5 dataset id + +integer(HID_T) :: dset_id_, file_or_group_id, type_id, attr_id +integer(HSIZE_T) :: dims(7) +integer :: hdferr, rnk +logical :: custom_type,using_mpi + +rnk = rank(attr) +call get_var_dims(attr,rnk,dims) +call get_file_or_group_id(read_group,id_idx,file_or_group_id,using_mpi) +call get_array_dset_type(attr,type_id,custom_type) + +if(.not. present(dset_id)) then + call h5dopen_f(file_or_group_id, trim(dataset_name), dset_id_, hdferr) +else + dset_id_ = dset_id +end if +! Get read attribute +call h5aopen_f(dset_id_, trim(attr_name), attr_id, hdferr) + +select rank(attr) +rank(0) +#include "modhdf5_attribute_read.inc" +rank(1) +#include "modhdf5_attribute_read.inc" +rank(2) +#include "modhdf5_attribute_read.inc" +rank(3) +#include "modhdf5_attribute_read.inc" +rank(4) +#include "modhdf5_attribute_read.inc" +rank(5) +#include "modhdf5_attribute_read.inc" +rank(6) +#include "modhdf5_attribute_read.inc" +rank(7) +#include "modhdf5_attribute_read.inc" +end select + +call h5aclose_f(attr_id, hdferr) +if (custom_type) call h5tclose_f(type_id, hdferr) !close custom dset_type +if(.not. present(dset_id)) call h5dclose_f(dset_id_, hdferr) + +end subroutine read_attributeHDF5 subroutine readHDF5(id_idx,dataset_name,variable_to_read,read_group,fdtype_name) +! Read the variable_to_read from h5 dataset -integer, intent(in) :: id_idx -character(len=*), intent(in) :: dataset_name -class(*), intent(inout), dimension(..) :: variable_to_read -logical, intent(in) :: read_group -character(len=*), optional, intent(inout) :: fdtype_name +integer, intent(in) :: id_idx !index for file/group +character(len=*), intent(in) :: dataset_name !h5 dataset name +class(*), intent(inout), dimension(..) :: variable_to_read !variable of interest +logical, intent(in) :: read_group !.true. to read from group, otherwise from file +character(len=*), optional, intent(inout) :: fdtype_name !variable datatype name within dataset attribute integer(HID_T) :: file_or_group_id -integer :: hdferr, i, r +integer :: hdferr, rnk logical custom_type,using_mpi type(h5_ids_t) :: h5_ids -r = rank(variable_to_read) +rnk = rank(variable_to_read) -if ((r < 0) .or. (r > 7)) then +if ((rnk < 0) .or. (rnk > 7)) then write(*,*) "(readHDF5): input variable to read has invalid rank. Only a rank between 0 and 7 can be used." stop "Stopping." end if call get_file_or_group_id(read_group,id_idx,file_or_group_id,using_mpi) -call get_var_dims(variable_to_read,r,h5_ids%dims) +call get_var_dims(variable_to_read,rnk,h5_ids%dims) call get_array_dset_type(variable_to_read,h5_ids%dset_type,custom_type) call set_dxpl_id(h5_ids%dxpl,using_mpi,mpi_independent=.true.) @@ -736,37 +738,37 @@ end subroutine readHDF5 subroutine readHDF5_hypersplice(id_idx,dataset_name,variable_to_read,read_group,hyp_id_idx,hyp_idx,nslice) +! Read the hypersplice/hyperslab array from h5 dataset -integer, intent(in) :: id_idx -character(len=*), intent(in) :: dataset_name -class(*), intent(inout), dimension(..) :: variable_to_read -logical, intent(in) :: read_group -integer, intent(in) :: hyp_id_idx -integer, intent(in) :: hyp_idx -integer, intent(in) :: nslice !>= 1 to write slice/slab, else do not write data +integer, intent(in) :: id_idx !index for file/group +character(len=*), intent(in) :: dataset_name !name of h5 dataset +class(*), intent(inout), dimension(..) :: variable_to_read !variable of interest +logical, intent(in) :: read_group !.true. to read from group, otherwise from file +integer, intent(in) :: hyp_id_idx, hyp_idx !hypersplice/slab index and hyper array index (for last rank not in slice) +integer, intent(in) :: nslice !number of hyper slices (> 1 to read slab, = 1 for slice, else do not read data) integer(HID_T) :: file_or_group_id, dset_type, memspace_id, filespace_id -integer :: hdferr, i, r +integer :: hdferr, rnk integer(HSIZE_T) :: dims(7), offset(7) logical custom_type,using_mpi type(h5_ids_t), pointer :: hyp -r = rank(variable_to_read) +rnk = rank(variable_to_read) -if ((r < 0) .and. (r > 6)) then +if ((rnk < 0) .and. (rnk > 6)) then write(*,*) "(readHDF5_hypersplice): input variable to read has invalid rank. Only a rank between 0 and 6 can be used." stop "Stopping." end if call get_file_or_group_id(read_group,id_idx,file_or_group_id,using_mpi) call get_file_or_group_hyp(read_group,id_idx,hyp_id_idx,hyp) -call get_var_dims(variable_to_read,r,dims) +call get_var_dims(variable_to_read,rnk,dims) call get_array_dset_type(variable_to_read,dset_type,custom_type) -call config_hyper_dims(r,nslice,hyp_idx,dims,offset) +call config_hyper_dims(rnk,nslice,hyp_idx,dims,offset) -call h5sselect_hyperslab_f(hyp%dspace, H5S_SELECT_SET_F, offset(1:r), dims(1:r), hdferr) -if (nslice == 1) r = r - 1 !hypersplice -call h5screate_simple_f(r, dims(1:r), memspace_id, hdferr) +call h5sselect_hyperslab_f(hyp%dspace, H5S_SELECT_SET_F, offset(1:rnk), dims(1:rnk), hdferr) +if (nslice == 1) rnk = rnk - 1 !hypersplice +call h5screate_simple_f(rnk, dims(1:rnk), memspace_id, hdferr) select rank(variable_to_read) rank(0) diff --git a/src/modhdf5_attribute_read.inc b/src/modhdf5_attribute_read.inc index 0f8e3ec..f03e666 100644 --- a/src/modhdf5_attribute_read.inc +++ b/src/modhdf5_attribute_read.inc @@ -3,7 +3,6 @@ ! See the file COPYING for license details. ! can only be used in read_attributeHDF5() -rnk = rank(attr) select type(attr) type is (integer) call h5aread_f(attr_id, type_id, attr, dims(1:rnk), hdferr) diff --git a/src/modhdf5_attribute_write.inc b/src/modhdf5_attribute_write.inc index c88b0e3..3d84c16 100644 --- a/src/modhdf5_attribute_write.inc +++ b/src/modhdf5_attribute_write.inc @@ -3,7 +3,6 @@ ! See the file COPYING for license details. ! can only be used in write_attributeHDF5() -rnk = rank(attr) select type(attr) type is (integer) call h5awrite_f(attr_id, type_id, attr, dims(1:rnk), hdferr) diff --git a/src/modhdf5_read.inc b/src/modhdf5_read.inc index 0ce2ad3..c31d863 100644 --- a/src/modhdf5_read.inc +++ b/src/modhdf5_read.inc @@ -5,11 +5,11 @@ ! can only be used in readHDF5() select type(variable_to_read) type is (integer) - call h5dread_f(h5_ids%dset, h5_ids%dset_type, variable_to_read, h5_ids%dims(1:r), hdferr, xfer_prp=h5_ids%dxpl) + call h5dread_f(h5_ids%dset, h5_ids%dset_type, variable_to_read, h5_ids%dims(1:rnk), hdferr, xfer_prp=h5_ids%dxpl) type is (real) - call h5dread_f(h5_ids%dset, h5_ids%dset_type, variable_to_read, h5_ids%dims(1:r), hdferr, xfer_prp=h5_ids%dxpl) + call h5dread_f(h5_ids%dset, h5_ids%dset_type, variable_to_read, h5_ids%dims(1:rnk), hdferr, xfer_prp=h5_ids%dxpl) type is (real(8)) - call h5dread_f(h5_ids%dset, h5_ids%dset_type, variable_to_read, h5_ids%dims(1:r), hdferr, xfer_prp=h5_ids%dxpl) + call h5dread_f(h5_ids%dset, h5_ids%dset_type, variable_to_read, h5_ids%dims(1:rnk), hdferr, xfer_prp=h5_ids%dxpl) type is (character(*)) - call h5dread_f(h5_ids%dset, h5_ids%dset_type, variable_to_read, h5_ids%dims(1:r), hdferr, xfer_prp=h5_ids%dxpl) + call h5dread_f(h5_ids%dset, h5_ids%dset_type, variable_to_read, h5_ids%dims(1:rnk), hdferr, xfer_prp=h5_ids%dxpl) end select \ No newline at end of file diff --git a/src/modhdf5_read_hyper.inc b/src/modhdf5_read_hyper.inc index 1ccdb93..55efc63 100644 --- a/src/modhdf5_read_hyper.inc +++ b/src/modhdf5_read_hyper.inc @@ -5,11 +5,11 @@ ! can only be used in readHDF5_hypersplice() select type(variable_to_read) type is (integer) - call h5dread_f(hyp%dset, dset_type, variable_to_read, dims(1:r), hdferr, memspace_id, hyp%dspace, xfer_prp=hyp%dxpl) + call h5dread_f(hyp%dset, dset_type, variable_to_read, dims(1:rnk), hdferr, memspace_id, hyp%dspace, xfer_prp=hyp%dxpl) type is (real) - call h5dread_f(hyp%dset, dset_type, variable_to_read, dims(1:r), hdferr, memspace_id, hyp%dspace, xfer_prp=hyp%dxpl) + call h5dread_f(hyp%dset, dset_type, variable_to_read, dims(1:rnk), hdferr, memspace_id, hyp%dspace, xfer_prp=hyp%dxpl) type is (real(8)) - call h5dread_f(hyp%dset, dset_type, variable_to_read, dims(1:r), hdferr, memspace_id, hyp%dspace, xfer_prp=hyp%dxpl) + call h5dread_f(hyp%dset, dset_type, variable_to_read, dims(1:rnk), hdferr, memspace_id, hyp%dspace, xfer_prp=hyp%dxpl) type is (character(*)) - call h5dread_f(hyp%dset, dset_type, variable_to_read, dims(1:r), hdferr, memspace_id, hyp%dspace, xfer_prp=hyp%dxpl) + call h5dread_f(hyp%dset, dset_type, variable_to_read, dims(1:rnk), hdferr, memspace_id, hyp%dspace, xfer_prp=hyp%dxpl) end select \ No newline at end of file diff --git a/src/modhdf5_write.inc b/src/modhdf5_write.inc index aeb9faa..7d6ff74 100644 --- a/src/modhdf5_write.inc +++ b/src/modhdf5_write.inc @@ -5,11 +5,11 @@ ! can only be used in writeHDF5() select type(variable_to_write) type is (integer) - call h5dwrite_f(h5_ids%dset, h5_ids%dset_type, variable_to_write, h5_ids%dims(1:r), hdferr, xfer_prp=h5_ids%dxpl) + call h5dwrite_f(h5_ids%dset, h5_ids%dset_type, variable_to_write, h5_ids%dims(1:rnk), hdferr, xfer_prp=h5_ids%dxpl) type is (real) - call h5dwrite_f(h5_ids%dset, h5_ids%dset_type, variable_to_write, h5_ids%dims(1:r), hdferr, xfer_prp=h5_ids%dxpl) + call h5dwrite_f(h5_ids%dset, h5_ids%dset_type, variable_to_write, h5_ids%dims(1:rnk), hdferr, xfer_prp=h5_ids%dxpl) type is (real(8)) - call h5dwrite_f(h5_ids%dset, h5_ids%dset_type, variable_to_write, h5_ids%dims(1:r), hdferr, xfer_prp=h5_ids%dxpl) + call h5dwrite_f(h5_ids%dset, h5_ids%dset_type, variable_to_write, h5_ids%dims(1:rnk), hdferr, xfer_prp=h5_ids%dxpl) type is (character(*)) - call h5dwrite_f(h5_ids%dset, h5_ids%dset_type, variable_to_write, h5_ids%dims(1:r), hdferr, xfer_prp=h5_ids%dxpl) + call h5dwrite_f(h5_ids%dset, h5_ids%dset_type, variable_to_write, h5_ids%dims(1:rnk), hdferr, xfer_prp=h5_ids%dxpl) end select \ No newline at end of file diff --git a/src/modhdf5_write_hyper.inc b/src/modhdf5_write_hyper.inc index 334f264..c786380 100644 --- a/src/modhdf5_write_hyper.inc +++ b/src/modhdf5_write_hyper.inc @@ -5,11 +5,11 @@ ! can only be used in writeHDF5_hypersplice() select type(variable_to_write) type is (integer) - call h5dwrite_f(hyp%dset, dset_type, variable_to_write, dims(1:r), hdferr, memspace_id, hyp%dspace, xfer_prp=hyp%dxpl) + call h5dwrite_f(hyp%dset, dset_type, variable_to_write, dims(1:rnk), hdferr, memspace_id, hyp%dspace, xfer_prp=hyp%dxpl) type is (real) - call h5dwrite_f(hyp%dset, dset_type, variable_to_write, dims(1:r), hdferr, memspace_id, hyp%dspace, xfer_prp=hyp%dxpl) + call h5dwrite_f(hyp%dset, dset_type, variable_to_write, dims(1:rnk), hdferr, memspace_id, hyp%dspace, xfer_prp=hyp%dxpl) type is (real(8)) - call h5dwrite_f(hyp%dset, dset_type, variable_to_write, dims(1:r), hdferr, memspace_id, hyp%dspace, xfer_prp=hyp%dxpl) + call h5dwrite_f(hyp%dset, dset_type, variable_to_write, dims(1:rnk), hdferr, memspace_id, hyp%dspace, xfer_prp=hyp%dxpl) type is (character(*)) - call h5dwrite_f(hyp%dset, dset_type, variable_to_write, dims(1:r), hdferr, memspace_id, hyp%dspace, xfer_prp=hyp%dxpl) + call h5dwrite_f(hyp%dset, dset_type, variable_to_write, dims(1:rnk), hdferr, memspace_id, hyp%dspace, xfer_prp=hyp%dxpl) end select \ No newline at end of file