Commit Graph

342 Commits

Author SHA1 Message Date
Ward Fisher
a499bf1ed8 Extending when attributes are copied. 2016-06-14 10:29:14 -06:00
Ward Fisher
13b088f49f Moved fix out to a separate function so that we can hopefully address a few other NCO-reported issues. 2016-06-14 10:22:06 -06:00
Ward Fisher
1ebb104f74 Tentatively fixed https://github.com/Unidata/netcdf-c/issues/239 but the test needs to be extended. 2016-06-10 17:03:08 -06:00
Ward Fisher
2edc4ce64a Added a fix as contributed by Kent at HDF group for a collective I/O, parallel issue. 2016-06-09 14:16:20 -06:00
dmh
5bfdf54263 The name hash for hdf4 variables was
not being computed. Fix in nc4file.c.
Not sure how this ever worked for any variable.
What is also weird is that the dim hash is
apparently being computed.
2016-06-01 15:20:36 -06:00
Dennis Heimbigner
835511eaeb HDF5 is generating unnecessary error messages when netcdf4 logging is enabled
re: github netcdf-c issue #271

This occurs for several reasons, including:
1. using H5Aopen_name instead of H5Aexists to test if attribute exists.
2. using H5Eset_auto instead of H5Eset_auto2.
There are probably others that will have to be extinguished as encountered.
p.s Hope I did not overdo this and kill too much.
2016-05-27 10:08:01 -06:00
Dennis Heimbigner
8c1f8f57ee re: https://github.com/Unidata/netcdf-c/issues/269
The hash field for phony dimensions was not being set
(in nc4hdf.c). Also added test case (nc_test4/?).
Note that I searched for other similar failures and
did not find any, but I may have missed them.
2016-05-24 19:37:21 -06:00
Greg Sjaardema
4d037a1f62 Check for valid MPI_Comm before freeing
If in parallel mode and the H5Fcreate fails, then the h5->comm field may/will point to MPI_COMM_NULL instead of to a valid communicator.  If that is passed to MPI_Comm_free, then the code will core dump down in the MPI_Comm_free function and not return a valid return status to the caller routine. If communicator is checked, then execution proceeds back up the call tree and caller can report a better error message about the failed file create.
2016-05-24 10:50:00 -06:00
Ward Fisher
fcca7ae57d Merge branch 'master' into provfix 2016-05-16 12:39:15 -06:00
Dennis Heimbigner
4fa1470241 re: github issue https://github.com/Unidata/netcdf-c/issues/265
Charlie Zender noted that we forgot to define what happens for
various netcdf API attribute operations, notably nc_inq_att()
and nc_get_att().
So, I added a list of legal and illegal api calls for the provenance
attributes in docs/attribute_conventions.md.
I also added more test cases to ncdump/tst_fileinfo.c to verify
and fixed resultant errors.
2016-05-15 18:03:04 -06:00
Dennis Heimbigner
7e0db68dce Finally get around to removing all that
obsolete pnetcdf related code in libsrc4.
2016-05-14 22:31:41 -06:00
Ward Fisher
e4d79dbb6c Removed an unused, unneeded struct, NCdata, that was causing problems on Visual Studio because it was empty. 2016-05-10 11:11:50 -06:00
Dennis Heimbigner
11a259ad86 Add provenance info for netcdf-4 files.
This consists of a persistent attribute named
_NCProperties plus two computed attributes
_IsNetcdf4 and _SuperblockVersion.
See the 'Provenance Attributes' section
of docs/attribute_conventions.md for details.
2016-05-07 14:32:07 -06:00
Ward Fisher
493a6e5d62 Found pre-existing call to H5Pset_libver_bounds, modified it so that the generated files would be created without the 1.10 specific things. 2016-04-08 21:36:08 +00:00
dmh
764a1c40a3 ckp 2016-04-06 19:51:40 -06:00
Ward Fisher
0bb9856880 Merge branch 'upstream' of https://github.com/gsjaardema/netcdf-c into gs-pulls 2016-03-04 14:58:10 -07:00
Greg Sjaardema
4ccebf25b5 Use dim field of var instead of finding dim from var->dimids.
The var struct has a 'dim' field which was not being used
Instead, the dimids field would always search for the dim
with the matching dimid.  For db with large numbers of dims,
this could be a significant time sync.

Modified code to always set var-dim[i] when var->dimids[i] was
set (if the dim existed at that point).  Then use the var->dim
field instead of var->dimids and search whenever requested.

All var->dim accesses are protected by asserts that verify
non-null and that the var->dim[]->dimid == var->dimids[].
2016-03-04 10:45:36 -07:00
Greg Sjaardema
1a84a6a99e Add hash field to dim and var to facilitate fast name compare
In non-classic netcdf-4 models, it is allowable to have
large numbers of dims and vars.  In many operations, the
entire list of dims or vars is searched for a dim/var matching
a specific name which results in *lots* of strncmp or strcmp
calls.

