Skip to content

Commit

Permalink
Merge pull request #1995 from jedwards4b/fillvalue_fix.wif
Browse files Browse the repository at this point in the history
Fillvalue fix.wif
  • Loading branch information
jedwards4b authored Feb 14, 2025
2 parents fcb8529 + 6b60bc8 commit b38e34e
Show file tree
Hide file tree
Showing 21 changed files with 50 additions and 49 deletions.
2 changes: 1 addition & 1 deletion .github/actions/buildhdf5/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ inputs:
runs:
using: composite
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
repository: HDFGroup/hdf5
path: hdf5-src
Expand Down
2 changes: 1 addition & 1 deletion .github/actions/buildmpich/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ inputs:
runs:
using: composite
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
repository: pmodels/mpich
path: mpich-src
Expand Down
2 changes: 1 addition & 1 deletion .github/actions/buildnetcdf/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ inputs:
runs:
using: composite
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
repository: Unidata/netcdf-c
path: netcdf-c-src
Expand Down
2 changes: 1 addition & 1 deletion .github/actions/buildnetcdff/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ inputs:
runs:
using: composite
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
repository: Unidata/netcdf-fortran
path: netcdf-fortran-src
Expand Down
2 changes: 1 addition & 1 deletion .github/actions/buildopenmpi/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ inputs:
runs:
using: composite
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
repository: open-mpi/ompi
path: openmpi-src
Expand Down
4 changes: 2 additions & 2 deletions .github/actions/buildpnetcdf/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ description: 'Build the pnetcdf library'
inputs:
pnetcdf_version:
description: 'Tag in the pnetcdf repository to use'
default: checkpoint.1.12.3
default: checkpoint.1.14.0
required: False
type: string
install_prefix:
Expand All @@ -23,7 +23,7 @@ inputs:
runs:
using: composite
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
repository: Parallel-NetCDF/PnetCDF
path: pnetcdf-src
Expand Down
6 changes: 3 additions & 3 deletions .github/actions/parallelio_autotools/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ description: 'Build the parallelio library using cmake'
inputs:
parallelio_version:
description: 'Tag in the parallelio repository to use'
default: pio2_5_10
default: pio2_6_3
required: False
type: string
shared_libraries:
Expand Down Expand Up @@ -101,12 +101,12 @@ runs:
using: composite
steps:
- name: Check if already present
uses: andstor/file-existence-action@v2
uses: andstor/file-existence-action@v3
with:
files: ${{ inputs.src_path }}
- name: get parallelio
if: ${{ steps.check_files.outputs.files_exists != 'true' }}
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
repository: NCAR/ParallelIO
path: ${{ inputs.src_path }}
Expand Down
4 changes: 2 additions & 2 deletions .github/actions/parallelio_cmake/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ description: 'Build the parallelio library using cmake'
inputs:
parallelio_version:
description: 'Tag in the parallelio repository to use'
default: pio2_5_9
default: pio2_6_3
required: False
type: string
shared_libraries:
Expand Down Expand Up @@ -110,7 +110,7 @@ inputs:
runs:
using: composite
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
repository: NCAR/ParallelIO
path: parallelio-src
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/cmake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
# LDFLAGS: "-static-libasan"
# ASAN_OPTIONS: "detect_odr_violation=0"
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Installs
run: |
set -x
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/cmake_ubuntu_latest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
PNETCDF_VERSION: checkpoint.1.12.3
FCFLAGS: "-fallow-argument-mismatch"
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Installs
run: |
set -x
Expand All @@ -36,7 +36,7 @@ jobs:
- name: cache-pnetcdf
id: cache-pnetcdf
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ~/pnetcdf
key: pnetcdf-${{ runner.os }}-${{ env.PNETCDF_VERSION }}
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/netcdf_hdf5_no_pnetcdf_ncint_mpich.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,13 @@ jobs:
FFLAGS: "-fallow-argument-mismatch"
FCFLAGS: "-fallow-argument-mismatch"
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Installs
run: |
sudo apt-get install doxygen graphviz wget gfortran libjpeg-dev libz-dev libcurl4-gnutls-dev
- name: cache-mpich
id: cache-mpich
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ~/work/ParallelIO/ParallelIO/mpich
key: mpich-${{ runner.os }}-${{ env.MPICH_VERSION }}
Expand All @@ -39,7 +39,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 }}-mpich-${{ env.MPICH_VERSION }}
Expand All @@ -55,7 +55,7 @@ jobs:

- name: cache-netcdf
id: cache-netcdf
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ~/work/ParallelIO/ParallelIO/netcdf
key: netcdf-${{ runner.os }}-${{ env.NETCDF_C_VERSION }}-${{ env.NETCDF_FORTRAN_VERSION }}-mpich-${{ env.MPICH_VERSION }}-hdf5-${{ env.HDF5_VERSION }}
Expand All @@ -79,7 +79,7 @@ jobs:

- name: cache-netcdf-fortran
id: cache-netcdf-fortran
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ~/netcdf-fortran
key: netcdf-fortran-${{ runner.os }}-${{ env.NETCDF_FORTRAN_VERSION }}-mpich-${{ env.MPICH_VERSION }}-hdf5-${{ env.HDF5_VERSION }}
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/netcdf_hdf5_pnetcdf_ncint_mpich_asan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,13 @@ jobs:
FCFLAGS: "-fallow-argument-mismatch"
FFLAGS: "-fallow-argument-mismatch"
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Installs
run: |
sudo apt-get install doxygen graphviz wget gfortran libjpeg-dev libz-dev
- name: cache-mpich
id: cache-mpich
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ~/mpich
key: mpich-${{ runner.os }}-${{ env.MPICH_VERSION }}
Expand All @@ -40,7 +40,7 @@ jobs:

- name: cache-hdf5
id: cache-hdf5
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ~/hdf5
key: hdf5-${{ runner.os }}-${{ env.HDF5_VERSION }}-mpich-${{ env.MPICH_VERSION }}
Expand All @@ -55,7 +55,7 @@ jobs:
mpi_path: $HOME/mpich
- name: cache-netcdf-c
id: cache-netcdf-c
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ~/netcdf-c
key: netcdf-c-${{ runner.os }}-${{ env.NETCDF_C_VERSION }}-mpich-${{ env.MPICH_VERSION }}-hdf5-${{ env.HDF5_VERSION }}
Expand All @@ -69,7 +69,7 @@ jobs:

- name: cache-netcdf-fortran
id: cache-netcdf-fortran
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ~/netcdf-fortran
key: netcdf-fortran-${{ runner.os }}-${{ env.NETCDF_F_VERSION }}-mpich-${{ env.MPICH_VERSION }}-hdf5-${{ env.HDF5_VERSION_MAJOR }}.${{ env.HDF5_VERSION_PATCH }}
Expand All @@ -84,7 +84,7 @@ jobs:

- name: cache-pnetcdf
id: cache-pnetcdf
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ~/pnetcdf
key: pnetcdf-${{ runner.os }}-${{ env.PNETCDF_VERSION }}-mpich-${{ env.MPICH_VERSION }}
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/netcdf_pnetcdf_openmpi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,13 @@ jobs:
FCFLAGS: "-fallow-argument-mismatch"
FFLAGS: "-fallow-argument-mismatch"
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Installs
run: |
sudo apt-get install doxygen graphviz wget gfortran libjpeg-dev libz-dev
- name: cache-openmpi
id: cache-openmpi
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ~/work/ParallelIO/ParallelIO/openmpi
key: openmpi-${{ runner.os }}-${{ env.OPENMPI_VERSION }}
Expand All @@ -42,7 +42,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 }}-openmpi-${{ env.OPENMPI_VERSION }}
Expand All @@ -58,7 +58,7 @@ jobs:

- name: cache-netcdf
id: cache-netcdf
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ~/work/ParallelIO/ParallelIO/netcdf
key: netcdf-${{ runner.os }}-${{ env.NETCDF_C_VERSION }}-${{ env.NETCDF_FORTRAN_VERSION }}-openmpi-${{ env.OPENMPI_VERSION }}-hdf5-${{ env.HDF5_VERSION }}
Expand All @@ -73,7 +73,7 @@ jobs:

