netcdf-c/libdispatch
Dennis Heimbigner 4636584d5b Revert/Improve nc_create + NC_DISKLESS behavior
re: https://github.com/Unidata/netcdf-c/issues/1154

Inadvertently, the behavior of NC_DISKLESS with nc_create() was
changed in release 4.6.1. Previously, the NC_WRITE flag needed
to be explicitly used with NC_DISKLESS in order to cause the
created file to be persisted to disk.

Additional analyis indicated that the current NC_DISKLESS
implementation was seriously flawed.

This PR attempts to clean up and regularize the situation with
respect to NC_DISKLESS control. One important aspect of diskless
operation is that there are two different notions of write.

1. The file is read-write vs read-only when using the netcdf API.
2. The file is persisted or not to disk at nc_close().

Previously, these two were conflated. The rules now are
as follows.

1. NC_DISKLESS + NC_WRITE means that the file is read/write using the netcdf API
2. NC_DISKLESS + NC_PERSIST means that the file is persisted to a disk file at nc_close.
3. NC_DISKLESS + NC_PERSIST + NC_WRITE means both 1 and 2.

The NC_PERSIST flag is new and takes over the obsolete NC_MPIPOSIX flag.
NC_MPIPOSIX is still defined, but is now an alias for the NC_MPIIO flag.

It is also now the case that for netcdf-4, NC_DISKLESS is independent
of NC_INMEMORY and in fact it is an error to specify both flags
simultaneously.

Finally, the MMAP code was fixed to use NC_PERSIST as well.
Also marked MMAP as deprecated.

Also added a test case to test various combinations of NC_DISKLESS,
NC_PERSIST, and NC_WRITE.

This PR affects a number of files and especially test cases
that used NC_DISKLESS.

Misc. Unrelated fixes
1. fixed some warnings in ncdump/dumplib.c
2018-10-10 13:32:17 -06:00
..
u
CMakeLists.txt added merged HDF4 changes 2018-04-04 14:11:44 -06:00
crc32.c The file libdispatch/crc32.c was apparently causing 2018-04-02 13:19:58 -06:00
crc32.h
datt.c
dattget.c Follow-up trivial typos 2018-04-26 23:04:01 -04:00
dattinq.c
dattput.c fixed docs 2018-08-24 14:15:59 -06:00
dauth.c Fix the NC_INMEMORY code to work in all cases with HDF5 1.10. 2018-09-04 11:27:47 -06:00
dcompound.c
dcopy.c
ddim.c
ddispatch.c Code duplicated; merge failure? 2018-05-18 20:28:51 -06:00
defcheck.c
denum.c
derror.c introduce error code NC_EPNETCDF for errors at PnetCDF level 2018-07-29 15:33:08 -05:00
dfile.c Revert/Improve nc_create + NC_DISKLESS behavior 2018-10-10 13:32:17 -06:00
dfilter.c
dgroup.c
dinternal.c
dnotnc3.c added merged HDF4 changes 2018-04-04 14:11:44 -06:00
dnotnc4.c added merged HDF4 changes 2018-04-04 14:11:44 -06:00
doffsets.c Re github issue https://github.com/Unidata/netcdf-c/issues/1131 2018-09-03 13:30:11 -06:00
dopaque.c
dparallel.c revise comments about collective I/O mode 2018-10-02 01:19:44 -05:00
drc.c Modify DAP2 and DAP4 to optionally allow Fillvalue/Variable mismatch 2018-10-01 15:51:43 -06:00
dreadonly.c Ignore flags NC_MPIIO and NC_MPIPOSIX. 2018-09-22 20:22:34 -05:00
dstring.c
dtype.c
dutf8.c More potential memory leaks squashed. 2018-06-07 15:58:47 -06:00
dutil.c Revert/Improve nc_create + NC_DISKLESS behavior 2018-10-10 13:32:17 -06:00
dv2i.c Replace quotes when including system includes, in support of https://github.com/Unidata/netcdf-c/issues/928 2018-04-18 10:51:03 -06:00
dvar.c Merge branch 'master' into ejh_loop_cleanup_2 2018-09-05 11:22:55 -06:00
dvarget.c converting NULL checking of put functions 2018-08-14 09:21:45 -06:00
dvarinq.c Fix szip filter handling code and correspondingtests 2018-09-15 15:21:51 -06:00
dvarput.c converting NULL checking of put functions 2018-08-14 09:21:45 -06:00
dvlen.c Follow-up trivial typos 2018-04-26 23:04:01 -04:00
dwinpath.c Modify DAP2 and DAP4 to optionally allow Fillvalue/Variable mismatch 2018-10-01 15:51:43 -06:00
heap
json.c
Make0
Makefile.am added merged HDF4 changes 2018-04-04 14:11:44 -06:00
nc.c return NC_ENOTBUILT when CDF5 is not enabled but NC_64BIT_DATA is used 2018-09-17 17:18:48 -05:00
ncaux.c
ncbytes.c
nchashmap.c Clear up coverity complaints 2018-08-04 13:22:29 -06:00
nclist.c
nclistmgr.c
nclog.c Modify DAP2 and DAP4 to optionally allow Fillvalue/Variable mismatch 2018-10-01 15:51:43 -06:00
ncsettings.hdr
nctime.c
ncuri.c fixed clang warning in ncuri.c 2018-07-06 06:52:02 -06:00
netcdf.m4
stubdef.c
test_ncuri.c
test_pathcvt.c
u8.c
u8.h
utf8proc_data.c
utf8proc.c
utf8proc.h