Commit Graph

117 Commits

Author SHA1 Message Date
Ward Fisher
4c07e22ae4 Progress working towards [NCF-329] 2015-04-21 13:52:43 -06:00
Ward Fisher
c1875ec8f0 Addressed a couple of memory leaks identified by clang. 2015-02-10 13:39:15 -07:00
Ward Fisher
dd2318b725 Added fencepost for cross-dll memory freeing in Windows/Visual Studio 2015-02-02 14:46:51 -07:00
Ubuntu
64f95828c3 Checkout current files 2014-12-28 01:10:33 +00:00
Quincey Koziol
8769d58b1d Initial fix for further rename issue. 2014-11-24 09:36:58 -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
dmh
b560fe1233 [NCF-272]
It turns out that HDF4 supports chunking
(and compression). However the existing
HDF4 code does not support it.
So add HDF4 support for chunking.
Also add a test case.
2014-05-30 22:12:05 -06:00
Ward Fisher
2dccd773e9 Corrected an 'dead assignment' issue reported by static analysis. 2014-05-19 16:26:49 -06:00
Quincey Koziol
435d8a03ed Account for the HDF5 library not having the MPI-POSIX VFD configured in. 2014-05-07 08:45:15 -05:00
Dennis Heimbigner
4ae47ad45b jna? 2014-04-21 10:13:27 -06:00
Dennis Heimbigner
b3a7ccb3d4 more jna fixes 2014-04-10 19:48:53 -06:00
Dennis Heimbigner
af9b5c4abf alternate JNA bug fix 2014-04-10 14:03:11 -06:00
dmh
211004898f jna fixes 2014-04-09 15:20:16 -06:00
Quincey Koziol
fe9e0b056d Update HDF4 support for recent datatype changes. 2014-02-25 21:05:19 -06:00
Russ Rew
976bc707f3 Fix compile errors in HDF4 support from change of att->xtype to att->nc_typeid and similar var change. Still a bug at runtime with ref count for type ids. 2014-02-23 11:32:35 -07:00
Quincey Koziol
d033f9f6ff Clean up Coverity warnings from last checkin. 2014-02-20 08:24:55 -06:00
Quincey Koziol
4bfd9b27a0 Merge remote-tracking branch 'upstream/master'
Conflicts:
	libdap2/common34.c
	oc2/ocutil.c
2014-02-11 17:26:09 -06:00
Quincey Koziol
b2dfacbcfa Big clean up to type handling in libsrc4, which makes fill-values work
correctly for variables with string datatype, plus a few other minor changes.
2014-02-11 17:12:08 -06:00
Russ Rew
0627c82758 Fix for bit-for-bit reproducibility from Rimvydas Jasin, Quincey Koziol 2014-02-10 15:29:14 -07:00
Quincey Koziol
cd71eb525c Corrected "BAIL" macros to avoid infinite loop when logging is disabled and an
error occurs after an "exit:" label.

Corrected a dozen Coverity errors (mainly allocation issues, along with a few
    other things):
        711711, 711802, 711803, 711905, 970825, 996123, 996124, 1025787,
        1047274, 1130013, 1130014, 1139538

Refactored internal fill-value code to correctly handle string types, and
    especially to allow NULL pointers and null strings (ie. "") to be
    distinguished.  The code now avoids partially aliasing the two together
    (which only happened on the 'write' side of things and wasn't reflected on
    the 'read' side, adding to the previous confusion).

    Probably still weak on handling fill-values of variable-length and compound
    datatypes.

Refactored the recursive metadata reads a bit more, to process HDF5 named
    datatypes and datasets immediately, avoiding chewing up memory for those
    types of objects, etc.

Finished uncommenting and updating the nc_test4/tst_fills2.c code (as I'm
    proceeding alphabetically through the nc_test4 code files).
2013-12-29 01:12:43 -06:00
Quincey Koziol
0d42ac7e87 Switch test for nc_inq_unlimdim and nc_inq_unlimdims to use the same ordering as
the rest of the dimension queries.  Correct error in library where types used
in sub-group variables but that were added to the file after the sub-group was
created weren't available for sub-group variables to use.  Start cleaning up
test suite and un-commenting tests that were commented out (got up to
nc_test4/tst_fills2.c, alphabetically) before running into an error in HDF5.
2013-12-15 19:55:41 -06:00
Quincey Koziol
b3044de434 Refactored read_scale(), memio_new(), var_create_dataset() and makespecial()
to clean up resources properly on failure.

Refactored doubly-linked list code for objects in the libsrc4 directory,
    cleaning up the add/del routines, breaking out the common next/prev
    pointers into a struct and extracting the add/del operations on them,
    changed the list of dims to add new dims in the same order as the other
    types, made all add routines able to optionally return a pointer to the
    newly created object.

Removed some dead code (pg_var(), nc4_pg_var1(), nc4_pg_varm(), misc. small
    routines, etc)

Fixed fill value handling for string types in nc4_get_vara().

Changed many malloc()+strcpy() pairs into calls to strdup().

Cleaned up misc. other minor Coverity issues.
2013-12-08 03:29:26 -06:00
Quincey Koziol
e1fc13b215 Many changes to address NCF-177 (renaming dimensions and variables). Also
many cleanups to fix compiler warnings, streamline iteration over objects
in HDF5 file when opening the file, and generally straightening out the code
to be cleaner and simpler.