If we add a hash field to the var and dim structs similar to what
has already been done for the netcdf-3 formats, then we can hash the
name being searched for and numerically compare that value with
the var/dim hash value.  If they match, then do a more expensive
strncmp call to ensure that the names truly match.
2016-03-03 13:18:31 -07:00
Ward Fisher
332d71fd1a Merge branch 'master' into gh223 2016-02-19 15:32:50 -07:00
Ward Fisher
d8b65ccea1 Fix for https://github.com/Unidata/netcdf-c/issues/223 2016-02-19 15:05:39 -07:00
Ward Fisher
db84f39adc Tentative, robust fix for https://github.com/Unidata/netcdf-c/issues/221 that does not immediately introduce other issues into ncdump. Broader validation pending. 2016-02-18 15:42:03 -07:00
Ward Fisher
9791b1a397 Tentative fix for initial issue at http://github.com/Unidata/netcdf-c/issues/221 . investigating knock-on issues now. 2016-02-18 14:46:16 -07:00
Dennis Heimbigner
45572f5971 Fix github issue: https://github.com/Unidata/netcdf-c/issues/208
Return an error when specifying deflation (compression) or fletcher32 on
a file created for parallel IO in netcdf-4.
2016-02-01 16:15:58 -07:00
Dennis Heimbigner
b5ba424793 Clean up the handling of hdf5 initialization by
creating an nc4_hdf5_initialize(void) function
plus nc4_hdf5_initialized flag.
Also fix potential null exception in nc4internal.c
2016-01-28 16:19:38 -07:00
Ward Fisher
bb00562779 Addressed a static-analysis issue. 2015-12-31 11:47:39 -07:00
Ward Fisher
473259b772 Corrected issue where overwriting an attribute of type NC_CHAR with NC_STRING would result in dangling data. 2015-11-11 11:32:12 -07:00
Ward Fisher
c1210f4020 Merge branch 'master' into cdf5-sync-master 2015-11-09 13:45:11 -07:00
dmh
5ad26bb68f Fix github issues #140
1. Added check to libsrc4/nc4var.nc_def_var_extra to
   check that the no specified chunks size is greater than
   the dimension size.

2. Added test to nc_test4/tst_chunks.c
2015-11-07 20:29:16 -07:00
Ward Fisher
612b35a84c Merge branch 'master' into cdf-5, in preparation for merging the CDF-5 functionality into the master branch. This will be the key new feature for netcdf 4.4.0. 2015-11-05 13:40:35 -07:00
Ward Fisher
519a56019f Merge branch 'fix-typos' of https://github.com/tbeu/netcdf-c into tbeu-fix-typos 2015-10-16 14:16:09 -06:00
dmh
49597a64af merge-squash 2015-10-09 10:12:11 -06:00
Russ Rew
d3d442537d Fix 1D variables with an unlimited dimension taking DEFAULT_CHUNK_SIZE (4MiB), by default, in netCDF-4 files 2015-09-29 13:58:51 -06:00
dmh
5b89b22021 missing include file 2015-09-18 11:11:57 -06:00
dmh
0a7ff043a2 re: Jira NCF-320
Partially resolve by making
string variables and attributes use
UTF-8 encoding.
Normalization is not necessarily fixed,
however.
2015-08-20 15:53:48 -06:00
tbeu
e2820e4d8a Fix common typos
Detected by https://github.com/vlajos/misspell_fixer
2015-08-20 11:42:05 +02:00
Ward Fisher
bb42e4639e Addressed conflict between master, mem2. 2015-06-02 15:03:12 -06:00
Ward Fisher
cf6d87f1dc [NCF-332] Addressed the issue in get_netcdf_type_from_hdf4() by adding case statements explicitly for the little-endian hdf4 values as defined by http://www.hdfgroup.org/training/HDFtraining/UsersGuide/Fundmtls.fm3.html. 2015-05-28 17:27:57 -06:00
Ward Fisher
afa157f918 Started adding checks for little-endian HDF data types [NCF-332] 2015-05-28 16:41:48 -06:00
dmh
3dd807a155 The original mem branch somehow got
hosed, so I rebuilt it as a new mem2 branch.
2015-05-28 15:10:10 -06:00
Ward Fisher
167835ea32 Added a check to avoid passing 0 to malloc; in this case gcc will return a pointer but some other compilers will return NULL, which is then flagged as a malloc failure. Attempting to bypass this behavior. 2015-05-20 11:11:19 -06:00
Ward Fisher
9d98aab40a Refactored test. 2015-05-15 15:29:29 -06:00
Ward Fisher
99ef1624bc Regarding [NCF-331], the issues appears to have been in nc4file.c:get_type_info2(). The call to H5Tget_order() was only happening for H5T_Float. According to the documentation, this works for all datatypes as of hdf5 1.8.6. This tentatively fixes the bug reported, but additional testing (and cleanup from debugging) is needed. 2015-05-15 14:24:27 -06:00
Ward Fisher
999f4e5720 Additional debugging, modified the LOGGING functions somewhat. Also modified ncdump to print 'native' endianness. This may be removed before merging back into trunk. 2015-05-14 17:22:07 -06:00
Ward Fisher
4c07e22ae4 Progress working towards [NCF-329] 2015-04-21 13:52:43 -06:00
Russ Rew
ab18a2e17c Fix bug NCF-187 (thanks to Alexander Barth). Add test for bug fix. 2015-04-02 12:30:51 -06:00
Quincey Koziol
aede522766 Mark dataset attributes dirty when one is renamed. 2015-02-25 09:25:40 -06:00
Ward Fisher
dd2ae92a48 Corrected a potential dereference of a null pointer. 2015-02-11 13:13:39 -07:00
Ward Fisher
c1875ec8f0 Addressed a couple of memory leaks identified by clang. 2015-02-10 13:39:15 -07:00
Russ Rew
72c3e5809a Fix comment, small memory leak 2015-02-05 16:33:42 -07:00
Ward Fisher
e2a56efa9c Merge branch 'NCF-324' of https://github.com/qkoziol/netcdf-c into qkoziol-NCF-324 2015-02-04 09:54:17 -07:00