Commit Graph

1136 Commits

Author SHA1 Message Date
Dennis Heimbigner
d37147d0ce Suppress nczarr_test/tst_unknown filter test (and its nczarr_test equivalen)
The test case nc_test4/tst_unknown.sh deletes and then restores
a filter in the plugins directory. The test nczarr_test/run_unknown.sh
also does this.  However if both are running at the same time in a
parallel bit, they apparently can interfere and can cause a race
condition failure.

The solution is to suppress one of them. Since nczarr code
is more unstable, we need to run this test. So suppress the
corresponding test in nc_test4.
2022-11-15 16:15:32 -07:00
Dennis Heimbigner
9f848c9e53 Fix race condition in ncdump (and other) tests.
re: Issue https://github.com/Unidata/netcdf-c/issues/2551

Ryan May identified the use of a common scratch file (tmp.cdl)
across multiple test shell scripts in ncdump directory
and the nczarr_test directory.
This sometimes causes errors because of race conditions
between those scripts.

I renamed those common files to avoid the race condition.  I
also did some further checking and found some additional,
similar conflicts and fixed those. Also did some minor cleanup
of unused files.

Tests fixed:
ncdump: run_back_comp_tests.sh tst_bom.sh tst_nccopy4.sh tst_nccopy5.sh
nczarr_test: git df master -- run_nccopyz.sh run_nczarr_fill.sh run_scalar.sh
2022-11-08 20:12:38 -07:00
DWesl
8b600d3499 TST: tst_h_strbug and tst_h_refs pass on Cygwin now
Mark them un-xfail
2022-10-12 12:58:01 -04:00
DWesl
c805b02143 TST: Mark tst_filter.sh XFAIL on MinGW
Attempting to add a filter to a netCDF file using `nccopy` results in
a file without `_Filter` attribute set.  I suspect this is a problem
with HDF5, but I don't remember why and never got around to testing
that.  The rest of the plugin tests pass, so I'm telling the test
runner to expect this one test to fail and see if there are other
failures.
2022-10-12 12:58:01 -04:00
DWesl
5c9722f5bf TST: Add code for MinGW to findplugin.sh. 2022-10-12 12:55:37 -04:00
Greg Sjaardema
90ed6b8aa0
For loop initial declarations are only allowed in C99 mode
I get an error about "for loop initial declarations are only allowed in C99 mode" with the current code.  Not sure why it hasn't shown up before.  I am configuring with `BUILD_SHARED_LIBS=NO ENABLE_PLUGINS=NO ENABLE_MULTIFILTERS=NO ENABLE_NCZARR_FILTERS=NO` when the error shows up using gcc-7.2.0.
2022-09-26 13:04:10 -06:00
Dennis Heimbigner
1a45ee025f Fix some addtional errors in NCZarr
re: Issue https://github.com/Unidata/netcdf-c/issues/2502

H/T Charlie Zender

* Fix NCZarr handling of endianness value NC_ENDIAN_NATIVE. This now matches how it is handled in libhdf5
* Fix NCZarr handling of char typed attribute with value "". This now matches how it is handled in libhdf5
* Add test for various char attribute values
* Change the mapping of NC_CHAR and NC_STRING to dtype; requires changing some test files also.
* Optimize the testing for NC_ENOTBUILT in NC_open.
* Turn off debugging left on accidentally
* Fix memory leak in tst_pnetcdf.c
* Fix blosc test
2022-09-09 14:25:24 -06:00
Dennis Heimbigner
5a859cf2a8 nodebug 2022-08-06 13:35:36 -06:00
Dennis Heimbigner
5f2ac0117c debug1 2022-08-06 12:38:09 -06:00
Dennis Heimbigner
44e9899806 Windows specific blosc fixed 2022-08-05 17:00:40 -06:00
Dennis Heimbigner
517cb6e816 Fix master conflicts 2022-08-05 13:09:03 -06:00
Dennis Heimbigner
2b45c7ec84 Fix support for reading arrays of HDF5 fixed size strings
re: https://github.com/Unidata/netcdf-c/issues/2159

There was error in libhdf5 that only allowed reading a single
value HDF5 fixed string. Fix to allow reading an array of such strings.
Also make sure it still works for scalars and for attributes.
Add a testcase: nc_test4/tst_fixedstring.sh.
2022-07-29 14:47:07 -06:00
Ward Fisher
62ae05d6d0
Merge pull request #2457 from edwardhartnett/ejh_test_quantize_3
more quantize testing and adding pre-processor constant NC_MAX_FILENAME to nc_tests.h
2022-07-25 15:59:50 -06:00
Ward Fisher
8b583d18ca
Merge branch 'main' into twojsons.dmh 2022-07-19 11:16:04 -06:00
Dennis Heimbigner
9e053f0888 Update blosc testing 2022-07-17 13:59:11 -06:00
Dennis Heimbigner
3623e17920 Fix some bugs in the blosc filter wrapper
re: Issue https://github.com/Unidata/netcdf-c/issues/2458