Tested on Mac OS/X with gcc 4.8 and OpenMPI (which uses clang).
2013-11-30 23:20:28 -06:00
Quincey Koziol
a5d23868b7 Merge branch 'master' into ncf-177 2013-09-14 13:22:12 -05:00
Ward Fisher
c238435853 Added stanza in nc4file.c, read_var, to avoid crashes when reading an h5 file with layout == "H5D_COMPACT". 2013-09-09 15:03:03 -06:00
Quincey Koziol
e808067582 Merge branch 'master' into ncf-177 2013-08-24 14:35:21 -05:00
Quincey Koziol
3cdce9e3af Correct error when a parallel application writes different amounts of data to
an unlimited-dimension variable, and different processes don't agree on the
whether to extend the underlying HDF5 dataset, or don't agree on the amount
to extend the dataset.
2013-08-18 20:45:17 -05:00
Quincey Koziol
a7ecaeb327 Work in progress on NCF-177. 2013-08-17 12:53:29 -05:00
Ward Fisher
f43bf8f1da Addressed a handful of issues identified by
Coverity static analysis.
2013-08-05 20:36:33 +00:00
Russ Rew
e4f9350c23 Quincey's fixes for NCF-56, "netcdf-4 can't read HDF5 scalar atts".
Also added ability capability for netCDF-4 to write and read NIL
values for string type attributes and variables, so these can be read
if used in HDF5 files.

Include are additions to CMakeLists files to reflect new tests.
2013-07-10 20:09:31 +00:00
Russ Rew
6cd8fca60d Quincey's fixes for NCF-250, netCDF-4 parallel independent access with
unlimited dimension hanging.  Extending the size of an unlimited
dimension in HDF5 must be a collective operation, so now an error is
returned if trying to extend in independent access mode.

Quincey's bug fixes for parallel build portability, particularly
OpenMPI on MacOS-X.
2013-07-08 21:31:13 +00:00
Dennis Heimbigner
de34ed2d5b merge from netcdf/trunk prior to merge back to trunk 2013-05-11 19:37:38 +00:00
Dennis Heimbigner
c583f91992 merge with trunk and fix conflicts 2013-05-10 17:04:28 +00:00
Dennis Heimbigner
4070bcf946 Fix (again) jira NCF-248.
So, it turns out that just freeing
the nc4_info is not enough;
The root group must also be reclaimed.
So, it appears the best approach
is to invoke an abort on the
failed file.
2013-04-24 22:11:44 +00:00
Ward Fisher
67f96188ff Merged latest from netCDF-cmake branch in preparation for 4.3.0 release. 2013-04-23 21:50:07 +00:00
Dennis Heimbigner
e960416761 Fix JIRA NCF-248 2013-04-23 18:02:35 +00:00
Russ Rew
3a87936711 New RELEASE_NOTES entry and a couple of Coverity fixes. 2013-04-23 16:27:28 +00:00
Russ Rew
6ebc98d254 Fix NCF-247 bug, and add test for bug fix. 2013-04-22 22:34:21 +00:00
Ward Fisher
b70e1d74af Merged latest from cmake development branch. 2013-04-16 17:23:14 +00:00
Russ Rew
8b3a9505ae Revert nc4file.c to r3113, because r3123 version broke --enable-extra-tests build 2013-04-08 19:33:30 +00:00
Ward Fisher
4a274b9870 Merged latest changes from cmake development branch.
Addressed a number of memory-related problems
reported by Coverity.
2013-04-02 22:09:31 +00:00
Ward Fisher
9f187a1484 Merged the fix for NCF-29 from Quincy into the trunk. 2013-03-26 18:57:26 +00:00
Dennis Heimbigner
c659633d2e merge from trunk 2013-03-26 16:45:02 +00:00
Dennis Heimbigner
4b7817e69e Return EACCES instead of NC_EMETADATA when failing to create an HDF5 file 2013-03-26 16:31:56 +00:00
Russ Rew
b36dc5b5fb Fix NCF-244 bug for case where using different order for defining
coordinate variables and their associated dimensions occurs in any
subgroup, rather than just the root group.  If this occurs, the
variable attribute "_Netcdf4Dimid" is created for every dimension
scale.

Also add a test for this bug fix in tst_dims3.nc, based on Pedro
Vicente's demo.
2013-03-26 15:14:19 +00:00
Russ Rew
2071ca9bf3 Fixed NCF-244, a netCDF-4 bug resulting in two dimensions with the same dimension ID 2013-03-25 18:06:19 +00:00
Dennis Heimbigner
dea3c726c8 merge trunk into this branch 2013-03-15 20:31:07 +00:00
Dennis Heimbigner
9eaac2a595 Apply Wei-Keng's fix
for JIRA issue NCF-241.
This is only temporary
until I can make pnetcdf
operate as a separate dispatch table.

Also, fix nc_test4/tst_pnetcdf
to open with nc_open_par;
this is necessary because a pnetcdf
created file cannot be opened
as a netcdf classic file.
2013-03-13 17:34:47 +00:00
Koziol
0f29dd60c0 Description:
Fix Jira issue NCF-29 (https://bugtracking.unidata.ucar.edu/browse/NCF-29):
making the netCDF-4 library ignore HDF5 datasets and attributes which have
datatypes (such as references) that it doesn't understand.

Tested on:
    Mac OSX/64 10.8.2 (amazon) w/--enable-netcdf-4 --enable-extra-tests --enable-extra-example-tests
        --disable-shared --enable-logging
2013-03-01 08:10:28 +00:00