Commit Graph

85 Commits

Author SHA1 Message Date
dmh
859f105005 merge-squash 2015-08-15 16:26:35 -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
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
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
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
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
Ward Fisher
dd53809815 Cleaned up a comment in nc4hdf.c 2014-06-09 17:03:49 -06:00
dmh
ed068ef643 Fix misc. typos from previous commit 2014-06-02 14:02:34 -06:00
dmh
83ec39f5db [NCF-272]
re: e support ZCL-340681 and CPW-270700

HDF4 supports compression (and chunking)
but the chunking was not being recorded
for HDF4 files. So, I modified the necessary
files to support HDF4 chunking.
2014-06-02 13:04:28 -06:00
Ward Fisher
ff47046e93 Fixed clang-reported issue: memory leak. 2014-04-19 17:57:25 -06:00
Quincey Koziol
658e298cf8 Merge remote-tracking branch 'upstream/master' 2014-02-17 13:33:55 -06:00
Russ Rew
178e99467a Fix bug in MPI type reported by Chrostopher Bartz 2014-02-16 11:54:25 -07:00
Quincey Koziol
36c960c0ca Add a few cases for NC_CHAR type class that were missed earlier. 2014-02-12 08:48:13 -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
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
d9069aaeaa More progress toward fixing NCF-177. 2013-09-28 12:40:21 -05:00
Quincey Koziol
a5d23868b7 Merge branch 'master' into ncf-177 2013-09-14 13:22:12 -05:00
Quincey Koziol
7a4479be6b Minor cleanups to reduce warnings in headers, and switch from MPI_BYTE to MPI_INT
for MPI_Allreduce() call.
2013-09-14 13:19:58 -05: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
Dennis Heimbigner
05369372f7 Debugged previously added
code to support group rename.
Also added a simple test case.
2013-07-21 01:08:39 +00:00
Dennis Heimbigner
b85d3568ec Added the necessary code to support
group renaming. The primary API
is 'nc_rename_grp(int grpid, const char* name)'.
No test cases provided yet.
This also required adding a rename_grp entry
to the dispatch tables.
2013-07-19 21:48:37 +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
c583f91992 merge with trunk and fix conflicts 2013-05-10 17:04:28 +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
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
Russ Rew
fab1c8675c Fix NCF-217, a bug depending on order of calls to netCDF-4 functions 2013-02-01 17:38:26 +00:00
Ward Fisher
71a30406f7 Corrected 2 windows-specific errors when using Visual Studio:
1. In nc4hdf.c, had a variable declaration located such
that Visual Studio complained and threw an error. Moved
to head of function.

2. Visual Studio was complaining about variable declarations
being made after OCVERIFY/OCDEREF macros.
2013-01-29 23:33:59 +00:00
Ward Fisher
19dcece866 Merged latest trunk, addressed NC_MAX_DIMS dependence in libsrc4 2013-01-28 18:31:02 +00:00
Ward Fisher
fae7d90194 Removing reliance on NC_MAX_VAR_DIMS 2013-01-22 20:59:39 +00:00
Ward Fisher
426c1508a3 2013-01-16 21:14:29 +00:00
Russ Rew
22b411a17c Merged in pnetcdf fixes from Greg Sjardema, to make set_fill_mode work
with parallel-netcdf, to fully implement parallel-netcdf support for
other functions, and to prevent a hang in hdf5 from an eary return in
an nc4_put_vara() call.  Also fixed an nccopy bug when
nc_inq_var_deflate() returns defalate_level of 0, but says the variable
is deflated.
2013-01-15 03:46:46 +00:00