Commit Graph

525 Commits

Author SHA1 Message Date
Dennis Heimbigner
5bc174920f re: esupport MQO-415619
There is an error in handling the nc_create_memio function
as noted in the above esupport thread.
This attempts to fix it.

Also do a master merge
2018-05-03 21:02:32 -06:00
Dennis Heimbigner
9aa1e9a14e master merge 2018-05-03 21:02:12 -06:00
luz.paz
b4d0fe651a Follow-up trivial typos 2018-04-26 23:04:01 -04:00
Dennis Heimbigner
0a44d9ae3a Merge branch 'master' into inmemory.dmh 2018-04-23 11:30:14 -06:00
Greg Sjaardema
e9088e5dfa
Use hdf5-1.8 compatible output format if possible
In hdf5-1.10.2, THG added a new enumeration for use in the `H5Pset_libver_bounds` function which makes it easier to maintain compatibility with hdf5-1.8.X clients.   

An explanation is provided at https://www.hdfgroup.org/2018/04/why-should-i-care-about-the-hdf5-1-10-2-release/ 

In particular, the section "What does this change mean to an HDF5 application?" discusses its use with NetCDF
2018-04-19 13:26:56 -06:00
Ward Fisher
14903ac981 Removed a reference to a non-existant file. 2018-04-13 14:37:40 -06:00
Dennis Heimbigner
4739cd3225 Master merge and conflict resolution 2018-04-12 21:51:17 -06:00
Dennis Heimbigner
42e8028726 Re: github issues
https://github.com/Unidata/netcdf-c/issues/917
https://github.com/Unidata/netcdf-c/issues/915

Fix following memory errors:
1. global_buffer_overflow
2. nc4_att_list_add
2018-03-29 14:57:40 -06:00
Dennis Heimbigner
eace0e922e Fixed case when --enable-parallel is true 2018-03-28 13:41:26 -06:00
Dennis Heimbigner
1246dd189b merge master 2018-03-20 21:50:58 -06:00
Dennis Heimbigner
25f062528b This completes (for now) the refactoring of libsrc4.
The file docs/indexing.dox tries to provide design
information for the refactoring.

The primary change is to replace all walking of linked
lists with the use of the NCindex data structure.
Ncindex is a combination of a hash table (for name-based
lookup) and a vector (for walking the elements in the index).
Additionally, global vectors are added to NC_HDF5_FILE_INFO_T
to support direct mapping of an e.g. dimid to the NC_DIM_INFO_T
object. These global vectors exist for dimensions, types, and groups
because they have globally unique id numbers.

WARNING:
1. since libsrc4 and libsrchdf4 share code, there are also
   changes in libsrchdf4.
2. Any outstanding pull requests that change libsrc4 or libhdf4
   are likely to cause conflicts with this code.
3. The original reason for doing this was for performance improvements,
   but as noted elsewhere, this may not be significant because
   the meta-data read performance apparently is being dominated
   by the hdf5 library because we do bulk meta-data reading rather
   than lazy reading.
2018-03-16 11:46:18 -06:00
Dennis Heimbigner
ccc70d640b re: esupport MQO-415619
and https://github.com/Unidata/netcdf-c/issues/708

Expand the NC_INMEMORY capabilities to support writing and accessing
the final modified memory.

Three new functions have been added:
nc_open_memio, nc_create_mem, and nc_close_memio.

The following new capabilities were added.
1. nc_open_memio() allows the NC_WRITE mode flag
   so a chunk of memory can be passed in and be modified
2. nc_create_mem() allows the NC_INMEMORY flag to be set
   to cause the created file to be kept in memory.
3. nc_close_mem() allows the final in-memory contents to be
   retrieved at the time the file is closed.
4. A special flag, NC_MEMIO_LOCK, is provided to ensure that
   the provided memory will not be freed or reallocated.

Note the following.
1. If nc_open_memio() is called with NC_WRITE, and NC_MEMIO_LOCK is not set,
   then the netcdf-c library will take control of the incoming memory.
   This means that the original memory block should not be freed
   but the block returned by nc_close_mem() must be freed.
2. If nc_open_memio() is called with NC_WRITE, and NC_MEMIO_LOCK is set,
   then modifications to the original memory may fail if the space available
   is insufficient.

Documentation is provided in the file docs/inmemory.md.
A test case is provided: nc_test/tst_inmemory.c driven by
nc_test/run_inmemory.sh

WARNING: changes were made to the dispatch table for
the close entry. From int (*close)(int) to int (*close)(int,void*).
2018-02-25 21:45:31 -07:00
Dennis Heimbigner
8cb1fc4cfe This is the second step in refactoring the libsrc4 code.
The first was branch newhash0.dmh.

