Repository: Unidata/netcdf-c
Pull request #3052 (2024-11-21 22:15:01)

v4.9.3-rc2 wellspring changes
Brings a subset of changes made while preparing `v4.9.3-rc2` back upstream into `main`.


Patch:
diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md
index 7475de2d2..5759b335c 100644
--- a/RELEASE_NOTES.md
+++ b/RELEASE_NOTES.md
@@ -15,7 +15,7 @@ This file contains a high-level description of this package's evolution. Release
 
 ## Release Notes
 
-### Release Candidate 2 - TBD
+### Release Candidate 2 - December 6, 2024
 
 > Note: To avoid a conflict between `_FillValue` and `libc++18`, we have introduced a new option, `--enable-legacy-macros` for autotools and `NETCDF_ENABLE_LEGACY_MACROS` for cmake.  These are turned on by default currently but will be turned off eventually.  Developers are encouraged to move away from the `FillValue` macro and replace it with the new `NC_FillValue` macro.  See [Github #2858](https://github.com/Unidata/netcdf-c/issues/2858) for more information. 
 
diff --git a/configure.ac b/configure.ac
index 89d04efeb..2f4b4a22e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -29,7 +29,7 @@ AC_SUBST([NC_VERSION_NOTE]) NC_VERSION_NOTE="-development"
 # See http://www.gnu.org/software/libtool/manual/libtool.html#Libtool-versioning
 # for information regarding incrementing `-version-info`.
 # These values should match those in CMakeLists.txt
-AC_SUBST([netCDF_SO_VERSION]) netCDF_SO_VERSION=22:0:0
+AC_SUBST([netCDF_SO_VERSION]) netCDF_SO_VERSION=23:0:1
 
 #####
 # Set some variables used to generate a libnetcdf.settings file,


Test patch:
diff --git a/.github/workflows/run_tests_osx.yml b/.github/workflows/run_tests_osx.yml
index 11f4bc734..bcf0e7c6e 100644
--- a/.github/workflows/run_tests_osx.yml
+++ b/.github/workflows/run_tests_osx.yml
@@ -16,7 +16,7 @@ jobs:
 
   build-deps-osx:
 
-    runs-on: macos-12
+    runs-on: macos-13
 
     strategy:
       matrix:
@@ -45,14 +45,24 @@ jobs:
           tar -jxf hdf5-${{ matrix.hdf5 }}.tar.bz2
           pushd hdf5-${{ matrix.hdf5 }}
           ./configure --disable-static --enable-shared --prefix=${HOME}/environments/${{ matrix.hdf5 }} --enable-hl --with-szlib
-          make -j
-          make install -j
+          make -j 12
+          make install -j 12
           popd
 
+      - name: Handle Error for libhdf5-${{ runner.os }}-${{ matrix.hdf5 }}
+        shell: bash -l {0}
+        run: | 
+          cat config.log
+          echo "Checking filesystem limits"
+          ulimit -a
+          echo "Checking user process limits"
+          sysctl -a | grep maxproc
+        if: ${{ failure() }}
+
   nc-autotools-osx:
 
     needs: [ nc-cmake-tests-oneoff-osx-shared, nc-cmake-tests-oneoff-osx-static, nc-ac-tests-oneoff-osx ]
-    runs-on: macos-12
+    runs-on: macos-13
 
     strategy:
       matrix:
@@ -158,7 +168,7 @@ jobs:
   nc-cmake-osx:
 
     needs: [ nc-cmake-tests-oneoff-osx-shared, nc-cmake-tests-oneoff-osx-static, nc-ac-tests-oneoff-osx ]
-    runs-on: macos-12
+    runs-on: macos-13
 
     strategy:
       matrix:
@@ -253,7 +263,7 @@ jobs:
   nc-ac-tests-oneoff-osx:
 
     needs: build-deps-osx
-    runs-on: macos-12
+    runs-on: macos-13
 
     strategy:
       matrix:
@@ -334,7 +344,7 @@ jobs:
   nc-cmake-tests-oneoff-osx-shared:
 
     needs: build-deps-osx
-    runs-on: macos-12
+    runs-on: macos-13
 
     strategy:
       matrix:
@@ -408,7 +418,7 @@ jobs:
   nc-cmake-tests-oneoff-osx-static:
 
     needs: build-deps-osx
-    runs-on: macos-12
+    runs-on: macos-13
 
     strategy:
       matrix:
diff --git a/.github/workflows/run_tests_ubuntu.yml b/.github/workflows/run_tests_ubuntu.yml
index 3ec6a595c..72142e8fd 100644
--- a/.github/workflows/run_tests_ubuntu.yml
+++ b/.github/workflows/run_tests_ubuntu.yml
@@ -14,10 +14,10 @@ concurrency:
   cancel-in-progress: true
 
 jobs:
-
+ 
   build-deps-serial:
 
-    runs-on: ubuntu-latest
+    runs-on: ubuntu-22.04
 
     strategy:
       matrix:
@@ -38,14 +38,13 @@ jobs:
         uses: actions/cache@v4
         with:
           path: ~/environments/${{ matrix.hdf5 }}
-          key: hdf5-${{ runner.os }}-${{ matrix.hdf5 }}
+          key: hdf5-${{ runner.os }}-${{ matrix.hdf5 }}-ubuntu-22.04
 
 
       - name: Build libhdf5-${{ matrix.hdf5 }}
         if: steps.cache-hdf5.outputs.cache-hit != 'true'
         run: |
           set -x
-
           wget https://support.hdfgroup.org/ftp/HDF/releases/HDF4.2.15/src/hdf-4.2.15.tar.bz2
           tar -jxf hdf-4.2.15.tar.bz2
           pushd hdf-4.2.15
@@ -53,19 +52,28 @@ jobs:
           make -j
           make install -j
           popd
-
-          wget https://support.hdfgroup.org/ftp/HDF5/releases/hdf5-$(echo ${{ matrix.hdf5 }} | cut -d. -f 1,2)/hdf5-${{ matrix.hdf5 }}/src/hdf5-${{ matrix.hdf5 }}.tar.bz2
-          tar -jxf hdf5-${{ matrix.hdf5 }}.tar.bz2
+    
+          if [ "${{ matrix.hdf5 }}" = "1.14.5" ]; then
+            wget https://github.com/HDFGroup/hdf5/archive/refs/tags/hdf5_1.14.5.tar.gz
+            tar -zxf hdf5_1.14.5.tar.gz
+            mv hdf5_1.14.5 hdf5-1.14.5
+          else
+            wget https://support.hdfgroup.org/ftp/HDF5/releases/hdf5-$(echo ${{ matrix.hdf5 }} | cut -d. -f 1,2)/hdf5-${{ matrix.hdf5 }}/src/hdf5-${{ matrix.hdf5 }}.tar.bz2
+            tar -jxf hdf5-${{ matrix.hdf5 }}.tar.bz2
+          fi
           pushd hdf5-${{ matrix.hdf5 }}
           ./configure --disable-static --enable-shared --prefix=${HOME}/environments/${{ matrix.hdf5 }} --enable-hl --with-szlib
           make -j
           make install -j
           popd
-          
+
+      - name: Check libhdf5-serial-${{ matrix.hdf5}}
+        run: |
+          ls ${HOME}/environments/**
 
   build-deps-parallel:
 
-    runs-on: ubuntu-latest
+    runs-on: ubuntu-22.04
 
     strategy:
       matrix:
@@ -87,8 +95,7 @@ jobs:
         uses: actions/cache@v4
         with:
           path: ~/environments/${{ matrix.hdf5 }}
-          key: hdf5-parallel-${{ runner.os }}-${{ matrix.hdf5 }}
-
+          key: hdf5-parallel-${{ runner.os }}-${{ matrix.hdf5 }}-ubuntu-22.04
 
       - name: Build libhdf5-${{ matrix.hdf5 }}-pnetcdf-1.12.3
         if: steps.cache-hdf5.outputs.cache-hit != 'true'
@@ -102,9 +109,15 @@ jobs:
           make -j
           make install -j
           popd
+          if [ "${{ matrix.hdf5 }}" = "1.14.5" ]; then
+            wget https://github.com/HDFGroup/hdf5/archive/refs/tags/hdf5_1.14.5.tar.gz
+            tar -zxf hdf5_1.14.5.tar.gz
+            mv hdf5_1.14.5 hdf5-1.14.5
+          else
+            wget https://support.hdfgroup.org/ftp/HDF5/releases/hdf5-$(echo ${{ matrix.hdf5 }} | cut -d. -f 1,2)/hdf5-${{ matrix.hdf5 }}/src/hdf5-${{ matrix.hdf5 }}.tar.bz2
+            tar -jxf hdf5-${{ matrix.hdf5 }}.tar.bz2
+          fi
 
-          wget https://support.hdfgroup.org/ftp/HDF5/releases/hdf5-$(echo ${{ matrix.hdf5 }} | cut -d. -f 1,2)/hdf5-${{ matrix.hdf5 }}/src/hdf5-${{ matrix.hdf5 }}.tar.bz2
-          tar -jxf hdf5-${{ matrix.hdf5 }}.tar.bz2
           pushd hdf5-${{ matrix.hdf5 }}
           CC=mpicc ./configure --disable-static --enable-shared --prefix=${HOME}/environments/${{ matrix.hdf5 }} --enable-hl --with-szlib --enable-parallel
           make -j
@@ -117,6 +130,12 @@ jobs:
           make -j
           make install -j
           popd
+
+      - name: Check libhdf5-parallel-${{ matrix.hdf5}}
+        run: |
+          ls ${HOME}/environments/**
+          echo ""
+          mpicc -v
           
   #####
   # One-Off Autotools-based tests.
@@ -127,7 +146,7 @@ jobs:
   nc-ac-tests-oneoff-serial-shared:
 
     needs: build-deps-serial
-    runs-on: ubuntu-latest
+    runs-on: ubuntu-22.04
 
     strategy:
       matrix:
@@ -158,7 +177,7 @@ jobs:
         uses: actions/cache@v4
         with:
           path: ~/environments/${{ matrix.hdf5 }}
-          key: hdf5-${{ runner.os }}-${{ matrix.hdf5 }}
+          key: hdf5-${{ runner.os }}-${{ matrix.hdf5 }}-ubuntu-22.04
 
       - name: Check Cache
         shell: bash -l {0}
@@ -222,7 +241,7 @@ jobs:
   nc-ac-tests-oneoff-serial-static:
 
     needs: build-deps-serial
-    runs-on: ubuntu-latest
+    runs-on: ubuntu-22.04
 
     strategy:
       matrix:
@@ -253,7 +272,7 @@ jobs:
         uses: actions/cache@v4
         with:
           path: ~/environments/${{ matrix.hdf5 }}
-          key: hdf5-${{ runner.os }}-${{ matrix.hdf5 }}
+          key: hdf5-${{ runner.os }}-${{ matrix.hdf5 }}-ubuntu-22.04
 
       - name: Check Cache
         shell: bash -l {0}
@@ -318,7 +337,7 @@ jobs:
   nc-ac-tests-oneoff-parallel:
 
     needs: build-deps-parallel
-    runs-on: ubuntu-latest
+    runs-on: ubuntu-22.04
 
     strategy:
       matrix:
@@ -344,7 +363,7 @@ jobs:
         uses: actions/cache@v4
         with:
           path: ~/environments/${{ matrix.hdf5 }}
-          key: hdf5-parallel-${{ runner.os }}-${{ matrix.hdf5 }}
+          key: hdf5-parallel-${{ runner.os }}-${{ matrix.hdf5 }}-ubuntu-22.04
 
       - name: Check Cache
         shell: bash -l {0}
@@ -375,17 +394,17 @@ jobs:
 
       - name: Build Library and Utilities
         shell: bash -l {0}
-        run: CFLAGS=${CFLAGS} LDFLAGS=${LDFLAGS} LD_LIBRARY_PATH=${LD_LIBRARY_PATH} CC=mpicc make -j
+        run: CFLAGS=${CFLAGS} LDFLAGS=${LDFLAGS} LD_LIBRARY_PATH=${LD_LIBRARY_PATH} CC=mpicc make -j 4
         if: ${{ success() }}
 
       - name: Build Tests
         shell: bash -l {0}
-        run: CFLAGS=${CFLAGS} LDFLAGS=${LDFLAGS} LD_LIBRARY_PATH=${LD_LIBRARY_PATH} CC=mpicc make check TESTS="" -j
+        run: CFLAGS=${CFLAGS} LDFLAGS=${LDFLAGS} LD_LIBRARY_PATH=${LD_LIBRARY_PATH} CC=mpicc make check TESTS="" -j 4
         if: ${{ success() }}
 
       - name: Run Tests
         shell: bash -l {0}
-        run: CFLAGS=${CFLAGS} LDFLAGS=${LDFLAGS} LD_LIBRARY_PATH=${LD_LIBRARY_PATH} CC=mpicc make check -j
+        run: CFLAGS=${CFLAGS} LDFLAGS=${LDFLAGS} LD_LIBRARY_PATH=${LD_LIBRARY_PATH} CC=mpicc make check -j 4
         if: ${{ success() }}
 
 
@@ -398,7 +417,7 @@ jobs:
   nc-cmake-tests-oneoff-serial-shared:
 
     needs: build-deps-serial
-    runs-on: ubuntu-latest
+    runs-on: ubuntu-22.04
 
     strategy:
       matrix:
@@ -428,7 +447,7 @@ jobs:
         uses: actions/cache@v4
         with:
           path: ~/environments/${{ matrix.hdf5 }}
-          key: hdf5-${{ runner.os }}-${{ matrix.hdf5 }}
+          key: hdf5-${{ runner.os }}-${{ matrix.hdf5 }}-ubuntu-22.04
 
       - name: Check Cache
         shell: bash -l {0}
@@ -462,14 +481,14 @@ jobs:
         shell: bash -l {0}
         run: |
           cd build
-          LD_LIBRARY_PATH=${LD_LIBRARY_PATH} ctest --output-on-failure -j 12 .
+          LD_LIBRARY_PATH=${LD_LIBRARY_PATH} ctest --output-on-failure -j 4 .
         if: ${{ success() }}
 
       - name: Verbose Output if CTest Failure
         shell: bash -l {0}
         run: |
           cd build
-          LD_LIBRARY_PATH=${LD_LIBRARY_PATH} ctest -j 12 --rerun-failed --output-on-failure -VV
+          LD_LIBRARY_PATH=${LD_LIBRARY_PATH} ctest -j 4 --rerun-failed --output-on-failure -VV
         if: ${{ failure() }}
 
  ##
@@ -478,7 +497,7 @@ jobs:
   nc-cmake-tests-oneoff-serial-static:
 
     needs: build-deps-serial
-    runs-on: ubuntu-latest
+    runs-on: ubuntu-22.04
 
     strategy:
       matrix:
@@ -509,7 +528,7 @@ jobs:
         uses: actions/cache@v4
         with:
           path: ~/environments/${{ matrix.hdf5 }}
-          key: hdf5-${{ runner.os }}-${{ matrix.hdf5 }}
+          key: hdf5-${{ runner.os }}-${{ matrix.hdf5 }}-ubuntu-22.04
 
       - name: Check Cache
         shell: bash -l {0}
@@ -560,7 +579,7 @@ jobs:
   nc-cmake-tests-oneoff-parallel:
 
     needs: build-deps-parallel
-    runs-on: ubuntu-latest
+    runs-on: ubuntu-22.04
 
     strategy:
       matrix:
@@ -590,7 +609,7 @@ jobs:
         uses: actions/cache@v4
         with:
           path: ~/environments/${{ matrix.hdf5 }}
-          key: hdf5-parallel-${{ runner.os }}-${{ matrix.hdf5 }}
+          key: hdf5-parallel-${{ runner.os }}-${{ matrix.hdf5 }}-ubuntu-22.04
 
       - name: Check Cache
         shell: bash -l {0}
@@ -637,7 +656,7 @@ jobs:
   nc-autotools:
 
     needs: [ nc-cmake-tests-oneoff-serial-shared, nc-cmake-tests-oneoff-serial-static, nc-ac-tests-oneoff-serial-shared, nc-ac-tests-oneoff-serial-static, nc-cmake-tests-oneoff-parallel, nc-ac-tests-oneoff-parallel ]
-    runs-on: ubuntu-latest
+    runs-on: ubuntu-22.04
 
     strategy:
       matrix:
@@ -705,7 +724,7 @@ jobs:
         uses: actions/cache@v4
         with:
           path: ~/environments/${{ matrix.hdf5 }}
-          key: hdf5-${{ runner.os }}-${{ matrix.hdf5 }}
+          key: hdf5-${{ runner.os }}-${{ matrix.hdf5 }}-ubuntu-22.04
 
       - name: Check Cache
         shell: bash -l {0}
@@ -801,7 +820,7 @@ jobs:
   nc-cmake:
 
     needs: [ nc-cmake-tests-oneoff-serial-shared, nc-cmake-tests-oneoff-serial-static, nc-ac-tests-oneoff-serial-shared, nc-ac-tests-oneoff-serial-static, nc-cmake-tests-oneoff-parallel, nc-ac-tests-oneoff-parallel ]
-    runs-on: ubuntu-latest
+    runs-on: ubuntu-22.04
 
     strategy:
       matrix:
@@ -848,7 +867,7 @@ jobs:
         uses: actions/cache@v4
         with:
           path: ~/environments/${{ matrix.hdf5 }}
-          key: hdf5-${{ runner.os }}-${{ matrix.hdf5 }}
+          key: hdf5-${{ runner.os }}-${{ matrix.hdf5 }}-ubuntu-22.04
 
       - name: Check Cache
         shell: bash -l {0}
diff --git a/test_common.in b/test_common.in
index 5a3d1c29e..878656876 100644
--- a/test_common.in
+++ b/test_common.in
@@ -201,7 +201,7 @@ fi
 
 # OS/X and windows apparently have no echo -n option, so fake it
 echon() {
-    ${execdir}/../ncdump/echon -n $@
+    echo $@ | tr -d '\n'
 }
 
 # Test for filter availability