The above Github Issue revealed some bugs in the file netcdf-c/plugins/H5Zblosc.c. Fixed and added a testcase. Also discovered that the Blosc LZ sub-compressors do not work well with small datasets.

Misc. Other Change(s): I noticed that the file "dap4_test/baselinethredds/GOES16_CONUS_20170821_020218_0.47_1km_33.3N_91.4W.nc4.thredds" is still causing tar errors during "make distcheck", so I made some changes to do rename at test-time.
2022-07-12 15:19:07 -06:00
Edward Hartnett
f32890e1be more testing of quantize 2022-07-08 14:58:52 -06:00
Edward Hartnett
a621ed4224 more testing of quantize 2022-07-08 13:33:23 -06:00
Edward Hartnett
31dfc1ce15 more testing of quantize 2022-07-08 13:29:56 -06:00
Edward Hartnett
8142189892 more testing of quantize 2022-07-08 13:27:18 -06:00
Edward Hartnett
99dbcad141 more testing of quantize 2022-07-08 13:21:51 -06:00
Edward Hartnett
cd1aa7b882 more testing of quantize 2022-07-08 13:15:23 -06:00
Edward Hartnett
d23d90e148 more testing of quantize 2022-07-08 12:48:46 -06:00
Edward Hartnett
82caba1f12 more quantize testing 2022-07-08 11:44:23 -06:00
Edward Hartnett
1a13b9ed09 more quantize testing 2022-07-08 10:35:38 -06:00
Edward Hartnett
6645cce1c9 more quantize testing 2022-07-08 09:44:38 -06:00
Edward Hartnett
2bfde9a5eb more quantize testing 2022-07-08 08:55:48 -06:00
Edward Hartnett
4b0f337dbc
Merge branch 'main' into ejh_fix_quantize 2022-07-07 11:16:32 -06:00
Dennis Heimbigner
966a0c1a9f Resolve conflict 2022-07-06 14:21:51 -06:00
Dennis Heimbigner
8b0e1134b4 Ensure that netcdf_json.h does not interfere with ncjson.
re: Issue https://github.com/Unidata/netcdf-c/issues/2419

There are effectively two json subsystems in netcdf-c.
1. ncjson.[ch] in libnetcdf
2. netcdf_json.h for use by plugins so they can be built without need
   for libnetcdf.

The netcdf_json.h file is constructed from the concatenation of
ncjson.h plus ncjson.c. It turned out that in doing this, I was
leaving some symbols externally visible so that if, for some
reason, a plugin was built and needed libnetcdf, then symbol
conflicts arose.

The solution is to prefix the declarations in ncjson.[ch] with a
macro (OPTSTATIC) that can be resolved to either nothing or to
"static". Then in netcdf_json.h, it resolves to "static" and
prevents the symbol conflicts.

Note that netcdf_json.h is constructed once in
netcdf-c/include/Makefile.am with the rule named
"makepluginjson". This means that it is included in the
distribution. However, this also means that if ncjson.[ch] is
changed, then it is necessary to invoke makepluginjson
explicitly to rebuild netcdf_json.h
2022-07-05 22:03:52 -06:00
Edward Hartnett
536cdd28f9 fix and test quantize mode for NC_CLASSIC_MODEL 2022-07-02 06:14:32 -06:00
Dennis Heimbigner
ccecc3065b debug1 2022-06-25 18:42:50 -06:00
Dennis Heimbigner
aabbdbf64c Make public a limited API for programmatic access to internal .rc tables
re: https://github.com/Unidata/netcdf-c/issues/2337
re: https://github.com/Unidata/netcdf-c/issues/2407

Add two functions to netcdf.h to allow programs to get/set
selected entries into the internal .rc tables. This should fix
the above issues by allowing HTTP.CAINFO to be set to the
certificates directory.  Note that the changes should be
performed as early as possible in the program because some of
the .rc table entries may get cached internally and changing the
entry after that caching occurs may have no effect.

The new signatures are as follows:

1. Get the value of a simple .rc entry of the form "key=value".
Note that caller must free the returned value, which might be NULL.
````
char* nc_rc_get(char* const * key);

@param key table entry key
@return value if .rc table has entry of the form key=value
@return NULL if no such entry is found.
````

2. Insert/Overwrite the specified key=value pair in the .rc table.
````
int nc_rc_set(const char* key, const char* value);

@param key table entry key -- may not be NULL
@param value table entry value -- may not be NULL
@return NC_NOERR if no error
@return NC_EINVAL if error
````

Addendum:

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

