mirror of
https://github.com/Unidata/netcdf-c.git
synced 2025-03-01 17:06:03 +08:00
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 |
||
---|---|---|
.. | ||
cdl | ||
expected | ||
bom.c | ||
cdl.h | ||
chunkspec.c | ||
chunkspec.h | ||
CMakeLists.txt | ||
ctests.sh | ||
depend | ||
dimmap.c | ||
dimmap.h | ||
dumplib.c | ||
dumplib.h | ||
env | ||
indent.c | ||
indent.h | ||
inttags4.cdl | ||
inttags.cdl | ||
isnan.h | ||
L512.bin | ||
list.c | ||
list.h | ||
Make0 | ||
Makefile.am | ||
nc4print.c | ||
nccomps.h | ||
nccopy.1 | ||
nccopy.c | ||
ncdump.1 | ||
ncdump.c | ||
ncdump.h | ||
nciter.c | ||
nciter.h | ||
nctime0.c | ||
nctime0.h | ||
nctrunc.c | ||
ocprint.c | ||
ref1.ncml | ||
ref_ctest1_nc4.cdl | ||
ref_ctest1_nc4c.cdl | ||
ref_ctest64.c | ||
ref_ctest.c | ||
ref_inttags4.cdl | ||
ref_inttags.cdl | ||
ref_nc_test_netcdf4_4_0.nc | ||
ref_nc_test_netcdf4.cdl | ||
ref_nccopy3_subset.nc | ||
ref_null_byte_padding_test.nc | ||
ref_provenance_v1.nc | ||
ref_test_360_day_1900.cdl | ||
ref_test_360_day_1900.nc | ||
ref_test_365_day_1900.cdl | ||
ref_test_365_day_1900.nc | ||
ref_test_366_day_1900.cdl | ||
ref_test_366_day_1900.nc | ||
ref_test_corrupt_magic.nc | ||
ref_times.cdl | ||
ref_tst_charfill.cdl | ||
ref_tst_comp2.cdl | ||
ref_tst_comp.cdl | ||
ref_tst_compounds2.cdl | ||
ref_tst_compounds2.nc | ||
ref_tst_compounds3.cdl | ||
ref_tst_compounds3.nc | ||
ref_tst_compounds4.cdl | ||
ref_tst_compounds4.nc | ||
ref_tst_enum_data.cdl | ||
ref_tst_fillbug.cdl | ||
ref_tst_format_att_64.cdl | ||
ref_tst_format_att.cdl | ||
ref_tst_group_data_v23.cdl | ||
ref_tst_group_data.cdl | ||
ref_tst_grp_spec0.cdl | ||
ref_tst_grp_spec.cdl | ||
ref_tst_irish_rover.nc | ||
ref_tst_mud4_chars.cdl | ||
ref_tst_mud4-bc.cdl | ||
ref_tst_mud4.cdl | ||
ref_tst_nans.cdl | ||
ref_tst_nc4_utf8_4.cdl | ||
ref_tst_ncf213.cdl | ||
ref_tst_noncoord.cdl | ||
ref_tst_opaque_data.cdl | ||
ref_tst_small.cdl | ||
ref_tst_solar_1.cdl | ||
ref_tst_solar_2.cdl | ||
ref_tst_special_atts3.cdl | ||
ref_tst_special_atts.cdl | ||
ref_tst_string_data.cdl | ||
ref_tst_unicode.cdl | ||
ref_tst_utf8_4.cdl | ||
ref_tst_utf8.cdl | ||
ref_tst_vlen_data2.cdl | ||
ref_tst_vlen_data.cdl | ||
rewrite-scalar.c | ||
run_back_comp_tests.sh | ||
run_ncgen_nc4_tests.sh | ||
run_ncgen_tests.sh | ||
run_tests.sh | ||
run_utf8_nc4_tests.sh | ||
run_utf8_tests.sh | ||
small2.cdl | ||
small.cdl | ||
test0.cdl | ||
test_corrupt_magic.cdl | ||
tst_64bit.sh | ||
tst_bom.sh | ||
tst_brecs.cdl | ||
tst_bug321.cdl | ||
tst_calendars.cdl | ||
tst_calendars.sh | ||
tst_charfill.cdl | ||
tst_charfill.sh | ||
tst_chunking.c | ||
tst_comp2.c | ||
tst_comp.c | ||
tst_compress.c | ||
tst_create_files.c | ||
tst_dimsizes.c | ||
tst_dimsizes.sh | ||
tst_enum_data.c | ||
tst_fileinfo.c | ||
tst_fileinfo.sh | ||
tst_fillbug.c | ||
tst_fillbug.sh | ||
tst_formatx3.sh | ||
tst_formatx4.sh | ||
tst_group_data.c | ||
tst_grp_spec.sh | ||
tst_h_rdc0.c | ||
tst_h_scalar.c | ||
tst_h_scalar.sh | ||
tst_hdf5_offset.sh | ||
tst_inmemory_nc3.sh | ||
tst_inmemory_nc4.sh | ||
tst_inttags4.sh | ||
tst_inttags.sh | ||
tst_iter.sh | ||
tst_lengths.sh | ||
tst_mslp.cdl | ||
tst_mud.sh | ||
tst_nans.c | ||
tst_nccopy3_subset.sh | ||
tst_nccopy3.sh | ||
tst_nccopy4.sh | ||
tst_nccopy5.sh | ||
tst_ncgen4_classic.sh | ||
tst_ncgen4_cycle.sh | ||
tst_ncgen4_diff.sh | ||
tst_ncgen4.sh | ||
tst_ncgen_shared.sh | ||
tst_ncml.cdl | ||
tst_netcdf4_4.sh | ||
tst_netcdf4.sh | ||
tst_null_byte_padding.sh | ||
tst_opaque_data.c | ||
tst_output.sh | ||
tst_special_atts.c | ||
tst_string_data.c | ||
tst_unicode.c | ||
tst_utf8.c | ||
tst_vlen_data.c | ||
utils.c | ||
utils.h | ||
vardata.c | ||
vardata.h | ||
XGetopt.c |