As with newhash0.dmh, these changes should be transparent.
2018-02-24 20:36:24 -07:00
Ed Hartnett
9de58cad99
Merge branch 'master' into ejh_extra_tests 2018-02-19 18:52:50 -07:00
Ward Fisher
40805e5dfa
Merge branch 'master' into ejh_hdf4_dispatch_unidata2 2018-02-16 13:02:05 -07:00
Ben Boeckel
bdae9b4c44 nc4hdf: use PRId64 for hid_t format strings 2018-02-14 17:24:49 -05:00
Ben Boeckel
7505bed6f5 nc4dispatch: don't initialize fields which may not exist
These fields are only here if `USE_NETCDF4` is defined.
2018-02-14 17:24:49 -05:00
Ed Hartnett
e5cbf259ba fixed string memory leak 2018-02-13 14:17:15 -07:00
Ed Hartnett
2358d4a910 moved HDF4 to its own dispatch layer 2018-02-08 06:20:58 -07:00
Ward Fisher
a640c034f2 Merge branch 'ejh_atts_unidata' of https://github.com/NetCDF-World-Domination-Council/netcdf-c into ejh_batch 2018-02-05 11:47:48 -07:00
Ward Fisher
e0577cb251 Merge branch 'ejh_fill_value_string_unidata' of https://github.com/NetCDF-World-Domination-Council/netcdf-c into ejh_batch 2018-02-05 11:47:34 -07:00
Ward Fisher
b268f268bd Merge branch 'ejh_dims_unidata' of https://github.com/NetCDF-World-Domination-Council/netcdf-c into ejh_batch 2018-02-05 11:43:41 -07:00
Ed Hartnett
0d96ead703
Merge branch 'master' into ejh_dims_unidata 2018-02-05 06:34:04 -07:00
Ward Fisher
c12fca453e Merge branch 'ejh_rename2_unidata' of https://github.com/NetCDF-World-Domination-Council/netcdf-c into ejh_batch 2018-02-02 17:57:32 -07:00
Ward Fisher
27693ba4a3
Merge branch 'master' into nc3-per-var-fill-v2 2018-02-01 11:45:40 -07:00
Ed Hartnett
69c899a529 removed results of other merges from nc4var.c 2018-02-01 05:28:24 -07:00
Ed Hartnett
2afe401f17 another rename fix 2018-02-01 05:10:57 -07:00
Greg Sjaardema
e887772e8f
Eliminate unused variables
Eliminate variables no longer used after recent refactorings.
2018-01-31 09:03:19 -07:00
Ed Hartnett
7c936a7bb6 brought in changes from ejh_att 2018-01-31 08:44:33 -07:00
Ed Hartnett
94c23712b7 extra tests, plus fill value fixes for string type 2018-01-30 14:39:47 -07:00
Ed Hartnett
333b802861 fix dim bad paramter issues 2018-01-30 09:35:56 -07:00
Ward Fisher
d0339c8902 Merge branch 'pr-catchup' into v4.6.0-release-branch 2018-01-24 15:51:24 -06:00
Ward Fisher
d1296e5d9a
Merge branch 'master' into nc3-per-var-fill-v2 2018-01-23 17:36:14 -07:00
Ed Hartnett
c329298dc5 merged 760 2018-01-20 07:31:42 -07:00
Ed Hartnett
ef65bdf9af merged 786 2018-01-20 06:06:25 -07:00
Ed Hartnett
da928c1b83 merged 780 2018-01-20 06:05:34 -07:00
Ed Hartnett
cc4eb3cd96 more test development 2018-01-19 05:41:05 -07:00
Ed Hartnett
ea3874c567 more test development 2018-01-19 05:40:48 -07:00
Ed Hartnett
196a0b574a more test development 2018-01-19 05:11:07 -07:00
Ed Hartnett
4be1fd82e6 further test development 2018-01-19 04:16:59 -07:00
Ed Hartnett
bc1f103c3d cleaned up h5 checks in nc4grp.c 2018-01-19 03:37:49 -07:00
Ed Hartnett
3f83998b26
Merge branch 'master' into ejh_rename2 2018-01-18 16:05:04 -07:00
Ward Fisher
0f5fc7222b
Merge branch 'master' into plugins.dmh 2018-01-18 15:46:50 -07:00
Ed Hartnett
d350f82889 removed unneeded h5 checks 2018-01-18 07:46:31 -07:00
Ed Hartnett
126d34da1d more tests, error handling 2018-01-18 07:36:52 -07:00
Ed Hartnett
38c7cddf8f further test development, added documentation for uncommitted user-defined types, fixed check of return value 2018-01-18 06:47:50 -07:00
Ed Hartnett
9949a11155 removed some unneeded HDF4 checks, added some needed parameter checks 2018-01-17 09:09:58 -07:00
Ed Hartnett
09ee32b205 fixed some header files, checked some return values 2018-01-17 08:25:15 -07:00
Dennis Heimbigner
99fccab359 1. Keep up to date by merging master
2. Fixed plugin building (nc_test4/hdf5plugins)
   to be done properly by cmake and automake.
4. Duplicated part of the nc_test4 filter test code
   in examples/C

An incomplete and untested set of hooks exist
for OS-X in nc_test4/findplugins.in. They need testing.
2018-01-16 11:00:09 -07:00
Ed Hartnett
3fa3d3f9f9 ported rename fix changes from branch ejh_fill_values for easy merging 2018-01-05 06:01:22 -07:00