Modify dhttp.c to use the .rc entry HTTP.CAINFO if defined.
2022-06-17 14:35:12 -06:00
Ward Fisher
5e3e79e26b Make dist is generating a distribution with missing files, that only cmake seems to complain about. 2022-06-10 14:16:16 -06:00
Ward Fisher
d03d44be46
Merge pull request #2368 from edwardhartnett/ejh_dimlen
fixing issues with dimlens of unlitmited dims in complex situations
2022-06-09 14:41:44 -06:00
Edward Hartnett
983c74747e fixing issues with dimlens of unlitmited dims in complex situations 2022-05-29 15:22:10 +03:00
Dennis Heimbigner
d7e57d261a Update to default --with-plugin-dir to yes 2022-05-24 20:05:19 -06:00
Dennis Heimbigner
d16a894458 conflicts 2022-05-24 14:40:54 -06:00
Ward Fisher
be0cbfdbbe
Merge pull request #2327 from edwardhartnett/ejh_cmake_par
added tst_parallel6 to CMake parallel build
2022-05-24 14:28:29 -06:00
Ward Fisher
7997a84686 Merge branch 'distcheck.dmh' of https://github.com/DennisHeimbigner/netcdf-c into gh2343.wif 2022-05-24 10:38:17 -06:00
Dennis Heimbigner
6ae3289701 I made a major update to this PR with the following changes:
## Overwriting
I think I solved the file overwrite problem by doing light name
mangling of the shared library names. With this change the probabilty
is very small that installing our filter wrappers in a directory will
overwrite code produced by others.

## Default Install Location
I have setup the --with-plugin-dir option default to install in
the following locations in order of preference

1. If HDF5_PLUGIN_PATH is defined (at build time remember), then the last directory in that path will be where the filter wrapper shared libraries will be installed.
2. Otherwise the default is "/usr/local/hdf5/lib/plugin" (on *nix*) or "%ALLUSERSPROFILE%\\hdf5\\lib\\plugin" for Windows or Mingw.

Currently, --with-plugin-dir is disabled by default.
I should note that even if I enable it by default, installing
netcdf-c will still not run "out of the box" because the hypothetical
naive user will not know which compressor libraries need to be
pre-installed before netcdf is installed. Nor will that user have any
way to find out what needs to be installed.
2022-05-19 22:00:40 -06:00
Dennis Heimbigner
9e18d791df Merge branch 'master' into install.dmh 2022-05-19 21:39:23 -06:00
Ward Fisher
0586b64521
Merge pull request #2335 from edwardhartnett/ejh_szip_constants
fixed missing szip constants in netcdf.h
2022-05-17 16:45:47 -06:00
Dennis Heimbigner
e05f5c36a8 Merge master 2022-05-17 15:11:31 -06:00
Ward Fisher
c9727c2a65
Merge branch 'main' into distcheck.dmh 2022-05-17 13:26:58 -06:00
Ward Fisher
771b959cad
Merge branch 'main' into jsonconvention.dmh 2022-05-17 13:24:53 -06:00
Ward Fisher
375e5adfe4
Merge branch 'main' into alwaysxarray.dmh 2022-05-17 13:23:19 -06:00
Dennis Heimbigner
7b09290a3a Improve filter installation process to avoid use of an extra shell script
re: https://github.com/Unidata/netcdf-c/issues/2338
re: https://github.com/Unidata/netcdf-c/issues/2294

In issue https://github.com/Unidata/netcdf-c/issues/2338,
Ed Hartnett suggested a better way to install filters to a user
defined location -- for Automake, anyway.

This PR implements that suggestion. It turns out to be more
complicated than it appears, so there are fair number of changes;
mostly to shell scripts. Most of the change is in plugins/Makefile.am.

NOTE: this PR still does NOT address the use of HDF5_PLUGIN_PATH
as the default; this turns out to be complex when dealing with NCZarr.
So this will be addressed in a subsequent post 4.9.0 PR.

## Misc. Changes
1. Record the occurrences of incomplete codecs in libnczarr so that
   they can be included in _Codecs attribute correctly. This allows
   users to see what missing filters are referenced in the Zarr file.
   Primarily affects libnczarr/zfilter.[ch]. Also required creating a
   new no-effect filter: H5Zunknown.c.
2. Move the unknown filter test to a separate test file.
3. Incorporates PR https://github.com/Unidata/netcdf-c/pull/2343
2022-05-14 16:05:48 -06:00
Dennis Heimbigner
5b400442ff Merge branch 'master' into jsonconvention.dmh 2022-05-09 12:43:52 -06:00
Dennis Heimbigner
53890fd3a0 Fix distcheck problems
re: https://github.com/Unidata/netcdf-c/issues/2342
This PR replaces PR https://github.com/Unidata/netcdf-c/pull/2342

This PR extends the distcheck corrections in PR
https://github.com/Unidata/netcdf-c/pull/2342.  That original PR
exposed some errors in the file naming in the plugins and
nczarr_test directories.  This PR corrects those problems and
should be used instead of https://github.com/Unidata/netcdf-c/pull/2342

Ed Hartnett's suggestion about how to install the plugins in the
user specified directory will be addressed in a subsequent PR.
2022-05-09 12:10:53 -06:00