Commit Graph

520 Commits

Author SHA1 Message Date
Dennis Heimbigner
a7fa2d8d95 It turns out the the type H5FD_class_t was changed
between HDF5 versions 1.8 and 1.10.
So modify H5FDhttp.c to be conditional on the
HDF5 major+minor version from H5public.h
2019-01-02 14:37:23 -07:00
Dennis Heimbigner
84c2bc0d78 Merge branch 'master' into byterange.dmh 2019-01-02 13:18:45 -07:00
Dennis Heimbigner
bf2746b8ea Provide byte-range reading of remote datasets
re: issue https://github.com/Unidata/netcdf-c/issues/1251

Assume that you have the URL to a remote dataset
which is a normal netcdf-3 or netcdf-4 file.

This PR allows the netcdf-c to read that dataset's
contents as a netcdf file using HTTP byte ranges
if the remote server supports byte-range access.

Originally, this PR was set up to access Amazon S3 objects,
but it can also access other remote datasets such as those
provided by a Thredds server via the HTTPServer access protocol.
It may also work for other kinds of servers.

Note that this is not intended as a true production
capability because, as is known, this kind of access to
can be quite slow. In addition, the byte-range IO drivers
do not currently do any sort of optimization or caching.

An additional goal here is to gain some experience with
the Amazon S3 REST protocol.

This architecture and its use documented in
the file docs/byterange.dox.

There are currently two test cases:

1. nc_test/tst_s3raw.c - this does a simple open, check format, close cycle
   for a remote netcdf-3 file and a remote netcdf-4 file.
2. nc_test/test_s3raw.sh - this uses ncdump to investigate some remote
   datasets.

