154 Commits

Author SHA1 Message Date
Dennis Heimbigner
ef425b9171 ckp 2024-09-30 14:39:48 -06:00
Ward Fisher
4753bb6c18
Merge pull request #3002 from edwardhartnett/ejh_0829
HDF5 testing for parallel I/O including zstd (when present)
2024-09-09 18:41:05 +02:00
Ed
d92ce1ce63 now test with szip too 2024-08-29 10:22:50 -06:00
Ed
a3143a59b0 now test with szip too 2024-08-29 10:21:48 -06:00
Ed
67240d61b6 now test with szip too 2024-08-29 10:15:20 -06:00
Ed
2a0a9b0af8 made tst_h_par_compress work for zlib, zstd 2024-08-29 10:06:22 -06:00
Edward Hartnett
0f5ce6bb8f add more testing for HDF5 zstd compression 2024-08-29 04:23:37 -06:00
Edward Hartnett
28747abae8 adding to test 2024-08-29 01:43:29 -06:00
Ed
08de11a320 clean up 2024-08-28 16:04:54 -06:00
Ed
c6c41c97ab clean up 2024-08-28 16:02:18 -06:00
Ed
ae53f655ef clean up 2024-08-28 15:59:37 -06:00
Ed
8775cc475b fixing test 2024-08-28 15:52:45 -06:00
Ed
ac1c3d70e2 fixing test 2024-08-28 15:36:47 -06:00
Ed
a0a00c3d55 trying zstd in tst_h_zstd 2024-08-28 15:20:23 -06:00
Ed
1e560807ec fixing cmake shell file copy 2024-08-28 14:17:01 -06:00
Ed
e29af624a2 added shell file 2024-08-28 13:48:29 -06:00
Ed
ccd18538ee changed name and permissions 2024-08-28 13:42:05 -06:00
Ed
1d07192f56 changed name and permissions 2024-08-28 13:27:20 -06:00
Ed
ebc8b34742 changed permissions 2024-08-28 13:19:49 -06:00
Ed
5172493949 debugging in h5_test automake file 2024-08-28 13:14:06 -06:00
Ed
baa2d1df33 debugging in h5_test automake file 2024-08-28 11:30:23 -06:00
Ed
d2ade6ae6a HDF5 zstd testing requires shell script testing to set the plugin path 2024-08-28 10:02:06 -06:00
Ed
8020753959 improved error message 2024-08-28 09:46:53 -06:00
Ed
3d375f1ac2 added documentation 2024-08-28 09:33:48 -06:00
Ed
e9b5c2fd4c adding check for zstd filter 2024-08-28 09:22:21 -06:00
Edward Hartnett
3cddcffdae adding cmake build of tst_h_zstd 2024-08-28 06:36:38 -06:00
Edward Hartnett
cec43d7fb5 adding HDF5 zstd test 2024-08-28 06:21:36 -06:00
Ward Fisher
e5b83cd70f
Merge pull request #2884 from ZedThree/silence-test-warnings
Fix warnings in tests and examples
2024-03-21 17:13:04 -06:00
Dana Robinson
c9bbf8f626
Fix typo and clarify comment 2024-03-13 13:43:17 -07:00
Dana Robinson
586d047d97 Merge branch '1_10_api_fix' of https://github.com/derobins/netcdf-c into 1_10_api_fix 2024-03-13 13:40:57 -07:00
Dana Robinson
ae85c34661 Update tst_h_files4.c to work with HDF5 1.8
HDF5 1.8 never defined H5_USE_18_API_DEFAULT
2024-03-13 13:40:02 -07:00
Dana Robinson
32f12d1c1b
Update tst_h_files4.c 2024-03-13 08:49:00 -07:00
Dana Robinson
a2dff313f7 Fix for H5Literate() callback versioning
The netCDF library supports many versions of HDF5, which handles API
compatibility via a set of API-call-specific macros. netCDF uses
H5Literate(), which was versioned in the 1.12.x maintenance line
in order to better support the virtual object layer (VOL).

