Commit Graph

632 Commits

Author SHA1 Message Date
Ed Hartnett
f6c3093fb3 moved convert function to libsrc4 2018-11-21 14:49:52 -07:00
Ed Hartnett
6bebb703a6 trying types again 2018-11-20 06:37:53 -07:00
Ed Hartnett
b5be30175d cleanup 2018-11-19 09:35:29 -07:00
Ed Hartnett
8fe3ee0dc4 clean up 2018-11-16 10:11:41 -07:00
Ed Hartnett
4c1b3a225b clean up 2018-11-16 10:07:54 -07:00
Ed Hartnett
8ae5ebf6bc remove unneeded params from function 2018-11-16 08:26:09 -07:00
Ed Hartnett
60a33b9e8b removed hdf5 stuff from NC_FIELD_INFO_T 2018-11-15 16:46:22 -07:00
Ed Hartnett
6a66ecd3d0 moving rest of var stuff 2018-11-13 17:03:11 -07:00
Ed Hartnett
4045588516 removing hid_t from NC_VAR_INFO_T 2018-11-13 16:10:34 -07:00
Ed Hartnett
f6def4a089 moving some fill value handling to libhdf5 2018-11-13 15:37:49 -07:00
Ed Hartnett
ce43b7d772 free hdf5-specific var info and cleanup 2018-11-13 05:58:54 -07:00
Ed Hartnett
578ddb2a28 cleaning up nc4internal.h 2018-11-13 05:27:46 -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
8aabd2020c moving HDF5 dim fields to hdf5internal.h from nc4internal.h 2018-11-08 07:09:11 -07:00
Ed Hartnett
7e4138a11c comment 2018-11-07 14:26:08 -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
1d952cb43a clean up 2018-10-23 07:52:11 -06:00
Ed Hartnett
be4fe7a921 clean up 2018-10-23 07:41:16 -06:00
Ed Hartnett
c2cb3379f4 doing HDF5 closing in libhdf5 2018-10-23 06:59:22 -06:00
Ed Hartnett
35cfaefc0c closing HDF5 objects separately 2018-10-23 05:39:00 -06:00
Ed Hartnett
6589867154 clean up var_free 2018-10-23 05:07:52 -06:00
Ed Hartnett
452f75fadd commented out some tests 2018-10-22 15:04:44 -06:00
Ed Hartnett
5cbde66781 now closing att HDF5 typeid in HDF5 close code 2018-10-18 03:43:53 -06:00
Ed Hartnett
8390d572ad
Merge branch 'master' into ejh_hdf5_sep_next 2018-09-06 17:30:37 -06:00
Ward Fisher
784d777bff Merge branch 'master' into provenance.dmh 2018-09-06 15:13:09 -06:00
Ed Hartnett
80dc5bc0f7 merged master 2018-09-06 12:24:29 -06:00
Ward Fisher
fbe0a18b1c
Merge branch 'master' into ejh_loop_cleanup_2 2018-09-05 11:22:55 -06:00
Dennis Heimbigner
d62a9e623c Fix the NC_INMEMORY code to work in all cases with HDF5 1.10.
re: github issue https://github.com/Unidata/netcdf-c/issues/1111

One of the less common use cases for the in-memory feature is
apparently failing with HDF5-1.10.x.  The fix is complicated and
requires significant changes to libhdf5/nc4memcb.c. The current
setup is detailed in the file docs/inmeminternal.dox.

Additionally, it was discovered that the program
nc_test/tst_inmemory.c, which is invoked by
nc_test/run_inmemory.sh, actually was failing because of the
above problem. But the failure is not detected since the script
does not return non-zero value.

Other Changes:
1. Fix nc_test_tst_inmemory to return errors correctly.
2. Make ncdap_tests/findtestserver.c and dap4_tests/findtestserver4.c
   be generated from ncdap_test/findtestserver.c.in.
3. Make LOG() print output to stderr instead of stdout to
   avoid contaminating e.g. ncdump output.
