Commit Graph

33 Commits

Author SHA1 Message Date
Edward Hartnett
ab9747565e parallel zstd test 2024-08-30 07:16:08 -06:00
Edward Hartnett
d2673eaddd parallel zstd test 2024-08-30 05:59:49 -06:00
Edward Hartnett
e768bf2cbc parallel zstd test 2024-08-30 05:20:00 -06:00
Dennis Heimbigner
3ffe7be446 Enhance/Fix filter support
re: Discussion https://github.com/Unidata/netcdf-c/discussions/2214

The primary change is to support so-called "standard filters".
A standard filter is one that is defined by the following
netcdf-c API:
````
int nc_def_var_XXX(int ncid, int varid, size_t nparams, unsigned* params);
int nc_inq_var_XXXX(int ncid, int varid, int* usefilterp, unsigned* params);
````
So for example, zstandard would be a standard filter by defining
the functions *nc_def_var_zstandard* and *nc_inq_var_zstandard*.

In order to define these functions, we need a new dispatch function:
````
int nc_inq_filter_avail(int ncid, unsigned filterid);
````
This function, combined with the existing filter API can be used
to implement arbitrary standard filters using a simple code pattern.
Note that I would have preferred that this function return a list
of all available filters, but HDF5 does not support that functionality.

So this PR implements the dispatch function and implements
the following standard functions:
    + bzip2
    + zstandard
    + blosc
Specific test cases are also provided for HDF5 and NCZarr.
Over time, other specific standard filters will be defined.

## Primary Changes
* Add nc_inq_filter_avail() to netcdf-c API.
* Add standard filter implementations to test use of *nc_inq_filter_avail*.
* Bump the dispatch table version number and add to all the relevant
   dispatch tables (libsrc, libsrcp, etc).
* Create a program to invoke nc_inq_filter_avail so that it is accessible
  to shell scripts.
* Cleanup szip support to properly support szip
  when HDF5 is disabled. This involves detecting
  libsz separately from testing if HDF5 supports szip.
* Integrate shuffle and fletcher32 into the existing
  filter API. This means that, for example, nc_def_var_fletcher32
  is now a wrapper around nc_def_var_filter.
* Extend the Codec defaulting to allow multiple default shared libraries.

## Misc. Changes
* Modify configure.ac/CMakeLists.txt to look for the relevant
  libraries implementing standard filters.
* Modify libnetcdf.settings to list available standard filters
  (including deflate and szip).
* Add CMake test modules to locate libbz2 and libzstd.
* Cleanup the HDF5 memory manager function use in the plugins.
* remove unused file include//ncfilter.h
* remove tests for the HDF5 memory operations e.g. H5allocate_memory.
* Add flag to ncdump to force use of _Filter instead of _Deflate
  or _Shuffle or _Fletcher32. Used for testing.
2022-03-14 12:39:37 -06:00
Edward Hartnett
82039029ff turned off logging in test 2022-02-04 14:44:38 -07:00
Edward Hartnett
526849612a better handling of logging for parallel I/O builds 2022-02-04 14:38:25 -07:00
Edward Hartnett
1d79a47c6d fixed warning in tst_parallel5.c 2020-07-08 12:24:48 -06:00
Dennis Heimbigner
59e04ae071 This PR adds EXPERIMENTAL support for accessing data in the
cloud using a variant of the Zarr protocol and storage
format. This enhancement is generically referred to as "NCZarr".

The data model supported by NCZarr is netcdf-4 minus the user-defined
types and the String type. In this sense it is similar to the CDF-5
data model.

