Commit Graph

21 Commits

Author SHA1 Message Date
Ward Fisher
44fce0904e
Merge pull request #1387 from Unidata/fixffilter.dmh
Minor config.h changes to support filters in Fortran
2019-05-01 14:44:53 -06:00
Ward Fisher
5410967b00 Merge branch 'master' into addfilter.dmh 2019-04-30 14:51:25 -06:00
Dennis Heimbigner
62e2b472b4 Minor config.h changes to support filters in Fortran 2019-04-29 16:36:08 -06:00
Dennis Heimbigner
4026323383 Fix minor --ansi warnings in dinfermodel.c and bzlib.c
re:

Needed to provide centralized definitions of fileno and fdopen;
also need to #include sys/types.h
2019-03-22 15:16:47 -06:00
Dennis Heimbigner
8d0bced60d Allow in-line definition of filters
Priority: Low

re: issue https://github.com/Unidata/netcdf-c/issues/1329

HDF5 has the ability to programmatically define new filters,
as opposed to using HDF5_PLUGIN_PATH env variable.
This PR adds support for that feature.
Not clear how useful this is, though.
See docs/filters.md for details.
2019-03-21 11:33:27 -06:00
Ward Fisher
a25236eac4
Merge pull request #1348 from Unidata/pluginst.dmh
Support installation of the bzip2 plugin under name libh5bzip2.so
2019-03-20 15:42:06 -06:00
Dennis Heimbigner
15e4fdcbb4 Support installation of the bzip2 plugin under name libh5bzip2.so
re: https://github.com/Unidata/netcdf-c/issues/1347

It turns out that the plugin libraries (bzip2 and misc) were
being installed as part of 'make installed'. This was not intended
behavior. But after some discussion in the above issue, it was decided
to install the bzip2 plugin. However, in order to avoid naming conflicts,
the plugin is installed under the name 'libh5bzip2.so'.
Note that this is automake behavior only; the install does not
(yet) occur using cmake.

Misc. unrelated changes
-----------------------
1. turn off some debug output in ncdump/Makefile.am
2019-02-27 15:22:46 -07:00
Ward Fisher
c7529d36bd Refactor 2019-02-25 22:03:28 -07:00
Ward Fisher
9b493b9160 Modified Makefile.am in plugins/ directory 2019-02-25 15:56:32 -07:00
Ward Fisher
5820705a3f Merge branch 'v4.6.3-dev-branch.wif' of github.com:Unidata/netcdf-c into v4.6.3-dev-branch.wif 2019-02-25 15:35:02 -07:00
Ward Fisher
482e5ccb43 Added inclusion of config.h 2019-02-25 15:34:46 -07:00
Ward Fisher
d08bbe06c3 Merge branch 'master' into v4.6.3-dev-branch.wif 2019-02-25 10:37:37 -07:00
Dennis Heimbigner
4c1ed0144b Fix nc_test4/tst_filter.sh for big endian
re: issue https://github.com/Unidata/netcdf-c/issues/1338

Changes:

1. nc_test4/tst_filter.sh + nc_test4/ref_filteredvv.cdl --
   properly suppress _Endianness attribute
2. fix some warnings
2019-02-24 22:20:01 -07:00
Ward Fisher
d6c845370b Added fenceposting around H5free_memory, H5allocate_memory, H5resize_memory, as these were all introduced in hdf5 1.8.15. 2019-02-21 14:02:46 -07:00
Ward Fisher
e69432704a Corrected cmake error on OSX in plugins compilation. 2019-02-15 16:07:22 -07:00
Dennis Heimbigner
8714066b18 Fix errors when building on big-endian machine
re: issue https://github.com/Unidata/netcdf-c/issues/1278
re: issue https://github.com/Unidata/netcdf-c/issues/876
re: issue https://github.com/Unidata/netcdf-c/issues/806

* Major change to the handling of 8-byte parameters for nc_def_var_filter.
  The old code was not well thought out.
  * The new algorithm is documented in docs/filters.md.
  * Added new utility file plugins/H5Zutil.c to support
  * Modified plugins/H5Zmisc.c to use new algorithm
  the new algorithm.
  * Renamed include/ncfilter.h to include/netcdf_filter.h
    and made it an installed header so clients can access the
    new algorithm utility.
  * Fixed nc_test4/tst_filterparser.c and nc_test4/test_filter_misc.c
    to use the new algorithm
* libdap4/ fixes:
  * d4swap.c has an error in the endian pre-processing such
    that record counts were not being swapped correctly.
  * d4data.c had an error in that checksums were being computed
    after endian swapping rather than before.
* ocinitialize() was never being called, so xxdr bigendian handling
  was never set correctly.
  * Required adding debug statements to occompile
* Found and fixed memory leak in ncdump.c

Not tested:
* HDF4
* Pnetcdf
* parallel HDF5
2019-01-31 21:13:06 -07:00
Ward Fisher
264dc38bf3 Fixed plugin compilation using MSVC in support of https://github.com/Unidata/netcdf-c/issues/1245 2018-12-18 13:26:49 -07:00
Ward Fisher
05818ac990 Misc. files updated with copyright stanza. 2018-12-06 15:51:35 -07:00
Dennis Heimbigner
82e46ef594 Update nc_test/tst_inmemory to cover more cases
re: pull request https://github.com/Unidata/netcdf-c/pull/1219

This pr should go in after or at the same time as 1219.
It updates nc_test/tst_inmemory to add a test to cover
the case fixed in 1219. It also disables a couple of tests
that no longer are relevant.
2018-11-27 19:20:19 -07:00
Dennis Heimbigner
d07c05b58f Fix memory problems when using HDF5 version 1.10.x and later.
re: issue https://github.com/Unidata/netcdf-c/issues/1156

Starting with HDF5 version 1.10.x, the plugin code MUST be
careful when using the standard *malloc()*, *realloc()*, and
*free()* function.

In the event that the code is allocating, reallocating, or
free'ing memory that either came from -- or will be exported to --
the calling HDF5 library, then one MUST use the corresponding
HDF5 functions *H5allocate_memory()*, *H5resize_memory()*,
*H5free_memory()* [5] to avoid memory failures.

Additionally, if your filter code leaks memory, then the HDF5 library
generates a failure something like this.
````
H5MM.c:232: H5MM_final_sanity_check: Assertion `0 == H5MM_curr_alloc_bytes_s' failed.
````

This PR modifies the code in the plugins directory to
conform to these new requirements.

This raises a question about the libhdf5 code where this
same problem may occur. We need to scan especially nc4hdf.c
to look for this problem.
2018-10-04 11:37:21 -06:00
Dennis Heimbigner
d3b309722e re: gh issue https://github.com/Unidata/netcdf-c/issues/911
I took Ed's advice and moved the plugin stuff to its own
top-level directory. This is an attempt to solve the problem of
copying files that we have experienced. In any case, it will
serve as a place to stick additional plugins.
2018-04-21 20:10:47 -06:00