Commit Graph

959 Commits

Author SHA1 Message Date
Greg Sjaardema
102758d3ce
Remove test since file was moved to nc_perf
In commit ba6ab3, the `tst_gfs_data_1.c` file was moved from `nc_test4` to `nc_perf`, but the test/executable that uses that file was not removed from nc_test4 CMakeLists.txt
2020-07-10 15:14:12 -06:00
Ward Fisher
0825c9767f Merge branch 'ejh_par_test' of https://github.com/NOAA-GSD/netcdf-c into NOAA-GSD-ejh_par_test 2020-07-09 17:29:45 -06:00
Ward Fisher
7d2a646f25 Merge branch 'ejh_fix_redef' of https://github.com/NOAA-GSD/netcdf-c into NOAA-GSD-ejh_fix_redef 2020-07-09 13:55:37 -06:00
Edward Hartnett
1d79a47c6d fixed warning in tst_parallel5.c 2020-07-08 12:24:48 -06:00
Edward Hartnett
832fbf19c8 now dont return error on second redef call for netcdf/HDF5 files 2020-07-08 11:10:15 -06:00
Edward Hartnett
5e41f33685 starting to test repeated redefs 2020-07-08 11:04:16 -06:00
Edward Hartnett
ac3b77d418 merged in changes from ejh_test_szip_unlim 2020-07-04 07:43:50 -06:00
Edward Hartnett
4b78c0c4a3 merged master 2020-07-03 13:57:47 -06:00
Edward Hartnett
6c112efb8e fixed problem setting szip on var with unlimited dim and added test 2020-07-02 10:55:34 -06:00
Edward Hartnett
88dd5c5c65 starting to add test for unlimited dim 2020-07-02 10:34:15 -06:00
Edward Hartnett
ba6ab38a11 fixed warnings in tst_create_files.c 2020-06-30 10:40:05 -06:00
Edward Hartnett
8d7d9a598e now checking more data 2020-06-29 09:44:55 -06:00
Edward Hartnett
1d06c30cf7 now checking more data 2020-06-29 09:41:22 -06:00
Edward Hartnett
43c5f08dbb now checking more data 2020-06-29 09:39:38 -06:00
Edward Hartnett
823240d17a now checking pfull data 2020-06-29 09:35:08 -06:00
Edward Hartnett
0672662f31 now reopening file and checking dim and var metadata 2020-06-29 09:31:52 -06:00
Edward Hartnett
179b258319 more test development 2020-06-29 09:18:14 -06:00
Edward Hartnett
5ce5f1cd1f more test development 2020-06-29 09:05:56 -06:00
Edward Hartnett
dc37446a5f more test development 2020-06-29 09:01:24 -06:00
Edward Hartnett
467f342ae9 further test development 2020-06-29 08:35:11 -06:00
Edward Hartnett
306628e9e4 more test development 2020-06-29 08:12:31 -06:00
Edward Hartnett
a645b5912f further test development 2020-06-29 07:39:15 -06:00
Edward Hartnett
4413aba99f further test development 2020-06-28 21:06:31 -06:00
Edward Hartnett
86e98892b6 more test development 2020-06-28 20:56:02 -06:00
Edward Hartnett
50eb14dbc7 more test development 2020-06-28 20:45:39 -06:00
Edward Hartnett
19de11b1dd starting to develop test 2020-06-28 20:31:07 -06:00
Edward Hartnett
03540e2fb0 starting to modify test 2020-06-28 20:20:17 -06:00
Edward Hartnett
52b3053b51 starting to modify test 2020-06-28 20:18:43 -06:00
Edward Hartnett
b13fcf96e7 added tst_gfs_data1 2020-06-28 19:38:18 -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
Dennis Heimbigner
c68c4c804d Fix undefined references when using Visual Studio
Fix Issue https://github.com/Unidata/netcdf-c/issues/1725.
Replace PR https://github.com/Unidata/netcdf-c/pull/1726
Also replace PR https://github.com/Unidata/netcdf-c/pull/1694

The general problem is that under Visual Studio, we are seeing
a number of undefined reference and other scoping errors.
The reason is that the code is not properly using Visual Studio
_declspec() declarations.

The basic solution is to ensure that when compiling the code itself
one needs to ensure that _declspec(dllexport) is used. There
are several sets of macros to handle this, but they all rely
on the flag DLL_EXPORT being define when the code is compiled,
but not being defined when the code is used via a .h file.