More detailed information about enabling and using NCZarr is
described in the document NUG/nczarr.md and in a
[Unidata Developer's blog entry](https://www.unidata.ucar.edu/blogs/developer/en/entry/overview-of-zarr-support-in).

WARNING: this code has had limited testing, so do use this version
for production work. Also, performance improvements are ongoing.
Note especially the following platform matrix of successful tests:

Platform | Build System | S3 support
------------------------------------
Linux+gcc      | Automake     | yes
Linux+gcc      | CMake        | yes
Visual Studio  | CMake        | no

Additionally, and as a consequence of the addition of NCZarr,
major changes have been made to the Filter API. NOTE: NCZarr
does not yet support filters, but these changes are enablers for
that support in the future.  Note that it is possible
(probable?) that there will be some accidental reversions if the
changes here did not correctly mimic the existing filter testing.

In any case, previously filter ids and parameters were of type
unsigned int. In order to support the more general zarr filter
model, this was all converted to char*.  The old HDF5-specific,
unsigned int operations are still supported but they are
wrappers around the new, char* based nc_filterx_XXX functions.
This entailed at least the following changes:
1. Added the files libdispatch/dfilterx.c and include/ncfilter.h
2. Some filterx utilities have been moved to libdispatch/daux.c
3. A new entry, "filter_actions" was added to the NCDispatch table
   and the version bumped.
4. An overly complex set of structs was created to support funnelling
   all of the filterx operations thru a single dispatch
   "filter_actions" entry.
5. Move common code to from libhdf5 to libsrc4 so that it is accessible
   to nczarr.

Changes directly related to Zarr:
1. Modified CMakeList.txt and configure.ac to support both C and C++
   -- this is in support of S3 support via the awd-sdk libraries.
2. Define a size64_t type to support nczarr.
3. More reworking of libdispatch/dinfermodel.c to
   support zarr and to regularize the structure of the fragments
   section of a URL.

Changes not directly related to Zarr:
1. Make client-side filter registration be conditional, with default off.
2. Hack include/nc4internal.h to make some flags added by Ed be unique:
   e.g. NC_CREAT, NC_INDEF, etc.
3. cleanup include/nchttp.h and libdispatch/dhttp.c.
4. Misc. changes to support compiling under Visual Studio including:
   * Better testing under windows for dirent.h and opendir and closedir.
5. Misc. changes to the oc2 code to support various libcurl CURLOPT flags
   and to centralize error reporting.
6. By default, suppress the vlen tests that have unfixed memory leaks; add option to enable them.
7. Make part of the nc_test/test_byterange.sh test be contingent on remotetest.unidata.ucar.edu being accessible.

Changes Left TO-DO:
1. fix provenance code, it is too HDF5 specific.
2020-06-28 18:02:47 -06:00
Edward Hartnett
1fb8d161ce updated RELEASE_NOTES 2020-05-08 11:12:47 -06:00
Edward Hartnett
1267358e9b whitespace cleanup 2020-05-08 11:11:56 -06:00
Edward Hartnett
6aa6eff710 now properly setting HDF5 file cache for files created/opened sequentially on parallel IO builds 2020-05-08 11:00:56 -06:00
Edward Hartnett
e3c9e83ecf adding internal function, plus some documentation 2020-05-08 08:58:42 -06:00
Greg Sjaardema
404b0a3ed7
Add missing ERR macro on tests
A few of the tests were missing a call to the ERR macro.
2020-03-04 13:31:47 -07:00
Edward Hartnett
836a8fb55d fixed szip test error in tst_parallel5.c 2020-03-02 16:31:56 -07:00
Edward Hartnett
21a204c4e8 start using par filters in HDF5-1.10.3 2020-01-17 14:01:07 -07:00
Edward Hartnett
86a9835f12 checking sziped data in parallel I/O test 2020-01-06 10:23:59 -07:00
Edward Hartnett
58abb5adee parallel szip test 2020-01-06 10:23:07 -07:00
Edward Hartnett
c8135722ac parallel szip test 2020-01-06 10:22:45 -07:00
Edward Hartnett
a8a523f1aa parallel szip test 2020-01-06 10:21:00 -07:00
Edward Hartnett
a0396a862b parallel szip test 2020-01-06 10:17:28 -07:00
Edward Hartnett
bb7ffe69d9 starting to add parallel tests 2020-01-06 09:08:27 -07:00
edwardhartnett
0b00f4b5eb more work on tst_parallel5.c 2019-08-14 08:50:09 -06:00
edwardhartnett
c042ea5d23 added parallel I/O test for NC_BYTE scalar 2019-08-14 08:22:35 -06:00
Wei-keng Liao
0ed70756cc Ignore flags NC_MPIIO and NC_MPIPOSIX. 2018-09-22 20:22:34 -05:00
Greg Sjaardema
1eb2504043
Fix missing ERR in tst_parallel5.c
Missing the ERR macro for a few tests in tst_parallel5.c
2018-07-10 08:12:04 -04:00
Ed Hartnett
d8947c81ee cleaned up whitespace 2018-05-16 02:44:46 -06:00
Ed Hartnett
c0b4e96428 added parallel testing for string type 2018-05-16 02:27:07 -06:00
Ed Hartnett
37cae16b38 added parallel testing for string type 2018-05-16 02:26:13 -06:00
Ed Hartnett
3e79501c3e added parallel compound type test 2018-05-15 08:54:51 -06:00
Ed Hartnett
b8ad15b6ae tests for ncdump issue with irish rover 2018-05-15 08:09:52 -06:00
Ed Hartnett
942bc48181 test development 2018-05-14 14:25:56 -06:00
Ed Hartnett
984f112580 test development 2018-05-14 10:06:35 -06:00
Ed Hartnett
271abc6bcb added file 2018-05-14 08:49:13 -06:00