diff --git a/.github/workflows/withspack.yml b/.github/workflows/withspack.yml index 998d61ea0..21e373cdc 100644 --- a/.github/workflows/withspack.yml +++ b/.github/workflows/withspack.yml @@ -59,8 +59,8 @@ jobs: # 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 + spack uninstall -y parallelio@develop+pnetcdf+fortran ^mpich || true + spack dev-build -d $GITHUB_WORKSPACE parallelio@develop+pnetcdf+fortran ^mpich - name: Test parallelio run: | @@ -72,6 +72,6 @@ jobs: popd - - name: Setup tmate session - if: ${{ failure() }} - uses: mxschmitt/action-tmate@v3 +# - name: Setup tmate session +# if: ${{ failure() }} +# uses: mxschmitt/action-tmate@v3 diff --git a/src/clib/pio.h b/src/clib/pio.h index a4b20b752..b15d61b0b 100644 --- a/src/clib/pio.h +++ b/src/clib/pio.h @@ -27,6 +27,9 @@ (((NC_VERSION_MAJOR == Maj) && (NC_VERSION_MINOR == Min) && (NC_VERSION_PATCH >= Pat)) || \ ((NC_VERSION_MAJOR == Maj) && (NC_VERSION_MINOR > Min)) || (NC_VERSION_MAJOR > Maj)) +#ifndef NC_FillValue +#define NC_FillValue _FillValue +#endif /** PIO_OFFSET is an integer type of size sufficient to represent the * size (in bytes) of the largest file supported by MPI. This is not diff --git a/src/clib/pio_nc.c b/src/clib/pio_nc.c index 2808e45ec..d6849b59a 100644 --- a/src/clib/pio_nc.c +++ b/src/clib/pio_nc.c @@ -2322,7 +2322,7 @@ PIOc_def_var(int ncid, const char *name, nc_type xtype, int ndims, * * When the fill mode for the file is NC_FILL, then fill values are * used for missing data. This function sets the fill value to be used - * for a variable. If no specific fill value is set (as a _FillValue + * for a variable. If no specific fill value is set (as a NC_FillValue * attribute), then the default fill values from netcdf.h are used. * * NetCDF-4 and pnetcdf files allow setting fill_mode (to NC_FILL or @@ -2430,7 +2430,7 @@ PIOc_def_var_fill(int ncid, int varid, int fill_mode, const void *fill_valuep) { ierr = nc_set_fill(file->fh, NC_FILL, NULL); if (!ierr) - ierr = nc_put_att(file->fh, varid, _FillValue, xtype, 1, fill_valuep); + ierr = nc_put_att(file->fh, varid, NC_FillValue, xtype, 1, fill_valuep); } } else @@ -2477,7 +2477,7 @@ PIOc_inq_var_fill(int ncid, int varid, int *no_fill, void *fill_valuep) { iosystem_desc_t *ios; /* Pointer to io system information. */ file_desc_t *file; /* Pointer to file information. */ - nc_type xtype; /* Type of variable and its _FillValue attribute. */ + nc_type xtype; /* Type of variable and its NC_FillValue attribute. */ PIO_Offset type_size; /* Size in bytes of this variable's type. */ int mpierr = MPI_SUCCESS, mpierr2; /* Return code from MPI function codes. */ int ierr = PIO_NOERR; /* Return code from function calls. */ @@ -2574,7 +2574,7 @@ PIOc_inq_var_fill(int ncid, int varid, int *no_fill, void *fill_valuep) if (!ierr && fill_valuep) { - ierr = nc_get_att(file->fh, varid, _FillValue, fill_valuep); + ierr = nc_get_att(file->fh, varid, NC_FillValue, fill_valuep); if (ierr == NC_ENOTATT) { char char_fill_value = NC_FILL_CHAR;