As a test, I modified XGetOpt.c to build properly. I also
fixed the oc2 library to properly _declspec things like ocdebug.

I also made some misc. changes to get all the tests to run
if cygwin is installed (to get bash, sed, etc).

Misc. Changes:
* Put XGetOpt.c into libsrc and copy at build time
  to the other directories where it is needed.
2020-05-18 19:36:28 -06:00
Dennis Heimbigner
84c69afca7 Allow redefinition of variable filters
re: Github issue https://github.com/Unidata/netcdf-c/issues/1713

If nc_def_var_filter or nc_def_var_deflate or nc_def_var_szip is
called multiple times with the same filter id, but possibly with
different sets of parameters, then the first invocation is
sticky and later invocations are ignored. The desired behavior
is to have the last invocation be used.

This PR implements that desired behavior, with some special
cases.  If you call nc_def_var_deflate multiple times, then the
last invocation rule applies with respect to deflate. However,
the shuffle filter, if enabled, is always applied just before
applying deflate.

Misc unrelated changes:
1. Make client-side filters be disabled by default
2. Fix the definition of uintptr_t and use in oc2 and libdap4
3. Add some test cases
4. modify filter order tests to use plugin filters rather
   than client-side filters
2020-05-11 09:42:31 -06:00
Ward Fisher
b490c457e9
Merge pull request #1717 from NOAA-GSD/ejh_cache
now properly setting HDF5 file cache for files created/opened sequentially on parallel I/O builds
2020-05-08 15:00:45 -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
Edward Hartnett
2e2f3e7d29 added demonstration of nc_def_var_deflate() issue 2020-05-07 07:08:52 -06:00
Dennis Heimbigner
f0cd7f8ec1 Support no-op dispatch functions
re: https://github.com/Unidata/netcdf-c/issues/1693

1. Add functions to libdispatch/dnotnc4.c to support
   dispatch table operations that should work for any
   dispatch table, even if they do not do anything.
   Functions such as nc_inq_var_filter.
2. Modify selected dispatch tables to utilize
   the noop functions.
3. Extend nc_test/tst_formats.c to test.

This is an extension of Ed's work to do this for
chunking and deflate and szip. See PRs
https://github.com/Unidata/netcdf-c/pull/1697
and
https://github.com/Unidata/netcdf-c/pull/1692

As a side effect, elide libdispatch/dnotnc3.c since
it is no longer used.
2020-04-15 14:44:58 -06:00
Dennis Heimbigner
6f86660da8 Fix missing forward declarations
re: issue https://github.com/Unidata/netcdf-c/issues/1687

static functions are being used before decl and it causes
errors. Only occurs when BIG_ENDIAN is defined.
Solution is to add the forward declarations.
2020-04-03 20:15:34 -06:00
Ward Fisher
9d482c3f20 Added hard failure to script, modified cmake default. 2020-04-01 16:20:33 -06:00
Ward Fisher
74afd13f44
Merge pull request #1671 from NOAA-GSD/ejh_hdf5_1_12_0
build library with hdf5 1 12 0
2020-03-24 14:33:14 -06:00
Edward Hartnett
edea5e3552 now pass 0 for deflate_level if deflate not in use 2020-03-16 11:01:13 -06:00
Edward Hartnett
6fa5e677b3 merged in ejh_hdf5_1_12 2020-03-09 07:06:05 -06:00
Ward Fisher
34c3b85fc0
Merge pull request #1662 from NOAA-GSD/ejh_scalar_chunking
Return error on attempt to set chunking on scalar var
2020-03-06 14:07:18 -07:00
Ward Fisher
fa0cd583ef
Merge pull request #1659 from NOAA-GSD/ejh_storage
Fix parallel build error in tst_mode.c caused by returning errors for attempts to set filters on scalar vars
2020-03-05 16:45:33 -07: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
502336c2c7 now return NC_EINVAL on attempt to set chunking on scalar var 2020-03-03 11:57:16 -07:00
Edward Hartnett
c484f8f3d0 fixed tst_mode to not attempt to set filters on scalars 2020-03-03 07:44:37 -07:00
Edward Hartnett
836a8fb55d fixed szip test error in tst_parallel5.c 2020-03-02 16:31:56 -07:00