netcdf-c/include
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
..
.gitignore
ceconstraints.h
CMakeLists.txt Finalize the compression support. 2017-04-27 13:01:59 -06:00
err_macros.h getting parallel benchmarks to work, cleanup of benchmark scripts 2018-08-24 08:59:58 -06:00
fbits.h
hdf4dispatch.h add a missed update to NC_HDF4_open 2018-09-23 01:36:50 -05:00
hdf5internal.h merged master 2018-09-07 12:40:44 -06:00
Makefile.am moved hdf5 specific header stuff to hdf5internal.h 2018-07-12 07:05:21 -06:00
nc3dispatch.h Ignore flags NC_MPIIO and NC_MPIPOSIX. 2018-09-22 20:22:34 -05:00
nc3internal.h This Pre removed #include <netcdf.h> from netcdf_mem.h. 2018-10-07 12:05:26 -06:00
nc4dispatch.h Ignore flags NC_MPIIO and NC_MPIPOSIX. 2018-09-22 20:22:34 -05:00
nc4internal.h This Pre removed #include <netcdf.h> from netcdf_mem.h. 2018-10-07 12:05:26 -06:00
nc_hashmap.h
nc_logging.h only define nc_set_log_level() to nothing for netcdf-4 builds 2018-07-16 13:47:18 -06:00
nc_tests.h fixed many benchmark warnings 2018-08-23 08:21:55 -06:00
nc.h Improve parallel create/open mode logic. 2018-09-17 17:18:48 -05:00
ncauth.h This pr should probably be delayed until after Version 4.5. 2017-09-02 18:09:36 -06:00
ncaux.h
ncbytes.h Fix pull request https://github.com/Unidata/netcdf-c/pull/374 (dap4.dmh) 2017-04-03 21:39:44 -06:00
ncconfigure.h Fixed a shell script error on vs15 2018-05-14 14:37:07 -06:00
ncdap.h Modify DAP2 and DAP4 to optionally allow Fillvalue/Variable mismatch 2018-10-01 15:51:43 -06:00
ncdimscale.h moved hdf5 specific header stuff to hdf5internal.h 2018-07-12 07:05:21 -06:00
ncdispatch.h Merge branch 'master' into nc_mpiio_nc_mpiposix 2018-10-09 15:21:50 -06:00
ncexternl.h Fix pull request https://github.com/Unidata/netcdf-c/pull/374 (dap4.dmh) 2017-04-03 21:39:44 -06:00
ncfilter.h Rebuilt the filter parameter handling code to use a common 2018-01-23 16:00:11 -07:00
nchashmap.h This completes (for now) the refactoring of libsrc4. 2018-03-16 11:46:18 -06:00
ncindex.h This completes (for now) the refactoring of libsrc4. 2018-03-16 11:46:18 -06:00
nclist.h This completes (for now) the refactoring of libsrc4. 2018-03-16 11:46:18 -06:00
nclog.h Modify DAP2 and DAP4 to optionally allow Fillvalue/Variable mismatch 2018-10-01 15:51:43 -06:00
ncoffsets.h Re github issue https://github.com/Unidata/netcdf-c/issues/1131 2018-09-03 13:30:11 -06:00
ncrc.h Revert/Improve nc_create + NC_DISKLESS behavior 2018-10-10 13:32:17 -06:00
nctestserver.h Fix the NC_INMEMORY code to work in all cases with HDF5 1.10. 2018-09-04 11:27:47 -06:00
nctime.h Solve issue https://github.com/Unidata/netcdf-c/issues/359 2017-07-24 18:59:16 -06:00
ncuri.h Made some changes to export symbols on Windows builds. 2018-08-02 14:58:47 -06:00
ncutf8.h re: pull request https://github.com/Unidata/netcdf-c/pull/364 2017-06-18 21:06:19 -06:00
ncwinpath.h Fix the NC_INMEMORY code to work in all cases with HDF5 1.10. 2018-09-04 11:27:47 -06:00
netcdf_f.h
netcdf_mem.h Remove unneeded include of netcdf.h from netcdf_mem.h 2018-09-23 14:16:45 -06:00
netcdf_meta.h.in Use PnetCDF instead of parallel-netcdf to avoid confusion with 2018-09-17 17:18:48 -05:00
netcdf_par.h added more documentation 2017-11-08 03:33:44 -07:00
netcdf.h Revert/Improve nc_create + NC_DISKLESS behavior 2018-10-10 13:32:17 -06:00
onstack.h onstack: check whether HAVE_ALLOCA_H is defined or not 2018-02-19 10:14:19 -05:00
rnd.h added guards for header files that needed them 2018-01-17 09:20:20 -07:00
XGetopt.h