This PR also incorporates significantly changed model inference code
(see the superceded PR https://github.com/Unidata/netcdf-c/pull/1259).

1. It centralizes the code that infers the dispatcher.
2. It adds support for byte-range URLs

Other changes:

1. NC_HDF5_finalize was not being properly called by nc_finalize().
2. Fix minor bug in ncgen3.l
3. fix memory leak in nc4info.c
4. add code to walk the .daprc triples and to replace protocol=
   fragment tag with a more general mode= tag.

Final Note:
Th inference code is still way too complicated. We need to move
to the validfile() model used by netcdf Java, where each
dispatcher is asked if it can process the file. This decentralizes
the inference code. This will be done after all the major new
dispatchers (PIO, Zarr, etc) have been implemented.
2019-01-01 18:27:36 -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
6e3d284fcc write coordinates hidden attribute for all variables 2018-12-19 09:16:21 -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
8ca5a1ac17
Merge branch 'master' into ejh_fast_var_prep 2018-12-12 07:05:45 -07:00
Ward Fisher
30ea33435c Merge remote-tracking branch 'origin/license_update.wif' into pr-aggregation.wif 2018-12-11 17:08:21 -05:00
Ward Fisher
50fa6b4f32 Merge branch 'ejh_next_22' of https://github.com/NetCDF-World-Domination-Council/netcdf-c into pr-aggregation.wif 2018-12-11 17:06:43 -05:00
Ward Fisher
dedc8e7dde Merge branch 'ejh_next_20' of https://github.com/NetCDF-World-Domination-Council/netcdf-c into pr-aggregation.wif 2018-12-11 17:06:32 -05:00
Ward Fisher
6deb77bade Merge branch 'master' into gh1207.dmh 2018-12-11 16:44:04 -05: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
28aa22f8cf cleanup and some comments for rec_write_metadata() 2018-12-11 09:33:46 -07:00
Ed Hartnett
8e1d781ea3 fixed error handling in write_dim(), also converted dimscale creation to H5Dcreate2() 2018-12-11 09:28:23 -07:00
Ed Hartnett
1a0cfb729e fixed error handling in write_var() 2018-12-11 08:10:08 -07:00
Ed Hartnett
26239a0897 cleaned up loop reattaching dimscales 2018-12-11 07:21:09 -07:00
Ed Hartnett
7b72d0b832 fixed error handling in attach_dimscales() 2018-12-11 07:15:46 -07:00
Ed Hartnett
39a0f822fa changed loop to use ncindexlookup() instead of looping through the names 2018-12-11 07:07:00 -07:00
Ed Hartnett
d7b657af4e cleaned up comments, changed loop to use ncindexlookup() instead of looping through the names 2018-12-11 06:43:27 -07:00
Ed Hartnett
53bdb74869 fixed error handling of write_netcdf4_dimid() 2018-12-11 06:38:23 -07:00
Ed Hartnett
ef5a39e19a cleaned up hdf5internal.c 2018-12-11 06:22:48 -07:00
Ed Hartnett
3c9a141ee3 moved function detect_preserve_dimids and made it static 2018-12-11 06:15:47 -07:00
Ward Fisher
87110139f6 More synchronization of copyright stanzas. 2018-12-06 14:34:40 -07:00
Ed Hartnett
f6443bce8f rest of separation of libhdf5 and libsrc4 2018-11-30 14:05:11 -07:00
Ed Hartnett
b5ed407e9f better handling of normalizing names in HDF5 atts 2018-11-30 13:28:18 -07:00
Ed Hartnett
d0587c9536 more name normalization 2018-11-30 09:14:53 -07:00
Ed Hartnett
77d0922d49 starting to deal with normalized name in HDF5 attribute code 2018-11-30 08:59:58 -07:00
Ed Hartnett
433499771b moved special att reading function to libhdf5 2018-11-30 07:50:15 -07:00
Ed Hartnett
104b4b50fe clean up 2018-11-29 06:25:34 -07:00
Ed Hartnett
d51b221c62 move setting of var chunk cache to libhdf5 2018-11-29 06:10:39 -07:00
Ed Hartnett
c824ad9ec9 further removal of libhdf5 code from libsrc4 2018-11-28 15:48:08 -07:00
Ed Hartnett
f9d3fff2c3 rest of removal of lazy att code from libsrc4 2018-11-26 11:11:56 -07:00
Ed Hartnett
016f675fad more separation of lazy att reads from libsrc4 2018-11-26 10:44:48 -07:00
Ed Hartnett
c56b1cecd4 moving lazy att code to libhdf5 2018-11-26 10:18:24 -07:00
Ed Hartnett
c710b42707 moving lazy att code to libhdf5 2018-11-26 10:14:03 -07:00
Ed Hartnett
cc18944fa7 moved lazy atts handling for nc_inq_attid() 2018-11-26 09:58:31 -07:00
Ed Hartnett
d97824d3e6 moved lazy atts handling for nc_inq_att() 2018-11-26 09:51:28 -07:00
Ed Hartnett
1f64c66cdf rename HDF5 dispatch functions to start with NC4_HDF5 2018-11-26 08:13:57 -07:00
Ed Hartnett
aade08ee22 moving checking for lazy att reads to libhdf5 2018-11-26 07:49:58 -07:00
Ed Hartnett
8bb644204e added hdf5dispatch.c to cmake build 2018-11-26 06:00:38 -07:00
Ed Hartnett
0e9784a867 more changes to separate HDF5 from libsrc4 initialization 2018-11-26 05:44:59 -07:00
Ed Hartnett
6f969b0117 separate HDF5 initialization 2018-11-26 05:35:44 -07:00
Ed Hartnett
64b45b5e75 changes in support of separating HDF5 and libsrc4 2018-11-26 04:40:33 -07:00
Ed Hartnett
f6c3093fb3 moved convert function to libsrc4 2018-11-21 14:49:52 -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
6829a583da changing over native_hdf_typeid 2018-11-20 10:52:43 -07:00
Ed Hartnett
52d58ecd2e changing over native_hdf_typeid 2018-11-20 10:49:26 -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
c072c89357 more type work 2018-11-20 09:57:47 -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
a431c61573 more type work 2018-11-20 08:21:02 -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
Dennis Heimbigner
4bb92b77db Fix error report coming out of nc4info.c
re: issue https://github.com/Unidata/netcdf-c/issues/1207

The NC4_get_provenance is generating a spurious error message.
This properly suppresses it.
2018-11-16 15:31:37 -07:00
Ed Hartnett
4c1b3a225b clean up 2018-11-16 10:07:54 -07:00
Ed Hartnett
262763c254 clean up 2018-11-16 10:01:31 -07:00
Ed Hartnett
8ae5ebf6bc remove unneeded params from function 2018-11-16 08:26:09 -07:00
Ed Hartnett
8aa4577bef merged ejh_next_7 2018-11-15 16:40:14 -07:00
Ward Fisher
53dc9022be Merge remote-tracking branch 'origin/ncgenmem.dmh' into tmptmp 2018-11-15 10:20:08 -07:00
Dennis Heimbigner
751300ec59 Fix more memory leaks in netcdf-c library
This is a follow up to PR https://github.com/Unidata/netcdf-c/pull/1173

Sorry that it is so big, but leak suppression can be complex.

This PR fixes all remaining memory leaks -- as determined by
-fsanitize=address, and with the exceptions noted below.

Unfortunately. there remains a significant leak that I cannot
solve. It involves vlens, and it is unclear if the leak is
occurring in the netcdf-c library or the HDF5 library.

I have added a check_PROGRAM to the ncdump directory to show the
problem.  The program is called tst_vlen_demo.c To exercise it,
build the netcdf library with -fsanitize=address enabled. Then
go into ncdump and do a "make clean check".  This should build
tst_vlen_demo without actually executing it.  Then do the
command "./tst_vlen_demo" to see the output of the memory
checker.  Note the the lost malloc is deep in the HDF5 library
(in H5Tvlen.c).

I am temporarily working around this error in the following way.
1. I modified several test scripts to not execute known vlen tests
   that fail as described above.
2. Added an environment variable called NC_VLEN_NOTEST.
   If set, then those specific tests are suppressed.

This should mean that the --disable-utilities option to
./configure should not need to be set to get a memory leak clean
build.  This should allow for detection of any new leaks.

Note: I used an environment variable rather than a ./configure
option to control the vlen tests. This is because it is
temporary (I hope) and because it is a bit tricky for shell
scripts to access ./configure options.

Finally, as before, this only been tested with netcdf-4 and hdf5 support.
2018-11-15 10:00:38 -07:00
Greg Sjaardema
cd011cd1bb Eliminate compiler warnings (and code error) 2018-11-14 11:00:47 -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
f6def4a089 moving some fill value handling to libhdf5 2018-11-13 15:37:49 -07:00
Ed Hartnett
9fee4db86b more var changes 2018-11-13 12:37:53 -07:00
Ed Hartnett
55ab435849 more var changes 2018-11-13 11:44:27 -07:00
Ed Hartnett
6c135d0c24 more var changes 2018-11-13 11:39:45 -07:00
Ed Hartnett
25fe9e8364 more var changes 2018-11-13 11:36:25 -07:00
Ed Hartnett
67317bf5a0 more var work 2018-11-13 11:30:23 -07:00
Ed Hartnett
1d951f6d04 more var changes to libhdf5 from libsrc4 2018-11-13 11:14:36 -07:00
Ed Hartnett
e1eeb309a1 more var changes to libhdf5 from libsrc4 2018-11-13 11:08:10 -07:00
Ed Hartnett
192a9b1b9e moving hdf5-specific var stuff 2018-11-13 10:18:29 -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
49e0c1dc87 setting values in libhdf5 version of var hdf5-specific info 2018-11-13 09:00:15 -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
d994a28139 allocating storage for var hdf5 info 2018-11-13 06:26:36 -07:00
Ed Hartnett
825047b8f6 rest of moving HDF5 specific group info to libhdf5 2018-11-12 14:04:17 -07:00
Ed Hartnett
79c2f843d8 rest of hdf5 specific group changes 2018-11-12 13:57:04 -07:00
Ed Hartnett
971b16cdc8 hdf5 specific changes for hdf5open.c 2018-11-12 13:51:08 -07:00
Ed Hartnett
766f1d0195 hdf5-specific changes for hdf5grp.c 2018-11-12 13:43:43 -07:00
Ed Hartnett
902ee64ff0 hdf5-specific group stuff for hdf5attr.c 2018-11-12 13:38:11 -07:00
Ed Hartnett
261c7fb8d6 hdf5-specific group info for nc4info.c 2018-11-12 13:06:15 -07:00
Ed Hartnett
9c3a8cb2c5 hdf5-specific group stuff in hdf5var.c 2018-11-12 13:01:54 -07:00
Ed Hartnett
5c7fc1fb55 HDF5-specific group changes 2018-11-12 12:52:24 -07:00
Ed Hartnett
e74009c708 HDF5-specific group changes 2018-11-12 12:32:21 -07:00
Ed Hartnett
c59d6930f0 HDF5-specific group changes 2018-11-12 12:12:56 -07:00
Ed Hartnett
65bde4878b HDF5-specific group changes 2018-11-12 11:03:00 -07:00
Ed Hartnett
d6c5e1f127 HDF5-specific group changes 2018-11-12 10:48:24 -07:00
Ed Hartnett
17552b7eb3 HDF5-specific group changes 2018-11-12 10:37:06 -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
1dd9004a11 more use of HDF5-specific dim info 2018-11-08 10:43:36 -07:00
Ed Hartnett
7ab71a69bb more use of HDF5-specific dim info 2018-11-08 10:40:39 -07:00
Ed Hartnett
30da28edff using hdf5-specific dim info 2018-11-08 10:37:32 -07:00
Ed Hartnett
0ef97a84f1 cleanup 2018-11-08 10:27:34 -07:00
Ed Hartnett
bff06f2c4d starting to use HDF5-specific dim info 2018-11-08 10:22:37 -07:00
Ed Hartnett
dab52a97ee more looking up of HDF5 dim info 2018-11-08 10:16:55 -07:00
Ed Hartnett
92dc85b802 continuing to set hdf5-specific dim info struct 2018-11-08 10:11:46 -07:00
Ed Hartnett
b85eec1bb8 starting to set hdf5-specific dim info struct 2018-11-08 10:07:59 -07:00
Ed Hartnett
e89ad03b24 more looking up HDF5-specific dim info 2018-11-08 10:02:17 -07:00
Ed Hartnett
3e80723525 continuing to find HDF5 specific dim info 2018-11-08 09:20:01 -07:00
Ed Hartnett
008d4ee796 starting to find HDF5 specific dim info 2018-11-08 08:57:44 -07:00
Ed Hartnett
9373989931 allocating and freeing space for HDF5-specific dim info 2018-11-08 08:51:46 -07:00
Ed Hartnett
8d31f5b806 clean up 2018-11-07 14:23:55 -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
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
452f75fadd commented out some tests 2018-10-22 15:04:44 -06:00
Ed Hartnett
958826d0af merged ejh_mem_check 2018-10-22 13:29:46 -06:00
Dennis Heimbigner
e40eb2e950 switch 2018-10-19 11:11:36 -06:00
Ed Hartnett
5cbde66781 now closing att HDF5 typeid in HDF5 close code 2018-10-18 03:43:53 -06:00
Ed Hartnett
695e295734 now calling recursive function to close HDF5 objects in file 2018-10-18 03:29:21 -06:00
Ed Hartnett
fa86d3c488 continuing to separate hdf5/libsrc4 file close code 2018-10-18 03:20:39 -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
979873f81d Fix provenance memory leak 2018-10-17 11:43:14 -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
Dennis Heimbigner
a5a34f6aba
Merge branch 'master' into nc_mpiio_nc_mpiposix 2018-10-06 13:33:55 -06:00
Wei-keng Liao
0ed70756cc Ignore flags NC_MPIIO and NC_MPIPOSIX. 2018-09-22 20:22:34 -05:00
Ed Hartnett
cc62140f1d
Merge branch 'master' into ejh_cache_sep 2018-09-18 16:59:49 -06:00
Ward Fisher
5259b4b1e8
Merge branch 'master' into ejh_hdf5_sep_next_2 2018-09-17 14:53:55 -06:00
Dennis Heimbigner
108dc0f01d Fix szip filter handling code and correspondingtests
re: https://github.com/Unidata/netcdf-c/issues/972

The current szip plugin code in the HDF5 library has some
unexpected behaviors that require some changes to how
nc_inq_var_szip is implemented and to the corresponding tests:
nc_test4/{test_szip,tst_vars3}.

Specifically, the following can happen:

1. The number of parameters provided by the user will be two,
   but the number of parameters returned by nc_inq_var_filter
   will be four because the HDF5 code (H5Zszip) will add two
   extra parameters for internal use. It turns out that the two
   parameters provided when calling nc_def_var_filter correspond
   to the first two parameters of the four parameters returned
   by nc_inq_var_filter.

2. The nc_inq_var_szip values corresponding to the ones provided
   by the caller may be different than those provided by
   nc_def_var_filter.  The value of the options_mask argument is
   known to add additional flag bits, and the pixels_per_block
   parameter may be modified.
2018-09-15 15:21:51 -06:00
Ed Hartnett
d9ef143d1e separated cache code from hdf5file.c 2018-09-14 13:33:22 -06:00
Ed Hartnett
b501748f58 fixed merge error 2018-09-14 11:56:10 -06:00
Ed Hartnett
a009dab557 fixed inadvertant move of function 2018-09-14 11:39:57 -06:00
Ed Hartnett
e2839c120f
Merge branch 'master' into ejh_hdf5_sep_next_2 2018-09-14 11:33:59 -06:00
Ed Hartnett
eabb690949 fixing merge issue 2018-09-12 09:36:36 -06:00
Ed Hartnett
abf247de92 made dumpopenobjects static in attempt to get appvayor build working 2018-09-12 07:53:31 -06:00
Ed Hartnett
90d5783eea removed commented-out code 2018-09-12 06:08:02 -06:00
Ed Hartnett
08a2dce904 merged master 2018-09-07 12:40:44 -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
86e002d794 merged master 2018-09-06 14:01:59 -06:00
Ed Hartnett
4213f10ed6 moved function 2018-09-06 13:57:39 -06:00
Ed Hartnett
e4b7c97b75 removed commented out code 2018-09-06 12:34:16 -06:00
Ed Hartnett
80dc5bc0f7 merged master 2018-09-06 12:24:29 -06:00
Ed Hartnett
6c86ad8229 moved functions back 2018-09-06 12:19:17 -06:00
Ward Fisher
fbe0a18b1c
Merge branch 'master' into ejh_loop_cleanup_2 2018-09-05 11:22:55 -06:00
Ward Fisher
d0bb5ddde8 Merge remote-tracking branch 'origin/inmemory10.dmh' into combined-pr.wif 2018-09-04 13:39:34 -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
ecffb53f40
Merge branch 'master' into NC_ENOTINDEFINE 2018-09-04 11:23:19 -06:00
Ward Fisher
ede7c5da60
Merge branch 'master' into provenance.dmh 2018-09-04 11:22:36 -06:00
Ed Hartnett
ad592448df merged master 2018-08-29 06:32:28 -06:00
Ed Hartnett
560fac9df3 merged master 2018-08-29 06:25:35 -06:00
Ed Hartnett
27281dfe4b
Merge branch 'master' into ejh_loop_cleanup_2 2018-08-28 17:32:40 -06:00
Ward Fisher
5e33522f52
Merge branch 'master' into default_format 2018-08-28 15:02:17 -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
5faa166e8e removed duplicated constant 2018-08-25 05:51:50 -06:00
Wei-keng Liao
116f303182 correct error code for operation not allowed in data mode is NC_ENOTINDEFINE 2018-08-24 21:26:25 -05:00
Ward Fisher
373d0365a1
Merge branch 'master' into default_format 2018-08-24 11:27:07 -06:00
Ed Hartnett
59307c405d removing unneeded function nc4_rec_find_nc_type 2018-08-22 06:29:44 -06:00
Ed Hartnett
8885c75ade removing unneeded lookups 2018-08-22 06:08:19 -06:00
Ed Hartnett
ff1b71a1e4 cleanup of unneeded find functions 2018-08-21 16:46:44 -06:00
Ed Hartnett
580fc89776 cleanup of NC4_abort 2018-08-21 16:41:57 -06:00
Ed Hartnett
f4c36b532f cleanup of NC4_abort 2018-08-21 16:40:32 -06:00
Ed Hartnett
8688b9cbf0 cleanup of NC4_sync 2018-08-21 16:37:12 -06:00
Ed Hartnett
d8c1a6209a removed unneeded lookup function 2018-08-21 11:54:06 -06:00
Ed Hartnett
42b9dc778f removing unneeded function nc4_rec_find_grp 2018-08-21 10:28:44 -06:00
Ed Hartnett
8d0844fa7d removing unneeded function calls 2018-08-21 10:20:32 -06:00
Ed Hartnett
e0bdcf5b64 clean up 2018-08-21 08:40:53 -06:00
Ed Hartnett
06db182eff cleaned up error handling in nc4_close_netcdf4_file 2018-08-21 08:32:39 -06:00
Ed Hartnett
c02f976d84 more tests 2018-08-20 17:05:29 -06:00
Ed Hartnett
fda87a8d5f now check for max of 32 dims for a var in HDF5 file 2018-08-20 09:53:08 -06:00
Ed Hartnett
f77350c66d testing error for HDF5 file with circular groups 2018-08-20 09:26:50 -06:00
Ed Hartnett
72805a5eed tracking enum issue 2018-08-20 05:45:30 -06:00
Ed Hartnett
0ad7118064 no longer delete/re-create att if we dont have to 2018-08-20 05:10:34 -06:00
Ed Hartnett
e7b7430e75 trying to sort out nctest issue 2018-08-19 05:55:05 -06:00
Ed Hartnett
412c18a4a1 fixed error handling in read_coord_dimids 2018-08-18 05:59:30 -06:00
Ed Hartnett
acc22e0c54 checking NULLs in function 2018-08-14 06:28:28 -06:00
Ed Hartnett
a0bea92919 fixed problem of not calling NC_ versions of vars and varm functions for extra error checking 2018-08-14 05:04:09 -06:00
Ed Hartnett
ec3d3a3d06 return error for put_vara calls with NULL start 2018-08-13 09:03:49 -06:00
Ed Hartnett
19222632b4 return error for put_vars calls with NULL start 2018-08-13 08:48:20 -06:00
Ed Hartnett
80d4b9fbb9 checking for user-defined type in put_vars 2018-08-09 10:13:31 -06:00
Ed Hartnett
252f1c3af5 further development 2018-08-09 07:21:49 -06:00
Ed Hartnett
2e7a7ea94e moved put and get vars functions from nc4hdf5.c to hdf5var.c 2018-08-09 06:44:38 -06:00
Ed Hartnett
5e9ffcaab3 renamed get_fill_value 2018-08-09 06:41:54 -06:00
Ed Hartnett
06ecd2412d merged master 2018-08-08 05:54:03 -06:00
Ed Hartnett
4a16369e0e undid inadvertant change 2018-08-06 16:42:59 -06:00
Ed Hartnett
edfa5bc442 finished fixes 2018-08-06 16:34:00 -06:00
Ed Hartnett
bf7ad679f7 finished fixes 2018-08-06 16:33:44 -06:00
Ed Hartnett
ad25807bd1
Merge branch 'master' into ejh_global_att_read 2018-08-06 16:30:26 -06:00
Ward Fisher
19a3472a45
Merge branch 'master' into ejh_hdf5_sep_file_info 2018-08-06 11:33:08 -06:00
Ward Fisher
5f89204bdb
Merge branch 'master' into ejh_func_cleanup3 2018-08-06 11:32:45 -06:00
Ed Hartnett
56a57a57f0 bring in changes from lazy vars branch 2018-08-06 10:57:19 -06:00
Ed Hartnett
5a452c5815 bring in changes from lazy vars branch 2018-08-06 10:49:31 -06:00
Ed Hartnett
9dc99c8a04 cleaned up some functions in preparation for lazy vars 2018-08-06 10:16:49 -06:00
Ed Hartnett
f443facac5 merged ejh_hdf5_sep_file_info 2018-08-06 09:57:17 -06:00
Dennis Heimbigner
f46b65c602 Clear up coverity complaints
with respect to this coverity report.

https://u2389337.ct.sendgrid.net/wf/click?upn=08onrYu34A-2BWcWUl-2F-2BfV0V05UPxvVjWch-2Bd2MGckcRZApv53Ry-2FReUME-2Fmei1et81WqdBwm5AxSAYBM9iFSmbw-3D-3D_YxTn3nq1kZ9CfXcyYFaB2DtJSVHTn8U-2BK0LV-2FDyLYKcFvnwYJ7pm2zFB5UovsEUh5miIfeCfQzYxpN9HYcdqs9sKVjtklOkfPIjEpg0Tj8G9wiptznJeX-2FO4PrqJA1ViQYtQfpjugq01XGMQ3-2Bll42dUMxrmbdYSqi8T7bCcANC5evyZs4MKvmAWXt1bnPaHcOYJDN-2FUt-2FJTlhwu91HyR7h-2FnkvMY9paYUNB1gxiyUA-3D
2018-08-04 13:22:29 -06:00
Ward Fisher
59e98ef087
Merge branch 'master' into default_format 2018-08-03 10:59:41 -06:00
Ed Hartnett
b9afdee6cd merged master 2018-07-31 19:44:28 -06:00
Ed Hartnett
7ab6d7bdda
Merge branch 'master' into ejh_global_att_read 2018-07-31 19:32:36 -06:00
Ed Hartnett
66b1884f41 fixed merge problem 2018-07-29 02:35:53 -06:00
Wei-keng Liao
0ee68a3263 This commit fixes the logical problem of using the default file formats.
The fix includes the following changes.
1. Checking and using the default file format at file create time is now
   done only when the create mode (argument cmode) does not include any
   format related flags, i.e. NC_64BIT_OFFSET, NC_64BIT_DATA,
   NC_CLASSIC_MODEL, and NC_NETCDF4.
2. Adjustment of cmode based on the default format is now done in
   NC_create() only. The idea is to adjust cmode before entering the
   dispatcher's file create subroutine.
3. Any adjustment of cmode is removed from all I/O dispatchers, i.e.
   NC4_create(), NC3_create(), and NCP_create().
4. Checking for illegal cmode has been done in check_create_mode() called
   in NC_create(). This commit removes the redundant checking from
   NCP_create().
5. Remove PnetCDF tests in nc_test/tst_names.c, so it can focus on testing
   all classic formats and netCDF4 formats.

Two new test programs are added. They can be used to test netCDF with and
without this commit.
1. nc_test/tst_default_format.c
2. nc_test/tst_default_format_pnetcdf.c (use when PnetCDF is enabled).
2018-07-28 11:18:28 -05:00
Ed Hartnett
df15707488
Merge branch 'master' into ejh_hdf5_sep_file_info 2018-07-28 08:16:26 -06:00
Ed Hartnett
37d2fa902e
Merge branch 'master' into ejh_hdf5_sep 2018-07-27 17:37:55 -06:00
Ed Hartnett
5631fa512a merged master 2018-07-24 01:51:51 -06:00
Ed Hartnett
c094baea42 merged master 2018-07-23 13:53:07 -06:00
Ed Hartnett
12b76d2dc5 merged master 2018-07-23 13:18:21 -06:00
Ed Hartnett
ee944c3fbb merged master 2018-07-23 10:58:14 -06:00
Ed Hartnett
da7af8f1e7 comment cleanup 2018-07-21 15:36:58 -06:00
Ed Hartnett
2cc3d10f4b comment cleanup 2018-07-21 10:47:01 -06:00
Ed Hartnett
5a52f28bb7 further condensing code 2018-07-21 10:43:36 -06:00
Ed Hartnett
48d6473844 further condensing code 2018-07-21 09:31:51 -06:00
Ed Hartnett
afa7c0a87d further condensing code 2018-07-21 09:26:16 -06:00
Ed Hartnett
21dade79a9 use same callback function for global and var atts 2018-07-21 09:20:22 -06:00
Ed Hartnett
b56a8edcc9 code cleanup 2018-07-21 09:09:12 -06:00
Ed Hartnett
a17d66f66b clean up 2018-07-21 07:35:27 -06:00
Ed Hartnett
7aed50a902 performance test for fast global att reads 2018-07-21 07:29:12 -06:00
Ed Hartnett
43f094ca50 changing the way global atts are read 2018-07-21 06:46:29 -06:00
Ed Hartnett
fcbd5226a7 clean up 2018-07-20 12:39:02 -06:00
Ed Hartnett
9849c23773 now using NC_HDF5_FILE_INFO_T for hdf5 specific file info 2018-07-19 13:07:13 -06:00
Ed Hartnett
a545c1526d further movement towards NC_HDF5_FILE_INFO_T 2018-07-19 13:00:34 -06:00
Ed Hartnett
4fb0e9d248 further movement towards NC_HDF5_FILE_INFO_T 2018-07-19 12:51:46 -06:00
Ed Hartnett
582bd5ec1a further movement towards NC_HDF5_FILE_INFO_T 2018-07-19 12:47:43 -06:00
Ed Hartnett
b1a478a497 further movement towards NC_HDF5_FILE_INFO_T 2018-07-19 12:44:02 -06:00
Ed Hartnett
43b6aeca34 further movement towards NC_HDF5_FILE_INFO_T 2018-07-19 12:39:49 -06:00
Ed Hartnett
2d53a8ece0 moving hdf5 field to NC_HDF5_FILE_INFO_T 2018-07-19 12:32:06 -06:00
Ed Hartnett
cd95f1fb24 continuing to add NC_HDF5_FILE_INFO_T to the code 2018-07-19 09:13:48 -06:00
Ed Hartnett
d1198a3667 whitespace cleanup 2018-07-19 07:33:48 -06:00
Ed Hartnett
9b0192fe94 moved memfile code to libhdf5 2018-07-19 07:26:27 -06:00
Ed Hartnett
3c0abc3d28 moved hdf5 var code to hdf5var.c 2018-07-19 07:23:03 -06:00
Ed Hartnett
bdca4313c4 split nc4var.c 2018-07-19 07:05:55 -06:00
Ed Hartnett
32c165ce2a fixed parallel build problem 2018-07-17 10:15:16 -06:00
Ed Hartnett
752e76df22 cleanup 2018-07-17 09:03:19 -06:00
Ed Hartnett
b0f9f965b7 clean up, moved hdf5open and hdf5create code to their own code files 2018-07-17 08:29:47 -06:00
Ed Hartnett
858f1dce02 split out hdf5create.c code 2018-07-17 08:00:47 -06:00
Ed Hartnett
396124c0ca merged ejh_hdf5internal 2018-07-17 07:56:09 -06:00