From 9f5031429aa82242667610ca1fa82365b2e9b9ab Mon Sep 17 00:00:00 2001 From: Brian Dobbins Date: Wed, 22 Jan 2025 11:12:17 -0700 Subject: [PATCH 01/22] Fixes in issue in the qsort comparison function where the difference of large values, when cast to an int, could lead to undefined behavior (integer overflow/underflow), resulting in data errors. --- src/clib/pio_rearrange.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/clib/pio_rearrange.c b/src/clib/pio_rearrange.c index 8f0665582..74627f646 100644 --- a/src/clib/pio_rearrange.c +++ b/src/clib/pio_rearrange.c @@ -1816,7 +1816,10 @@ compare_offsets(const void *a, const void *b) mapsort *y = (mapsort *)b; if (!x || !y) return 0; - return (int)(x->iomap - y->iomap); + + if (x->iomap < y->iomap) { return -1; } + if (x->iomap > y->iomap) { return 1; } + return 0; } /** From 046258d904e9eed5b0cd593949e7a022a9dd726c Mon Sep 17 00:00:00 2001 From: Jim Edwards Date: Fri, 24 Jan 2025 12:01:08 -0700 Subject: [PATCH 02/22] update github tests --- .github/workflows/autotools.yml | 4 ++-- .github/workflows/intel.yml | 20 ++++++++++---------- .github/workflows/withspack.yml | 8 ++++---- 3 files changed, 16 insertions(+), 16 deletions(-) diff --git a/.github/workflows/autotools.yml b/.github/workflows/autotools.yml index eba2d60bf..ed9cec248 100644 --- a/.github/workflows/autotools.yml +++ b/.github/workflows/autotools.yml @@ -19,7 +19,7 @@ jobs: LDFLAGS: "-L/usr/lib/x86_64-linux-gnu -lnetcdf_mpi -lpnetcdf" FCFLAGS: "-Wall -Werror -fallow-argument-mismatch -Wno-conversion" steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Installs run: | set -x @@ -54,4 +54,4 @@ jobs: # - name: Setup tmate session # if: ${{ failure() }} -# uses: mxschmitt/action-tmate@v3 +# uses: mxschmitt/action-tmate@v4 diff --git a/.github/workflows/intel.yml b/.github/workflows/intel.yml index 10eb10fca..6ba8503e2 100644 --- a/.github/workflows/intel.yml +++ b/.github/workflows/intel.yml @@ -12,15 +12,15 @@ jobs: runs-on: ubuntu-latest env: - CC: mpicc - FC: mpiifort + CC: mpicx + FC: mpiifx # Versions should match the github tag names - PNETCDF_VERSION: checkpoint.1.12.3 + PNETCDF_VERSION: checkpoint.1.14.0 NETCDF_C_VERSION: v4.9.2 NETCDF_FORTRAN_VERSION: v4.6.1 HDF5_VERSION: hdf5_1_12_2 steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Installs run: | set -x @@ -30,7 +30,7 @@ jobs: echo "/opt/intel/oneapi/compiler/2023.2.1/linux/bin/intel64/" >> $GITHUB_PATH - name: cache intel compiler id: cache-intel - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: /opt/intel/oneapi key: intel-${{ runner.os }} @@ -45,7 +45,7 @@ jobs: - name: cache-hdf5 id: cache-hdf5 - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: ~/work/ParallelIO/ParallelIO/hdf5 key: hdf5-${{ runner.os }}-${{ env.HDF5_VERSION }}-impi @@ -59,13 +59,13 @@ jobs: mpi_path: /opt/intel/mpi - name: cache netcdf C id: cache-netcdf-c - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: ~/work/ParallelIO/ParallelIO/netcdf-c key: netcdf-c-${{ runner.os }}-${{ env.NETCDF_C_VERSION }}-impi-hdf5-${{ env.HDF5_VERSION }} - name: cache netcdf Fortran id: cache-netcdf-f - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: ~/work/ParallelIO/ParallelIO/netcdf-f key: netcdf-f-${{ runner.os }}-${{ env.NETCDF_FORTRAN_VERSION }}-impi-hdf5-${{ env.HDF5_VERSION }} @@ -94,7 +94,7 @@ jobs: - name: cache-pnetcdf id: cache-pnetcdf - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: ~/work/ParallelIO/ParallelIO/pnetcdf key: pnetcdf-${{ runner.os }}-${{ env.PNETCDF_VERSION }}-impi-5 @@ -128,4 +128,4 @@ jobs: # see https://github.com/marketplace/actions/debugging-with-tmate for further details # - name: Setup tmate session # if: ${{ failure() }} -# uses: mxschmitt/action-tmate@v3 +# uses: mxschmitt/action-tmate@v4 diff --git a/.github/workflows/withspack.yml b/.github/workflows/withspack.yml index 998d61ea0..4187b2573 100644 --- a/.github/workflows/withspack.yml +++ b/.github/workflows/withspack.yml @@ -12,7 +12,7 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Installs run: | set -x @@ -28,7 +28,7 @@ jobs: printenv >> $GITHUB_ENV - name: cache spack id: cache-spack - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: | ~/work/ParallelIO/ParallelIO/spack @@ -36,7 +36,7 @@ jobs: key: spack-${{ runner.os }}-${{ env.SPACK_LATEST }} - name: Get Spack if: steps.cache-spack.outputs.cache-hit != 'true' - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: repository: spack/spack path: spack @@ -74,4 +74,4 @@ jobs: - name: Setup tmate session if: ${{ failure() }} - uses: mxschmitt/action-tmate@v3 + uses: mxschmitt/action-tmate@v4 From 621a72c980278f91fbffa169679dea654261f28f Mon Sep 17 00:00:00 2001 From: Jim Edwards Date: Fri, 24 Jan 2025 12:25:11 -0700 Subject: [PATCH 03/22] more github workflow adjustments --- .github/workflows/intel.yml | 4 ++-- .github/workflows/withspack.yml | 2 +- src/flib/pio_nf.F90 | 6 +++--- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/intel.yml b/.github/workflows/intel.yml index 6ba8503e2..ecf06f6a4 100644 --- a/.github/workflows/intel.yml +++ b/.github/workflows/intel.yml @@ -12,8 +12,8 @@ jobs: runs-on: ubuntu-latest env: - CC: mpicx - FC: mpiifx + CC: mpicc + FC: mpifort # Versions should match the github tag names PNETCDF_VERSION: checkpoint.1.14.0 NETCDF_C_VERSION: v4.9.2 diff --git a/.github/workflows/withspack.yml b/.github/workflows/withspack.yml index 4187b2573..f2b5a6aae 100644 --- a/.github/workflows/withspack.yml +++ b/.github/workflows/withspack.yml @@ -74,4 +74,4 @@ jobs: - name: Setup tmate session if: ${{ failure() }} - uses: mxschmitt/action-tmate@v4 + uses: mxschmitt/action-tmate@v3 diff --git a/src/flib/pio_nf.F90 b/src/flib/pio_nf.F90 index db08a7725..f14dabcc8 100644 --- a/src/flib/pio_nf.F90 +++ b/src/flib/pio_nf.F90 @@ -400,19 +400,19 @@ module pio_nf #ifdef NC_HAS_QUANTIZE interface pio_def_var_quantize module procedure & - def_var_quantize_desc , & + def_var_quantize_desc, & def_var_quantize_id end interface pio_def_var_quantize interface pio_inq_var_quantize module procedure & - inq_var_quantize_desc , & + inq_var_quantize_desc, & inq_var_quantize_id end interface pio_inq_var_quantize #endif #ifdef PIO_HAS_PAR_FILTERS interface pio_inq_var_filter_ids module procedure & - inq_var_filter_ids_desc , & + inq_var_filter_ids_desc , & inq_var_filter_ids_id end interface pio_inq_var_filter_ids interface pio_inq_var_filter_info From adc9e0068a2a068a7a3c78506927f511c953646d Mon Sep 17 00:00:00 2001 From: Jim Edwards Date: Fri, 24 Jan 2025 13:45:56 -0700 Subject: [PATCH 04/22] fix issue in github workflow --- CMakeLists.txt | 24 ++++++++++++------------ configure.ac | 8 ++++---- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 906727f06..b4e9af7d3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -29,18 +29,18 @@ include(CheckSymbolExists) # Determine the configure date. IF(DEFINED ENV{SOURCE_DATE_EPOCH}) - EXECUTE_PROCESS( - COMMAND "date" "-u" "-d" "@$ENV{SOURCE_DATE_EPOCH}" - OUTPUT_VARIABLE CONFIG_DATE - ) + EXECUTE_PROCESS( + COMMAND "date" "-u" "-d" "@$ENV{SOURCE_DATE_EPOCH}" + OUTPUT_VARIABLE CONFIG_DATE + ) ELSE() - EXECUTE_PROCESS( - COMMAND date - OUTPUT_VARIABLE CONFIG_DATE - ) + EXECUTE_PROCESS( + COMMAND date + OUTPUT_VARIABLE CONFIG_DATE + ) ENDIF() IF(CONFIG_DATE) - string(STRIP ${CONFIG_DATE} CONFIG_DATE) + string(STRIP ${CONFIG_DATE} CONFIG_DATE) ENDIF() # A function used to create autotools-style 'yes/no' definitions. @@ -363,9 +363,9 @@ if (HAVE_NETCDF_PAR) #if !NC_HAS_PAR_FILTERS choke me #endif -int main() {return 0;}" HAVE_PAR_FILTERS) +int main() {return 0;}" PIO_HAS_PAR_FILTERS) else() - set(HAVE_PAR_FILTERS 0) + set(PIO_HAS_PAR_FILTERS 0) endif() ### @@ -486,7 +486,7 @@ set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib") INSTALL(FILES "${PIO_BINARY_DIR}/libpio.settings" DESTINATION lib COMPONENT libraries) - + ##### # Create pio_meta.h include file. ##### diff --git a/configure.ac b/configure.ac index 1ba208788..399d12f78 100644 --- a/configure.ac +++ b/configure.ac @@ -38,7 +38,7 @@ fi LD=ld # Required for MPE to work. LT_INIT -# Find and learn about install +# Find and learn about install AC_PROG_INSTALL # Find and learn about the C compiler. @@ -294,7 +294,7 @@ AC_MSG_CHECKING([whether netCDF provides parallel filter support]) AC_CHECK_LIB([netcdf], [nc_inq_filter_avail], [have_par_filters=yes], [have_par_filters=no]) AC_MSG_RESULT([${have_par_filters}]) if test "x$have_par_filters" = xyes ; then - AC_DEFINE([HAVE_PAR_FILTERS], [1], [if true, netcdf-c supports filters with parallel I/O]) + AC_DEFINE([PIO_HAS_PAR_FILTERS], [1], [if true, netcdf-c supports filters with parallel I/O]) fi # Is this version 4.7.2, which does not work? @@ -472,8 +472,8 @@ AC_CONFIG_HEADERS([config.h]) # Create the makefiles. AC_CONFIG_FILES(Makefile - src/Makefile - src/clib/Makefile + src/Makefile + src/clib/Makefile src/ncint/Makefile src/flib/Makefile src/gptl/Makefile From 0747e704c3a5ddd276d52432ad20ff6887d08608 Mon Sep 17 00:00:00 2001 From: Jim Edwards Date: Fri, 24 Jan 2025 14:28:09 -0700 Subject: [PATCH 05/22] use intel mpi compiler names --- .github/workflows/intel.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/intel.yml b/.github/workflows/intel.yml index ecf06f6a4..b0a92f594 100644 --- a/.github/workflows/intel.yml +++ b/.github/workflows/intel.yml @@ -12,8 +12,8 @@ jobs: runs-on: ubuntu-latest env: - CC: mpicc - FC: mpifort + CC: mpiicc + FC: mpiifort # Versions should match the github tag names PNETCDF_VERSION: checkpoint.1.14.0 NETCDF_C_VERSION: v4.9.2 From 49879b1b8af7993a8734759b6a9a9c4512de7bb7 Mon Sep 17 00:00:00 2001 From: Jim Edwards Date: Fri, 24 Jan 2025 14:53:32 -0700 Subject: [PATCH 06/22] use intel mpi compiler names --- .github/workflows/intel.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/intel.yml b/.github/workflows/intel.yml index b0a92f594..9c8990e33 100644 --- a/.github/workflows/intel.yml +++ b/.github/workflows/intel.yml @@ -12,8 +12,8 @@ jobs: runs-on: ubuntu-latest env: - CC: mpiicc - FC: mpiifort + CC: icx + FC: ifx # Versions should match the github tag names PNETCDF_VERSION: checkpoint.1.14.0 NETCDF_C_VERSION: v4.9.2 From 7f9ad28f58d61eff1cafd70428d126b519b6fc85 Mon Sep 17 00:00:00 2001 From: Jim Edwards Date: Tue, 28 Jan 2025 08:58:37 -0700 Subject: [PATCH 07/22] update intel compiler names --- .github/workflows/intel.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/intel.yml b/.github/workflows/intel.yml index 9c8990e33..fd2d49a83 100644 --- a/.github/workflows/intel.yml +++ b/.github/workflows/intel.yml @@ -12,8 +12,8 @@ jobs: runs-on: ubuntu-latest env: - CC: icx - FC: ifx + CC: icc + FC: ifort # Versions should match the github tag names PNETCDF_VERSION: checkpoint.1.14.0 NETCDF_C_VERSION: v4.9.2 From ce7d2eaa446e8c3640e9e07380d99e323a38a5a2 Mon Sep 17 00:00:00 2001 From: Jim Edwards Date: Tue, 28 Jan 2025 09:16:48 -0700 Subject: [PATCH 08/22] try this --- .github/workflows/intel.yml | 28 +++++++++++++--------------- 1 file changed, 13 insertions(+), 15 deletions(-) diff --git a/.github/workflows/intel.yml b/.github/workflows/intel.yml index fd2d49a83..d4c3f41ae 100644 --- a/.github/workflows/intel.yml +++ b/.github/workflows/intel.yml @@ -21,27 +21,25 @@ jobs: HDF5_VERSION: hdf5_1_12_2 steps: - uses: actions/checkout@v4 + - name: Set up Intel OneAPI + run: | + source /opt/intel/oneapi/setvars.sh + export CC=/opt/intel/oneapi/compiler/latest/linux/bin/intel64/icc + export FC=/opt/intel/oneapi/compiler/latest/linux/bin/intel64/ifort - name: Installs run: | set -x sudo apt-get update sudo apt-get install libcurl4-gnutls-dev sudo apt-get install libz-dev - echo "/opt/intel/oneapi/compiler/2023.2.1/linux/bin/intel64/" >> $GITHUB_PATH - - name: cache intel compiler - id: cache-intel - uses: actions/cache@v4 - with: - path: /opt/intel/oneapi - key: intel-${{ runner.os }} - - name: Install Intel OneAPI - if: steps.cache-intel.outputs.cache-hit != 'true' - uses: ./.github/actions/intelcompilers - - name: Prep Intel OneAPI - if: steps.cache-intel.outputs.cache-hit == 'true' - run: | - source /opt/intel/oneapi/setvars.sh - printenv >> $GITHUB_ENV +# - name: Install Intel OneAPI +# if: steps.cache-intel.outputs.cache-hit != 'true' +# uses: ./.github/actions/intelcompilers +# - name: Prep Intel OneAPI +# if: steps.cache-intel.outputs.cache-hit == 'true' +# run: | +# source /opt/intel/oneapi/setvars.sh +# printenv >> $GITHUB_ENV - name: cache-hdf5 id: cache-hdf5 From 3fb330044e442c8e514146d4d8eed65cecbf3aa4 Mon Sep 17 00:00:00 2001 From: Jim Edwards Date: Tue, 28 Jan 2025 09:22:26 -0700 Subject: [PATCH 09/22] try this --- .github/actions/intelcompilers/action.yml | 3 +- .github/workflows/intel.yml | 34 ++++++++++++----------- 2 files changed, 20 insertions(+), 17 deletions(-) diff --git a/.github/actions/intelcompilers/action.yml b/.github/actions/intelcompilers/action.yml index 5f7c658d6..950cfd3f6 100644 --- a/.github/actions/intelcompilers/action.yml +++ b/.github/actions/intelcompilers/action.yml @@ -2,7 +2,7 @@ description: 'Install Intel Compilers' runs: using: composite steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: setup repo shell: bash run: | @@ -19,5 +19,6 @@ runs: sudo apt-get install -y intel-oneapi-mkl sudo apt-get install -y intel-oneapi-mpi sudo apt-get install -y intel-oneapi-mpi-devel + find /opt/intel -name setvars.sh source /opt/intel/oneapi/setvars.sh printenv >> $GITHUB_ENV diff --git a/.github/workflows/intel.yml b/.github/workflows/intel.yml index d4c3f41ae..51e8022c9 100644 --- a/.github/workflows/intel.yml +++ b/.github/workflows/intel.yml @@ -12,8 +12,8 @@ jobs: runs-on: ubuntu-latest env: - CC: icc - FC: ifort + CC: mpicc + FC: mpiifort # Versions should match the github tag names PNETCDF_VERSION: checkpoint.1.14.0 NETCDF_C_VERSION: v4.9.2 @@ -21,25 +21,27 @@ jobs: HDF5_VERSION: hdf5_1_12_2 steps: - uses: actions/checkout@v4 - - name: Set up Intel OneAPI - run: | - source /opt/intel/oneapi/setvars.sh - export CC=/opt/intel/oneapi/compiler/latest/linux/bin/intel64/icc - export FC=/opt/intel/oneapi/compiler/latest/linux/bin/intel64/ifort - name: Installs run: | set -x sudo apt-get update sudo apt-get install libcurl4-gnutls-dev sudo apt-get install libz-dev -# - name: Install Intel OneAPI -# if: steps.cache-intel.outputs.cache-hit != 'true' -# uses: ./.github/actions/intelcompilers -# - name: Prep Intel OneAPI -# if: steps.cache-intel.outputs.cache-hit == 'true' -# run: | -# source /opt/intel/oneapi/setvars.sh -# printenv >> $GITHUB_ENV +# echo "/opt/intel/oneapi/compiler/2023.2.1/linux/bin/intel64/" >> $GITHUB_PATH + - name: cache intel compiler + id: cache-intel + uses: actions/cache@v4 + with: + path: /opt/intel/oneapi + key: intel-${{ runner.os }} + - name: Install Intel OneAPI + if: steps.cache-intel.outputs.cache-hit != 'true' + uses: ./.github/actions/intelcompilers + - name: Prep Intel OneAPI + if: steps.cache-intel.outputs.cache-hit == 'true' + run: | + source /opt/intel/oneapi/setvars.sh + printenv >> $GITHUB_ENV - name: cache-hdf5 id: cache-hdf5 @@ -126,4 +128,4 @@ jobs: # see https://github.com/marketplace/actions/debugging-with-tmate for further details # - name: Setup tmate session # if: ${{ failure() }} -# uses: mxschmitt/action-tmate@v4 +# uses: mxschmitt/action-tmate@v3 From 5959fadecda04ff4968a5e9466a1f9e885fd8fbe Mon Sep 17 00:00:00 2001 From: Jim Edwards Date: Tue, 28 Jan 2025 09:48:14 -0700 Subject: [PATCH 10/22] try this --- .github/workflows/intel.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/intel.yml b/.github/workflows/intel.yml index 51e8022c9..7f583ea96 100644 --- a/.github/workflows/intel.yml +++ b/.github/workflows/intel.yml @@ -13,7 +13,7 @@ jobs: env: CC: mpicc - FC: mpiifort + FC: mpifort # Versions should match the github tag names PNETCDF_VERSION: checkpoint.1.14.0 NETCDF_C_VERSION: v4.9.2 From edac65e9f7f797a53c3dbd88ef114b6fc79fcc7c Mon Sep 17 00:00:00 2001 From: Jim Edwards Date: Tue, 28 Jan 2025 11:07:12 -0700 Subject: [PATCH 11/22] add tmate to intel --- .github/workflows/intel.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/intel.yml b/.github/workflows/intel.yml index 7f583ea96..bad3022d0 100644 --- a/.github/workflows/intel.yml +++ b/.github/workflows/intel.yml @@ -126,6 +126,6 @@ jobs: popd # the following can be used by developers to login to the github server in case of errors # see https://github.com/marketplace/actions/debugging-with-tmate for further details -# - name: Setup tmate session -# if: ${{ failure() }} -# uses: mxschmitt/action-tmate@v3 + - name: Setup tmate session + if: ${{ failure() }} + uses: mxschmitt/action-tmate@v3 From 16a72e2c9392645c9f05a840273127505adab30b Mon Sep 17 00:00:00 2001 From: Jim Edwards Date: Tue, 28 Jan 2025 11:21:33 -0700 Subject: [PATCH 12/22] intel path updates --- .github/workflows/intel.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/intel.yml b/.github/workflows/intel.yml index bad3022d0..98443d885 100644 --- a/.github/workflows/intel.yml +++ b/.github/workflows/intel.yml @@ -12,8 +12,8 @@ jobs: runs-on: ubuntu-latest env: - CC: mpicc - FC: mpifort + CC: mpiicx + FC: mpiifx # Versions should match the github tag names PNETCDF_VERSION: checkpoint.1.14.0 NETCDF_C_VERSION: v4.9.2 From 7dc826ce849bb2931898b1205d25cf0440cc2403 Mon Sep 17 00:00:00 2001 From: Jim Edwards Date: Tue, 28 Jan 2025 11:28:23 -0700 Subject: [PATCH 13/22] intel path updates --- .github/workflows/intel.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/intel.yml b/.github/workflows/intel.yml index 98443d885..d68e64aec 100644 --- a/.github/workflows/intel.yml +++ b/.github/workflows/intel.yml @@ -27,7 +27,7 @@ jobs: sudo apt-get update sudo apt-get install libcurl4-gnutls-dev sudo apt-get install libz-dev -# echo "/opt/intel/oneapi/compiler/2023.2.1/linux/bin/intel64/" >> $GITHUB_PATH + echo "/opt/intel/oneapi/compiler/latest/bin:/opt/intel/oneapi/mpi/latest/bin" >> $GITHUB_PATH - name: cache intel compiler id: cache-intel uses: actions/cache@v4 From 97042bc4d055b0d520eeb61f92522c72984e4497 Mon Sep 17 00:00:00 2001 From: Jim Edwards Date: Tue, 28 Jan 2025 11:41:29 -0700 Subject: [PATCH 14/22] intel path updates --- .github/workflows/intel.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/intel.yml b/.github/workflows/intel.yml index d68e64aec..15b91cd4b 100644 --- a/.github/workflows/intel.yml +++ b/.github/workflows/intel.yml @@ -27,7 +27,10 @@ jobs: sudo apt-get update sudo apt-get install libcurl4-gnutls-dev sudo apt-get install libz-dev - echo "/opt/intel/oneapi/compiler/latest/bin:/opt/intel/oneapi/mpi/latest/bin" >> $GITHUB_PATH + sudo apt-get install intel-oneapi-compiler-fortran + sudo apt install intel-oneapi-compiler-dpcpp-cpp-and-cpp-classic + source /opt/intel/oneapi/setvars.sh + source /opt/intel/oneapi/compiler/latest/env/vars.sh intel64 - name: cache intel compiler id: cache-intel uses: actions/cache@v4 @@ -41,6 +44,7 @@ jobs: if: steps.cache-intel.outputs.cache-hit == 'true' run: | source /opt/intel/oneapi/setvars.sh + source /opt/intel/oneapi/compiler/latest/env/vars.sh intel64 printenv >> $GITHUB_ENV - name: cache-hdf5 From c4304471a2bb51febd9ad68681a00e1e0eb9e4d2 Mon Sep 17 00:00:00 2001 From: Jim Edwards Date: Tue, 28 Jan 2025 11:52:52 -0700 Subject: [PATCH 15/22] intel path updates --- .github/actions/intelcompilers/action.yml | 25 +++++++++++++---------- .github/workflows/intel.yml | 4 ---- 2 files changed, 14 insertions(+), 15 deletions(-) diff --git a/.github/actions/intelcompilers/action.yml b/.github/actions/intelcompilers/action.yml index 950cfd3f6..90efc469f 100644 --- a/.github/actions/intelcompilers/action.yml +++ b/.github/actions/intelcompilers/action.yml @@ -6,19 +6,22 @@ runs: - name: setup repo shell: bash run: | - wget https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB - sudo apt-key add GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB - rm GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB - sudo echo "deb https://apt.repos.intel.com/oneapi all main" | sudo tee /etc/apt/sources.list.d/oneAPI.list + #wget -O- https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB + # download the key to system keyring + wget -O- https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB | gpg --dearmor | sudo tee /usr/share/keyrings/oneapi-archive-keyring.gpg > /dev/null + #sudo apt-key add GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB + #rm GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB + echo "deb [signed-by=/usr/share/keyrings/oneapi-archive-keyring.gpg] https://apt.repos.intel.com/oneapi all main" | sudo tee /etc/apt/sources.list.d/oneAPI.list sudo apt-get update - name: install shell: bash run: | - sudo apt-get install -y intel-oneapi-common-vars - sudo apt-get install -y intel-oneapi-compiler-fortran - sudo apt-get install -y intel-oneapi-mkl - sudo apt-get install -y intel-oneapi-mpi - sudo apt-get install -y intel-oneapi-mpi-devel - find /opt/intel -name setvars.sh + sudo apt-get install intel-oneapi-hpc-toolkit +# sudo apt-get install -y intel-oneapi-common-vars +# sudo apt-get install -y intel-oneapi-compiler-fortran +# sudo apt-get install -y intel-oneapi-mkl +# sudo apt-get install -y intel-oneapi-mpi +# sudo apt-get install -y intel-oneapi-mpi-devel +# find /opt/intel -name setvars.sh source /opt/intel/oneapi/setvars.sh - printenv >> $GITHUB_ENV +# printenv >> $GITHUB_ENV diff --git a/.github/workflows/intel.yml b/.github/workflows/intel.yml index 15b91cd4b..1c73d4760 100644 --- a/.github/workflows/intel.yml +++ b/.github/workflows/intel.yml @@ -27,10 +27,6 @@ jobs: sudo apt-get update sudo apt-get install libcurl4-gnutls-dev sudo apt-get install libz-dev - sudo apt-get install intel-oneapi-compiler-fortran - sudo apt install intel-oneapi-compiler-dpcpp-cpp-and-cpp-classic - source /opt/intel/oneapi/setvars.sh - source /opt/intel/oneapi/compiler/latest/env/vars.sh intel64 - name: cache intel compiler id: cache-intel uses: actions/cache@v4 From 537f7f12109059ccd23a279b655f3837a4c3693a Mon Sep 17 00:00:00 2001 From: Jim Edwards Date: Tue, 28 Jan 2025 11:55:55 -0700 Subject: [PATCH 16/22] intel path updates --- .github/actions/intelcompilers/action.yml | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/.github/actions/intelcompilers/action.yml b/.github/actions/intelcompilers/action.yml index 90efc469f..895d7ea40 100644 --- a/.github/actions/intelcompilers/action.yml +++ b/.github/actions/intelcompilers/action.yml @@ -17,11 +17,5 @@ runs: shell: bash run: | sudo apt-get install intel-oneapi-hpc-toolkit -# sudo apt-get install -y intel-oneapi-common-vars -# sudo apt-get install -y intel-oneapi-compiler-fortran -# sudo apt-get install -y intel-oneapi-mkl -# sudo apt-get install -y intel-oneapi-mpi -# sudo apt-get install -y intel-oneapi-mpi-devel -# find /opt/intel -name setvars.sh source /opt/intel/oneapi/setvars.sh -# printenv >> $GITHUB_ENV + source /opt/intel/oneapi/compiler/latest/env/vars.sh intel64 From 1be50891cdd190975b0d729f60b8cceb3c7560da Mon Sep 17 00:00:00 2001 From: Jim Edwards Date: Tue, 28 Jan 2025 12:04:22 -0700 Subject: [PATCH 17/22] intel path updates --- .github/workflows/intel.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/intel.yml b/.github/workflows/intel.yml index 1c73d4760..c3b5e29fb 100644 --- a/.github/workflows/intel.yml +++ b/.github/workflows/intel.yml @@ -42,7 +42,7 @@ jobs: source /opt/intel/oneapi/setvars.sh source /opt/intel/oneapi/compiler/latest/env/vars.sh intel64 printenv >> $GITHUB_ENV - + export PATH=/opt/intel/oneapi/2025.0/bin:$PATH - name: cache-hdf5 id: cache-hdf5 uses: actions/cache@v4 From fb75d1e4e41990aef3601fc71a823e0237579a15 Mon Sep 17 00:00:00 2001 From: Jim Edwards Date: Tue, 28 Jan 2025 12:17:02 -0700 Subject: [PATCH 18/22] intel path updates --- .github/workflows/intel.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/intel.yml b/.github/workflows/intel.yml index c3b5e29fb..7d0b995ab 100644 --- a/.github/workflows/intel.yml +++ b/.github/workflows/intel.yml @@ -39,8 +39,7 @@ jobs: - name: Prep Intel OneAPI if: steps.cache-intel.outputs.cache-hit == 'true' run: | - source /opt/intel/oneapi/setvars.sh - source /opt/intel/oneapi/compiler/latest/env/vars.sh intel64 + source /opt/intel/oneapi/2025.0/oneapi-vars.sh printenv >> $GITHUB_ENV export PATH=/opt/intel/oneapi/2025.0/bin:$PATH - name: cache-hdf5 @@ -56,7 +55,7 @@ jobs: install_prefix: ${GITHUB_WORKSPACE}/hdf5 enable_parallel: True hdf5_version: ${{ env.HDF5_VERSION }} - mpi_path: /opt/intel/mpi + mpi_path: /opt/intel/oneapi/2025.0/ - name: cache netcdf C id: cache-netcdf-c uses: actions/cache@v4 From eab2f22802e18f8e5c8191eafdd8d26d45c5ed08 Mon Sep 17 00:00:00 2001 From: Jim Edwards Date: Tue, 28 Jan 2025 12:25:22 -0700 Subject: [PATCH 19/22] hdf5 update? --- .github/workflows/intel.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/intel.yml b/.github/workflows/intel.yml index 7d0b995ab..50188aec4 100644 --- a/.github/workflows/intel.yml +++ b/.github/workflows/intel.yml @@ -18,7 +18,7 @@ jobs: PNETCDF_VERSION: checkpoint.1.14.0 NETCDF_C_VERSION: v4.9.2 NETCDF_FORTRAN_VERSION: v4.6.1 - HDF5_VERSION: hdf5_1_12_2 + HDF5_VERSION: hdf5_1_14_5 steps: - uses: actions/checkout@v4 - name: Installs From a3de6891d4de422a159c8b454b803027d99311ee Mon Sep 17 00:00:00 2001 From: Jim Edwards Date: Wed, 29 Jan 2025 08:27:48 -0700 Subject: [PATCH 20/22] still fighting hdf5 --- .github/actions/buildhdf5/action.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/actions/buildhdf5/action.yml b/.github/actions/buildhdf5/action.yml index 4ba086823..1a79686e3 100644 --- a/.github/actions/buildhdf5/action.yml +++ b/.github/actions/buildhdf5/action.yml @@ -50,6 +50,8 @@ runs: -DHDF5_ENABLE_PARALLEL=${{ inputs.enable_parallel }} \ -DHDF5_ENABLE_Z_LIB_SUPPORT=ON \ -DBUILD_TESTING=${{ inputs.enable_testing }} \ + -DHDF5_ENABLE_DEPRICATED_SYMBOLS=OFF \ + -DHDF5_BUILD_EXAMPLES=OFF \ -DHDF5_BUILD_TOOLS=OFF \ ../ make From 59622772832699d797764ecc22413ac8f6dfcf07 Mon Sep 17 00:00:00 2001 From: Jim Edwards Date: Wed, 29 Jan 2025 08:39:05 -0700 Subject: [PATCH 21/22] still fighting hdf5 --- .github/actions/buildhdf5/action.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/actions/buildhdf5/action.yml b/.github/actions/buildhdf5/action.yml index 1a79686e3..a68daebfe 100644 --- a/.github/actions/buildhdf5/action.yml +++ b/.github/actions/buildhdf5/action.yml @@ -53,6 +53,7 @@ runs: -DHDF5_ENABLE_DEPRICATED_SYMBOLS=OFF \ -DHDF5_BUILD_EXAMPLES=OFF \ -DHDF5_BUILD_TOOLS=OFF \ + -DCMAKE_BUILD_TYPE=REL \ ../ make make install From a89f8203b05905c413bb678379f58f97f26f26a0 Mon Sep 17 00:00:00 2001 From: Jim Edwards Date: Wed, 29 Jan 2025 08:40:56 -0700 Subject: [PATCH 22/22] remove broken tests --- .github/workflows/intel.yml | 130 -------------------------------- .github/workflows/withspack.yml | 77 ------------------- 2 files changed, 207 deletions(-) delete mode 100644 .github/workflows/intel.yml delete mode 100644 .github/workflows/withspack.yml diff --git a/.github/workflows/intel.yml b/.github/workflows/intel.yml deleted file mode 100644 index 50188aec4..000000000 --- a/.github/workflows/intel.yml +++ /dev/null @@ -1,130 +0,0 @@ -name: Intel OneAPI -# Tests ParallelIO using Intel Compiler and IMPI library. -on: - push: - branches: [ main ] - pull_request: - branches: [ main ] - -jobs: - build: - - runs-on: ubuntu-latest - - env: - CC: mpiicx - FC: mpiifx - # Versions should match the github tag names - PNETCDF_VERSION: checkpoint.1.14.0 - NETCDF_C_VERSION: v4.9.2 - NETCDF_FORTRAN_VERSION: v4.6.1 - HDF5_VERSION: hdf5_1_14_5 - steps: - - uses: actions/checkout@v4 - - name: Installs - run: | - set -x - sudo apt-get update - sudo apt-get install libcurl4-gnutls-dev - sudo apt-get install libz-dev - - name: cache intel compiler - id: cache-intel - uses: actions/cache@v4 - with: - path: /opt/intel/oneapi - key: intel-${{ runner.os }} - - name: Install Intel OneAPI - if: steps.cache-intel.outputs.cache-hit != 'true' - uses: ./.github/actions/intelcompilers - - name: Prep Intel OneAPI - if: steps.cache-intel.outputs.cache-hit == 'true' - run: | - source /opt/intel/oneapi/2025.0/oneapi-vars.sh - printenv >> $GITHUB_ENV - export PATH=/opt/intel/oneapi/2025.0/bin:$PATH - - name: cache-hdf5 - id: cache-hdf5 - uses: actions/cache@v4 - with: - path: ~/work/ParallelIO/ParallelIO/hdf5 - key: hdf5-${{ runner.os }}-${{ env.HDF5_VERSION }}-impi - - name: build-hdf5 - if: steps.cache-hdf5.outputs.cache-hit != 'true' - uses: ./.github/actions/buildhdf5 - with: - install_prefix: ${GITHUB_WORKSPACE}/hdf5 - enable_parallel: True - hdf5_version: ${{ env.HDF5_VERSION }} - mpi_path: /opt/intel/oneapi/2025.0/ - - name: cache netcdf C - id: cache-netcdf-c - uses: actions/cache@v4 - with: - path: ~/work/ParallelIO/ParallelIO/netcdf-c - key: netcdf-c-${{ runner.os }}-${{ env.NETCDF_C_VERSION }}-impi-hdf5-${{ env.HDF5_VERSION }} - - name: cache netcdf Fortran - id: cache-netcdf-f - uses: actions/cache@v4 - with: - path: ~/work/ParallelIO/ParallelIO/netcdf-f - key: netcdf-f-${{ runner.os }}-${{ env.NETCDF_FORTRAN_VERSION }}-impi-hdf5-${{ env.HDF5_VERSION }} - - - name: prep netcdf-c - run: | - export PATH=$GITHUB_WORKSPACE/hdf5/bin:$GITHUB_WORKSPACE/netcdf/bin:$PATH - export LDFLAGS="$LDFLAGS -L$GITHUB_WORKSPACE/hdf5/lib -L/usr/lib/x86_64-linux-gnu/ -lcurl" - export CPPFLAGS="$CPPFLAGS -I$GITHUB_WORKSPACE/hdf5/include -I$GITHUB_WORKSPACE/netcdf/include" - export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$GITHUB_WORKSPACE/hdf5/lib:/usr/lib/x86_64-linux-gnu/:/opt/intel/oneapi/compiler/2023.2.1/linux/compiler/lib/intel64_lin/" - printenv >> $GITHUB_ENV - - name: build-netcdf-c - if: steps.cache-netcdf-c.outputs.cache-hit != 'true' - uses: ./.github/actions/buildnetcdf - with: - netcdf_version: ${{ env.NETCDF_C_VERSION }} - install_prefix: ${GITHUB_WORKSPACE}/netcdf-c - - - name: Build NetCDF Fortran - if: steps.cache-netcdf-f.outputs.cache-hit != 'true' - uses: ./.github/actions/buildnetcdff - with: - netcdf_fortran_version: ${{ env.NETCDF_FORTRAN_VERSION }} - install_prefix: ${GITHUB_WORKSPACE}/netcdf-f - netcdf_c_path: ${GITHUB_WORKSPACE}/netcdf-c - - - name: cache-pnetcdf - id: cache-pnetcdf - uses: actions/cache@v4 - with: - path: ~/work/ParallelIO/ParallelIO/pnetcdf - key: pnetcdf-${{ runner.os }}-${{ env.PNETCDF_VERSION }}-impi-5 - - - name: Build PNetCDF - if: steps.cache-pnetcdf.outputs.cache-hit != 'true' - uses: ./.github/actions/buildpnetcdf - with: - pnetcdf_version: ${{ env.PNETCDF_VERSION }} - install_prefix: ${GITHUB_WORKSPACE}/pnetcdf - - - name: cmake build - uses: ./.github/actions/parallelio_cmake - with: - parallelio_version: ${{ env.GITHUB_SHA }} - enable_fortran: True - netcdf_c_library: $GITHUB_WORKSPACE/netcdf-c/lib/libnetcdf.so - netcdf_c_include_dir: $GITHUB_WORKSPACE/netcdf-c/include - netcdf_fortran_library: $GITHUB_WORKSPACE/netcdf-f/lib/libnetcdff.so - netcdf_fortran_include_dir: $GITHUB_WORKSPACE/netcdf-f/include - pnetcdf_library: $GITHUB_WORKSPACE/pnetcdf/lib/libpnetcdf.a - pnetcdf_include_dir: $GITHUB_WORKSPACE/pnetcdf/include - install_prefix: $GITHUB_WORKSPACE/parallelio - - name: parallelio tests - run: | - pushd $GITHUB_WORKSPACE/build - make tests - ctest -VV -E test_async_ - popd - # the following can be used by developers to login to the github server in case of errors - # see https://github.com/marketplace/actions/debugging-with-tmate for further details - - name: Setup tmate session - if: ${{ failure() }} - uses: mxschmitt/action-tmate@v3 diff --git a/.github/workflows/withspack.yml b/.github/workflows/withspack.yml deleted file mode 100644 index f2b5a6aae..000000000 --- a/.github/workflows/withspack.yml +++ /dev/null @@ -1,77 +0,0 @@ -name: Build with Spack -# Tests ParallelIO using spack tools -on: - push: - branches: [ main ] - pull_request: - branches: [ main ] - -jobs: - build: - - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v4 - - name: Installs - run: | - set -x - sudo apt-get update - sudo apt-get install wget - sudo apt-get install libjpeg-dev - sudo apt-get install libz-dev - sudo apt-get install gfortran - - - name: Get latest spack release tag - run: | - export SPACK_LATEST="$(curl -sL https://github.com/spack/spack/releases/latest |grep 'Release' | awk '{print $2}')" - printenv >> $GITHUB_ENV - - name: cache spack - id: cache-spack - uses: actions/cache@v4 - with: - path: | - ~/work/ParallelIO/ParallelIO/spack - ~/.spack - key: spack-${{ runner.os }}-${{ env.SPACK_LATEST }} - - name: Get Spack - if: steps.cache-spack.outputs.cache-hit != 'true' - uses: actions/checkout@v4 - with: - repository: spack/spack - path: spack - ref: ${{ env.SPACK_LATEST }} - - - name: Prep spack - run: | - source $GITHUB_WORKSPACE/spack/share/spack/setup-env.sh - spack compiler find - # Remove the patch for gfortran, we don't want it - # - sed -i 's/patch(.*$//' $GITHUB_WORKSPACE/spack/var/spack/repos/builtin/packages/parallelio/package.py - - name: Build with spack - run: | - source $GITHUB_WORKSPACE/spack/share/spack/setup-env.sh - mkdir genf90 - pushd genf90 - ln -fs $GITHUB_WORKSPACE/scripts/genf90.pl . - popd - # the || true prevents a fail if parallelio is not installed - # spack uninstall -y parallelio@=develop+pnetcdf+fortran ^mpich || true - # spack dev-build -d $GITHUB_WORKSPACE parallelio@=develop+pnetcdf+fortran ^mpich - spack uninstall -y parallelio@=develop+pnetcdf+fortran ^mpich || true - spack dev-build -d $GITHUB_WORKSPACE parallelio@=develop+pnetcdf+fortran ^mpich - - - name: Test parallelio - run: | - pioblddir=$(ls -td */ | head -1) - pushd $pioblddir - make tests - # Exclude two tests that are timing out. - ctest -VV -LE skipforspack - popd - - - - name: Setup tmate session - if: ${{ failure() }} - uses: mxschmitt/action-tmate@v3