Commit Graph

281 Commits

Author SHA1 Message Date
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
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
909940f9d3 #endfi -> #endif 2014-06-02 13:25:53 -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
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
Ward Fisher
5a693d7326 Merged pull requestion from nschloe, #48. 2014-04-21 16:11:48 -06:00
Ward Fisher
44fae42214 Cleaned up indentation, white space in multiple CMakeLists.txt files. 2014-04-21 11:15:33 -06:00
Dennis Heimbigner
4ae47ad45b jna? 2014-04-21 10:13:27 -06:00
Ward Fisher
ff47046e93 Fixed clang-reported issue: memory leak. 2014-04-19 17:57:25 -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
Ward Fisher
76e5e0f1fa Addressed several minor issues revealed by static analysis (coverity, clang). Mostly to do with extreme corner cases in which a null pointer would be dereferenced, or dereferencing a non-null (but non-initialized) pointer would result in garbage. 2014-03-28 17:11:26 -06:00
Russ Rew
7d36a6c7f3 Fix a couple of warnings 2014-03-27 11:11:06 -06:00
Russ Rew
b95ab08f8f Fix bug in setting default chunksize for 1D record variables 2014-03-27 09:58:53 -06:00
Russ Rew
93878e8816 Fix possibility of divide by zero in rechunking. 2014-02-27 12:19:14 -07:00
Russ Rew
abe9a7d753 Merge branch 'master' of https://github.com/Unidata/netcdf-c 2014-02-26 14:01:51 -07:00
Russ Rew
9212968f54 Fix default chunksize for 1-dimensional record variables 2014-02-26 13:30:12 -07: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
b98a475f37 Minor tweaks to comments and LOG messages. 2014-02-17 13:34:05 -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
fd981824c1 Correct handling of variablen-length sequences for attributes, plus uncomment a
bunch of tests that stress this area of the library.

Also clean up some compiler warnings in the dispatch code.
2014-02-14 08:07:14 -06: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
dmh
582410a407 [NCF-273]/HZY-708311
Add a new function called nc_inq_format_extended that
returns more detailed format information (vis-a-vis
nc_inq_format) about an open dataset.

Note that the netcdf API will present the file as if it had
the format specified by nc_inq_format.  The true file
format, however, may not even be a netcdf file; it might be
DAP, HDF4, or PNETCDF, for example. This function returns
that true file type.  It also returns the effective mode for
the file.

signature: nc_inq_format_extended(int ncid, int* formatp, int* modep)
where
* ncid is the NetCDF ID from a previous call to nc_open() or
  nc_create().
* formatp is a pointer to a location for returned true format.
* modep is a pointer to a location for returned mode flags.

Refer to the actual list in the file netcdf.h to see the
currently defined set.

Also added test cases (tst_formatx*).
2013-12-22 12:53:20 -07: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
5ccb8a24b5 Merge branch 'master' into ncf-177 2013-11-30 23:40:26 -06:00
Quincey Koziol
e66e6e2b3a Merge remote-tracking branch 'upstream/master' 2013-11-30 23:24:44 -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
dmh
2bc308432d sync with oc2.0 2013-11-14 15:13:20 -07:00
Russ Rew
751ac82ef7 For chunk computations that might overflow ints, use double instead of
float.
2013-10-17 14:25:39 -06:00
Ward Fisher
23cf133b39 Addressed Coverity issues 711911, 1102823 2013-10-07 16:25:30 -06:00
Quincey Koziol
d9069aaeaa More progress toward fixing NCF-177. 2013-09-28 12:40:21 -05:00
Russ Rew
68c8303743 Quincey's patch for NCF-269 parallel I/O bug. 2013-09-16 20:06:54 -06:00
Quincey Koziol
a5d23868b7 Merge branch 'master' into ncf-177 2013-09-14 13:22:12 -05:00