Skip to content

Commit 48b630f

Browse files
committed
Overriding ADIOS with PnetCDF (CDF-5 format) for file creation
When creating a new file with the ADIOS I/O type, if the file name matches the regex provided at configure time, override the type with PnetCDF. This workaround was introduced in a previous PR. The fallback now uses the CDF-5 format to support 64 bit dimensions and variable sizes, as commonly required in large MPAS history files.
1 parent 0db08f6 commit 48b630f

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/clib/pioc_support.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3196,11 +3196,15 @@ int spio_createfile_int(int iosysid, int *ncidp, const int *iotype, const char *
31963196
#ifdef _PNETCDF
31973197
if (ios->io_rank == 0)
31983198
{
3199-
printf("PIO: WARNING: Creating file %s with PnetCDF instead of ADIOS (matched regex: %s)\n",
3199+
printf("PIO: WARNING: Creating file %s with PnetCDF (CDF-5 format) instead of ADIOS (matched regex: %s)\n",
32003200
filename, SPIO_OVERRIDE_ADIOS_WITH_PNETCDF_FNAME_REGEX);
32013201
}
32023202

32033203
file->iotype = PIO_IOTYPE_PNETCDF;
3204+
3205+
/* Use CDF-5 format to support 64 bit dimensions and sizes in PnetCDF fallback */
3206+
file->mode &= ~(NC_CLASSIC_MODEL | NC_64BIT_OFFSET | NC_NETCDF4);
3207+
file->mode |= NC_64BIT_DATA;
32043208
#else
32053209
if (ios->io_rank == 0)
32063210
{

0 commit comments

Comments
 (0)