# - name: Setup tmate session
# if: ${{ failure() }}
# uses: mxschmitt/action-tmate@v3
# uses: mxschmitt/action-tmate@v4

- name: Build NetCDF Fortran
if: steps.cache-netcdf.outputs.cache-hit != 'true'
Expand All @@ -85,7 +85,7 @@ jobs:

# - name: cache-pnetcdf
# id: cache-pnetcdf
# uses: actions/cache@v3
# uses: actions/cache@v4
# with:
# path: ~/pnetcdf
# key: pnetcdf-${{ runner.os }}-${{ env.PNETCDF_VERSION }}-openmpi-${{ env.OPENMPI_VERSION_MAJOR }}.${{ env.OPENMPI_VERSION_PATCH }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/strict_autotools_ubuntu_latest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
FCFLAGS: "-fallow-argument-mismatch -Wall"
PNETCDF_VERSION: checkpoint.1.12.3
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Installs
run: |
set -x
Expand All @@ -29,7 +29,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 }}-openmpi
Expand Down
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ project (PIO C)
# The project version number.
set(VERSION_MAJOR 2 CACHE STRING "Project major version number.")
set(VERSION_MINOR 6 CACHE STRING "Project minor version number.")
set(VERSION_PATCH 2 CACHE STRING "Project patch version number.")
set(VERSION_PATCH 5 CACHE STRING "Project patch version number.")
mark_as_advanced(VERSION_MAJOR VERSION_MINOR VERSION_PATCH)

# Create version info in autotools parlance for pio_meta.h.
Expand Down Expand Up @@ -352,7 +352,7 @@ CHECK_C_SOURCE_COMPILES("
#if !NC_HAS_SZIP_WRITE
choke me
#endif
int main() {return 0;}" HAVE_SZIP_WRITE)
int main() {return 0;}" USE_SZIP)

###
# Check to see if parallel filters are supported by HDF5/netcdf-c.
Expand Down
6 changes: 3 additions & 3 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
## Ed Hartnett 8/16/17

# Initialize autoconf and automake.
AC_INIT(pio, 2.6.2)
AC_INIT(pio, 2.6.5)
AC_CONFIG_SRCDIR(src/clib/pio_darray.c)
AM_INIT_AUTOMAKE([foreign serial-tests])

Expand All @@ -11,15 +11,15 @@ AM_INIT_AUTOMAKE([foreign serial-tests])
# AC_DEFINE_UNQUOTED for config.h.
AC_SUBST([PIO_VERSION_MAJOR]) PIO_VERSION_MAJOR=2
AC_SUBST([PIO_VERSION_MINOR]) PIO_VERSION_MINOR=6
AC_SUBST([PIO_VERSION_PATCH]) PIO_VERSION_PATCH=2
AC_SUBST([PIO_VERSION_PATCH]) PIO_VERSION_PATCH=5
AC_DEFINE_UNQUOTED([PIO_VERSION_MAJOR], [$PIO_VERSION_MAJOR], [PIO major version])
AC_DEFINE_UNQUOTED([PIO_VERSION_MINOR], [$PIO_VERSION_MINOR], [PIO minor version])
AC_DEFINE_UNQUOTED([PIO_VERSION_PATCH], [$PIO_VERSION_PATCH], [PIO patch version])

# Once more for the documentation.
AC_SUBST([VERSION_MAJOR], [2])
AC_SUBST([VERSION_MINOR], [6])
AC_SUBST([VERSION_PATCH], [2])
AC_SUBST([VERSION_PATCH], [5])


# The m4 directory holds macros for autoconf.
Expand Down
3 changes: 3 additions & 0 deletions src/clib/pio.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 4 additions & 4 deletions src/clib/pio_nc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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. */
Expand Down Expand Up @@ -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;
Expand Down
Loading

0 comments on commit b38e34e

Please sign in to comment.