Commit Graph

325 Commits

Author SHA1 Message Date
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
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
Ward Fisher
dd2318b725 Added fencepost for cross-dll memory freeing in Windows/Visual Studio 2015-02-02 14:46:51 -07:00
Quincey Koziol
4f8898719a NCF-324: Make similar change to get_vara code, and add in test to Makefile.am 2015-02-02 08:51:00 -06:00
Quincey Koziol
e9484cc7e6 NCF-324 - Don't reopen HDF5 dataset if it's already open (in particular when
the variable name is the same as a dimension name).
2015-02-02 08:32:17 -06:00
Ward Fisher
296928ffc7 Identified a potential null pointer dereference introduced in pull request, added check for null pointer. 2014-12-28 21:04:48 -08:00
Ubuntu
64f95828c3 Checkout current files 2014-12-28 01:10:33 +00:00
Quincey Koziol
2917a6a123 Interim checkpoint of working code. 2014-12-01 08:52:53 -06:00
Quincey Koziol
d2ed77f95f Merge remote-tracking branch 'upstream/master' into NCF-177 2014-11-30 23:49:24 -06:00
Quincey Koziol
7a9e209147 Merge branch 'master' into NCF-177
Conflicts:
	libsrc4/nc4hdf.c
2014-11-30 23:37:19 -06:00
Quincey Koziol
8769d58b1d Initial fix for further rename issue. 2014-11-24 09:36:58 -06:00
Ward Fisher
2ab47745cc Fixed a different set of potential memory leaks paired with the previous ones. 2014-11-11 15:24:38 -07:00
Ward Fisher
2f7ffacac4 Fixed a handful of potential memory leaks reported by clang static analysis. 2014-11-11 15:17:57 -07:00
dmh
1739c50622 Modified a number of tests
to make use of remotetest.unidata.ucar.edu
optional. Purpose is purely for testing
new dts and thredds servers.
2014-10-04 15:59:16 -06:00
Ward Fisher
03ce4c9761 Cast malloc return to appropriate type. 2014-10-01 17:04:56 -06:00
Ward Fisher
61a7dab58f Fixed an issue preventing compilation with hdf4 support with Visual Studio. 2014-08-28 18:14:14 -06:00
Ward Fisher
b43813d821 When using the '-ansi' flag with gcc, netcdf would fail to build because of the use of '//' for one-line comments. I've addressed this by replacing instances of // with enclosing comment blocks. 2014-08-26 11:19:32 -06:00
Ward Fisher
840d80f490 More doxygen tweaks. 2014-07-09 16:45:13 -06:00
Ward Fisher
7f812b367e Manual merge of pull request https://github.com/Unidata/netcdf-c/pull/64 contributed by nschloe. Assorted CMake improvements. 2014-06-11 15:51:31 -06:00