h5_test/tst_h_files4.c failed to compile with certain compilers when the
HDF5 library was built using pre-VOL versions of the library- e.g., 1.10,
which can be configured with --with-default-api-version=110. This was due
to the API compatibility macros being used to select the 1.10 version of
H5Literate(), but not its callback function, which was set using a
`H5_VERSION_GE()` macro that does not take the compatibility macros into
consideration.

Fixing the problem involved removing the `H5_VERSION_GE()` macro and
letting the compatibility macros handle the versioning, and using the
`H5_USE_XXX_API_DEFAULT` symbols to protect the H5Oopen_by_addr() call
used in the callback (a new call that wasn't versioned, hence the
different protection mechanism).

Tested w/ HDF5's develop branch w/ both 1.14 and 1.10 API bindings

Fixes #2886 (4118 in HDF5's issue tracker)
2024-03-13 08:25:59 -07:00
Peter Hill
e7540a33de
Fix warnings in h5_test 2024-03-12 16:13:40 +00:00
Peter Hill
907e5cc43f
CMake: Use target_link_libraries with HDF5::HDF5 target 2024-02-16 10:51:20 +00:00
Ward Fisher
c1fb4b0bae
Merge pull request #2809 from ZedThree/silence-malloc-warnings
Silence conversion warnings from `malloc` arguments
2023-12-21 17:20:56 -07:00
wkliao
52198b3f12 count argument in H5Sselect_hyperslab
Argument 'count' in NetCDF is not exactly the same as the 'count' in
H5Sselect_hyperslabs(space_id, op, start, stride, count, block).
When the argument 'stride' is NULL, NetCDF's 'count' should be used in
argument 'block', for example,
   H5Sselect_hyperslabs(space_id, op, start, NULL, ones, count);
where 'one' is an array of all 1s. Although using NULL 'block' below
   H5Sselect_hyperslabs(space_id, op, start, NULL, count, NULL);
has the same effect, HDF5 internally stores the space of a subarray as a
list of single elements, instead of a "block", which can affect the
performance.
2023-12-12 16:45:19 -07:00
Sean McBride
dfc2ac7296 Replaced trivial uses of sprintf with snprintf
In all these cases the size of the buffer can be computed with sizeof.
2023-12-08 13:30:38 -05:00
Peter Hill
d07dac918c
Silence conversion warnings from malloc arguments
Mostly just add an explicit cast when calling `malloc` and its
variants. Sometimes instead change the type of a local variable if
this would silence multiple warnings.
2023-11-24 18:20:52 +00:00
Peter Hill
763e54f8a1
Fix most float conversion warnings
Fixes ~200 out of ~240 `-Wfloat-conversion` warnings on gcc 13.2
2023-10-26 16:01:24 +01: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
Greg Sjaardema
cbcee382b0 Remove need for HDF5-1.6 API being defined 2021-04-28 13:59:24 -06:00
Orion Poplawski
9fc8ae62a8 Fix tst_h_atts3 for hdf5 1.12 2021-04-10 19:51:58 -06:00
Scot Breitenfeld
efb9b7120b reverted past fix 2021-01-08 11:24:15 -06:00
Scot Breitenfeld
ca3d8c10f4 fixed H5O_info_t incompatiblity with H5Oget_info_by_idx3 2021-01-07 14:30:05 -06:00
Edward Hartnett
9c6b9bb72e fixed tst_h_par_compress.c 2020-08-12 07:28:49 -06:00
Edward Hartnett
b1c0fa07af added tst_h_par_compress to CMake build 2020-07-08 13:26:50 -06:00
Edward Hartnett
73e21b4fd6 took out timing code 2020-07-08 13:21:33 -06:00
Edward Hartnett
c19aa14eaf turned off szip testing while HDF5 issue is resolved 2020-07-08 13:14:58 -06:00
Edward Hartnett
4936edd840 adding other settings of dataset property list to match what is in nc4hdf5.c 2020-07-08 12:56:34 -06:00