4. Modify the handling of NC_INMEMORY and NC_DISKLESS flags
   to properly handle that NC_DISKLESS => NC_INMEMORY. This
   affects a number of code pieces, especially memio.c.
2018-09-04 11:27:47 -06:00
Ward Fisher
ede7c5da60
Merge branch 'master' into provenance.dmh 2018-09-04 11:22:36 -06:00
Dennis Heimbigner
2ea1cf5f1b There was a request to extend the provenance information
stored in the _NCProperties attribute to allow two things:
1. capture of additional library dependencies (over and above
   hdf5)
2. Recognition of non-netcdf libraries that create netcdf-4 format
   files.

To this end, the _NCProperties format has been extended to be
and arbitrary set of key=value pairs separated by commas.
This new format has version = 2, and uses commas as the pair separator.
Thus the general form is:
    _NCProperties = "version=2,key1=value,key2=value2..." ;

This new version is accompanied by a new ./configure option of the form
    --with-ncproperties="key1=value1,key2=value2..."
that specifies pairs to add to the _NCProperties attribute for all
files created with that netcdf library.

At this point, what is missing is some programmatic way to
specify either all the pairs or additional pairs
to the _NCProperties attribute. Not sure of the best way
to do this.

Builders using non-netcdf libraries can specify
whatever they want in the key value pairs (as long
as the version=2 is specified first).

By convention, the primary library is expected to be the
the first pair after the leading version=2 pair, but this
is convention only and is neither required nor enforced.

Related changes:
1. Fixed the tests that check _NCProperties to properly operate with version=2.
2. When reading a version 1 _NCProperties attribute, convert it to look
   like a version 2 attribute.
2. Added some version 2 tests to ncdump/tst_fileinfo.c and
   ncdump/tst_fileinfo.sh

Misc Changes:
1. Fix minor problem in ncdap_test/testurl.sh where a parameter to
   buildurl needed to be quoted.
2. Minor fix to ncgen to swap switches -H and -h to be consistent
   with other utilities.
3. Document the -M flag in nccopy usage() and the nccopy man page.
4. Modify a test case to use the nccopy -M flag.
2018-08-25 21:44:41 -06:00
Ed Hartnett
00a8bbad8d cleanup 2018-08-22 07:03:37 -06:00
Ed Hartnett
59307c405d removing unneeded function nc4_rec_find_nc_type 2018-08-22 06:29:44 -06:00
Ed Hartnett
86cfc48a92 removing unneeded lookups 2018-08-22 06:13:53 -06:00
Ed Hartnett
8885c75ade removing unneeded lookups 2018-08-22 06:08:19 -06:00
Ed Hartnett
d8c1a6209a removed unneeded lookup function 2018-08-21 11:54:06 -06:00
Ed Hartnett
990a75d5d7 clean up of find_grp functions 2018-08-21 11:23:12 -06:00
Ed Hartnett
ece953458d cleanup of group find functions 2018-08-21 10:50:32 -06:00
Ed Hartnett
42b9dc778f removing unneeded function nc4_rec_find_grp 2018-08-21 10:28:44 -06:00
Ed Hartnett
0feeba691e removed enum test file from configure because it is not being used 2018-08-21 07:24:43 -06:00
Ed Hartnett
3bbc590045 merged master 2018-08-20 17:08:20 -06:00
Ed Hartnett
b3842197e0 merged master 2018-08-16 05:49:41 -06:00
Ed Hartnett
d59446ccd5
Merge branch 'master' into ejh_func_cleanup3 2018-08-15 18:08:34 -06:00
Ed Hartnett
b5999278cc added nc4_find_grp_h5_var 2018-08-09 06:47:45 -06:00
Ed Hartnett
a65078040d whitespace cleanup 2018-08-07 15:17:40 -06:00
Ed Hartnett
9dc99c8a04 cleaned up some functions in preparation for lazy vars 2018-08-06 10:16:49 -06:00
Ed Hartnett
c1acba1f07 redid branch for PR 2018-07-29 04:57:25 -06:00
Ed Hartnett
5a52f28bb7 further condensing code 2018-07-21 10:43:36 -06:00