Commit Graph

81 Commits

Author SHA1 Message Date
Ed Hartnett
840d51d035 changed NC_GRP_INFO_T to use atts_read instead of atts_not_read 2019-01-22 08:11:52 -07:00
Ed Hartnett
243cef8fa5 changed var atts_not_read to atts_read 2019-01-21 08:40:04 -07:00
Ed Hartnett
adb3356aff merged ejh_test_pnetcdf, fixes broken logging statement, added comments 2019-01-20 09:42:18 -07:00
Ed Hartnett
029aa5f626 now using hidden coordinates att to speed file opens 2018-12-20 05:59:31 -07:00
Ed Hartnett
7249350c3f now remember whether coords att has been read for a var 2018-12-19 09:43:32 -07:00
Ed Hartnett
f5c7209838 comment and code cleanup 2018-12-19 09:10:15 -07:00
Ed Hartnett
070214f81a more comments, code cleanup 2018-12-19 06:52:26 -07:00
Ed Hartnett
25184f3843 moved code to get_attached_info() 2018-12-18 09:16:03 -07:00
Ed Hartnett
1b38d9aef8 lazy read of some var metadata 2018-12-18 07:48:22 -07:00
Ed Hartnett
e9bd94821d split out some var meta reading, fixed setting of var->container 2018-12-17 08:41:43 -07:00
Ed Hartnett
77b3a81d86 starting to deal with var metadata separately 2018-12-17 08:25:19 -07:00
Ed Hartnett
aaa5a50ca9 cleanup of hdf5open.c, now check for COORDINATES hidden att and use it to find dimids if available 2018-12-11 09:57:08 -07:00
Ed Hartnett
dc1115ae76 moved rec_match_dimscales() to hdf5open.c, made it faster by skipping already-identified dims 2018-12-11 09:40:59 -07:00
Ed Hartnett
26db90e4e3 changes 2018-11-21 07:39:05 -07:00
Ed Hartnett
c1ffb92a7f checking return value for HDF5 function call 2018-11-20 15:43:34 -07:00
Ed Hartnett
ab963e3d41 removing HDF5 type info from libsrc4 2018-11-20 14:24:40 -07:00
Ed Hartnett
9aedbd0c41 changing over native_hdf_typeid 2018-11-20 10:55:45 -07:00
Ed Hartnett
d29feb53de have switched location of hdf_native_typeid 2018-11-20 10:29:02 -07:00
Ed Hartnett
9e970562cf more type work 2018-11-20 10:01:39 -07:00
Ed Hartnett
2708f5b660 more type work 2018-11-20 09:11:28 -07:00
Ed Hartnett
e11e9b7bfd more type work 2018-11-20 09:06:40 -07:00
Ed Hartnett
5104262f6b changing types 2018-11-20 08:00:48 -07:00
Ed Hartnett
b5be30175d cleanup 2018-11-19 09:35:29 -07:00
Ed Hartnett
1d5307b600 merged in ejh_next_10 2018-11-19 09:25:04 -07:00
Ed Hartnett
3ec8b34bfb removed unneeded HDF5 fields 2018-11-19 09:23:43 -07:00
Ed Hartnett
8ae5ebf6bc remove unneeded params from function 2018-11-16 08:26:09 -07:00
Ed Hartnett
6a66ecd3d0 moving rest of var stuff 2018-11-13 17:03:11 -07:00
Ed Hartnett
d7fe095066 moving rest of var stuff 2018-11-13 16:59:07 -07:00
Ed Hartnett
4045588516 removing hid_t from NC_VAR_INFO_T 2018-11-13 16:10:34 -07:00
Ed Hartnett
a9a0e5ba39 moving hdf5-specific var stuff 2018-11-13 10:04:55 -07:00
Ed Hartnett
18ca0e4e9a changing var to libhdf5 info 2018-11-13 09:58:32 -07:00
Ed Hartnett
87ddebac4b setting values for var hdf5 info 2018-11-13 07:31:59 -07:00
Ed Hartnett
421eb32ea0 allocating storage for var hdf5 info 2018-11-13 06:34:09 -07:00
Ed Hartnett
825047b8f6 rest of moving HDF5 specific group info to libhdf5 2018-11-12 14:04:17 -07:00
Ed Hartnett
971b16cdc8 hdf5 specific changes for hdf5open.c 2018-11-12 13:51:08 -07:00
Ed Hartnett
65bde4878b HDF5-specific group changes 2018-11-12 11:03:00 -07:00
Ed Hartnett
6b75bb483b allocating HDF5-specific group info struct for root group 2018-11-12 09:02:46 -07:00
Ed Hartnett
9364157a9b allocating and freeing memory for HDF5-specific group info 2018-11-12 08:11:06 -07:00
Ed Hartnett
7534cb24fe cleanup 2018-11-08 11:12:38 -07:00
Ed Hartnett
e88b98daaa moving hdf5_objid field to hdf5-specific dim info 2018-11-08 11:05:20 -07:00
Ed Hartnett
856e4ead03 moved hdf_dimscaleid to hdf5-specific dim info 2018-11-08 10:55:21 -07:00
Ed Hartnett
cc02ec3aa3 more use of HDF5-specific dim info 2018-11-08 10:48:02 -07:00
Ed Hartnett
3e80723525 continuing to find HDF5 specific dim info 2018-11-08 09:20:01 -07:00
Ed Hartnett
9373989931 allocating and freeing space for HDF5-specific dim info 2018-11-08 08:51:46 -07:00
Ed Hartnett
6f4b4ac80d moving attribute HDF5 stuff to libhdf5 2018-11-07 14:21:57 -07:00
Ed Hartnett
11d725facc allocating and freeing memory for hdf5-specific attribute info 2018-11-07 13:45:51 -07:00
Ed Hartnett
5f36a3b425 merged master 2018-11-02 10:00:53 -06:00
Dennis Heimbigner
245961de00 re: github issues
https://github.com/Unidata/netcdf-c/issues/1168
    https://github.com/Unidata/netcdf-c/issues/1163
    https://github.com/Unidata/netcdf-c/issues/1162

This PR partially fixes memory leaks in the netcdf-c library,
in the ncdump utility, and in some test cases.

The netcdf-c library now runs memory clean with the assumption
that the --disable-utilities option is used. The primary remaining
problem is ncgen. Once that is fixed, I believe the netcdf-c library
will run memory clean with no limitations.

Notes
-----------
1. Memory checking was performed using gcc -fsanitize=address.
   Valgrind-based testing has yet to be performed.
2. The pnetcdf, hdf4, and examples code has not been tested.

Misc. Non-leak changes
1. Make tst_diskless2 only run when netcdf4 is enabled (issue 1162)
2. Fix CmakeLists.txt to turn off logging if ENABLE_NETCDF_4 is OFF
3. Isolated all my debug scripts into a single top-level directory
   called debug
4. Fix some USE_NETCDF4 dependencies in nc_test and nc_test4 Makefile.am
2018-10-30 20:48:12 -06:00
Ed Hartnett
c90ab24b48 moving towards separating HDF5 file close from netcdf4 file close 2018-10-18 03:17:38 -06:00
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