re NCF-319

The pnetcdf support was not
properly being used to provide
mpi parallel io for netcdf-3 classic
files. The wrong dispatch table was being
used.  The fix was to modify
dfile.c#NC_check_file_type to properly
specify the pnetcdf dispatch table when
use_parallel was true.
This commit is contained in:
dmh 2014-10-13 14:33:06 -06:00
parent 938e8d260e
commit d67d00ca7e
5 changed files with 31 additions and 7 deletions

View File

@ -9,6 +9,11 @@ This file contains a high-level description of this package's evolution. Release
### 4.3.3-rc3 Released ?
* The pnetcdf support was not properly being used to provide
mpi parallel io for netcdf-3 classic files. The wrong
dispatch table was being used.
[NCF-319](https://bugtracking.unidata.ucar.edu/browse/NCF-319)
* Fixed bug in ncgen. When classic format was in force (k=1 or k=4),
the "long" datatype should be treated as int32. Was returning an error.
[NCF-318](https://bugtracking.unidata.ucar.edu/browse/NCF-318)

13
cf
View File

@ -12,6 +12,12 @@ DAP=1
#HDF4=1
#PNETCDF=1
#PAR=1
if test "x$PNETCDF" = x1 ; then
PAR=1
fi
#RPC=1
#PGI=1
#M32=1
@ -103,7 +109,6 @@ fi
CXXFLAGS="$CPPFLAGS $CXXFLAGS"
FLAGS="--prefix ${PREFIX}"
#FLAGS="$FLAGS --disable-f77 --disable-f90"
#FLAGS="$FLAGS --disable-cxx"
@ -117,7 +122,7 @@ FLAGS="$FLAGS --disable-examples"
#FLAGS="$FLAGS --enable-large-file-tests"
#FLAGS="$FLAGS --disable-testsets"
#FLAGS="$FLAGS --disable-dap-remote-tests"
FLAGS="$FLAGS --enable-dap-auth-tests"
#FLAGS="$FLAGS --enable-dap-auth-tests"
#FLAGS="$FLAGS --enable-doxygen"
#FLAGS="$FLAGS --enable-logging"
#FLAGS="$FLAGS --disable-diskless"
@ -134,6 +139,10 @@ else
FLAGS="$FLAGS --enable-shared"
fi
if test "x${PAR}" = x ; then
FLAGS="$FLAGS --disable-parallel"
fi
if test "x$HDF5" = "x" ; then
FLAGS="$FLAGS --disable-netcdf-4"
fi

View File

@ -1537,13 +1537,14 @@ NC_create(const char *path, int cmode, size_t initialsz,
if(cmode & NC_NETCDF4)
model = NC_DISPATCH_NC4;
else
#endif
#ifdef USE_PNETCDF
if(cmode & NC_PNETCDF)
model = NC_DISPATCH_NC5;
else
#endif
if(cmode & NC_CLASSIC_MODEL)
model = NC_DISPATCH_NC3;
#ifdef USE_PNETCDF
else if(cmode & NC_PNETCDF)
model = NC_DISPATCH_NC5;
#endif
}
if(model == 0) {
@ -1716,7 +1717,12 @@ Not longer needed
cmode &= ~NC_NETCDF4; /* must be netcdf-3 */
if(version == 2) cmode |= NC_64BIT_OFFSET;
} else if(model & NC_DISPATCH_NC5) {
#if 0
It appears that pnetcdf can read NC_64_BIT_OFFSET
cmode &= ~(NC_NETCDF4 | NC_64BIT_OFFSET); /* must be pnetcdf */
#else
cmode &= ~(NC_NETCDF4);
#endif
cmode |= NC_PNETCDF;
}

View File

@ -72,7 +72,11 @@ NC5_create(const char *path, int cmode,
/* Fix up the cmode by keeping only essential flags;
these are the flags that are the same in netcf.h and pnetcdf.h
*/
#if 0
cmode &= (NC_WRITE | NC_NOCLOBBER | NC_LOCK | NC_SHARE | NC_64BIT_OFFSET);
#else
cmode &= (NC_WRITE | NC_NOCLOBBER | NC_LOCK | NC_SHARE );
#endif
/* It turns out that pnetcdf.h defines a flag called
NC_64BIT_DATA (not to be confused with NC_64BIT_OFFSET).

View File

@ -1,5 +1,5 @@
# Test c output
T=tst_settings
T=test_read
#VG=valgrind --leak-check=full
CFLAGS=-g -O0 -I.. -I../include