Commit Graph

1171 Commits

Author SHA1 Message Date
Edward Hartnett
4cd4aff1af testing with fill values 2021-08-31 07:12:46 -06:00
Edward Hartnett
e3c8be89f6 testing with fill values 2021-08-31 07:10:54 -06:00
Edward Hartnett
f809aadc6c testing with fill values 2021-08-31 06:59:59 -06:00
Edward Hartnett
bb40936a7e more testing with type conversion 2021-08-31 06:42:30 -06:00
Edward Hartnett
1e6ad091b6 type conversion with quantize between float and double 2021-08-29 23:06:16 -06:00
Edward Hartnett
5d1aa2a926 added more documentation, also started on test code for type conversion 2021-08-29 22:34:14 -06:00
Edward Hartnett
f5e2926f02 testing of quantize with scalars 2021-08-29 22:25:57 -06:00
Edward Hartnett
229e101569 quantize now working for NC_DOUBLE 2021-08-29 20:50:19 -06:00
Edward Hartnett
d3e725b3c8 attempting to fix ncdap test on appvayor 2021-08-29 20:39:51 -06:00
Edward Hartnett
ed60a16529 moving quantize to its own function 2021-08-29 08:42:21 -06:00
Edward Hartnett
5aa429cda4 whitespace cleanup 2021-08-29 01:13:39 -06:00
Edward Hartnett
bec26aa3de more quantize testing 2021-08-29 01:04:09 -06:00
Edward Hartnett
eabbd686b0 bitgroom working for floats 2021-08-29 00:30:17 -06:00
Edward Hartnett
0265953207 more quantize testing 2021-08-26 07:24:22 -06:00
Edward Hartnett
c609a17a4f more quantize testing 2021-08-26 07:21:07 -06:00
Edward Hartnett
539578dab8 more tests for quantization 2021-08-26 06:37:45 -06:00
Edward Hartnett
c655488400 more quantize testing 2021-08-25 02:17:57 -06:00
Edward Hartnett
ee788d6f25 more quantize testing 2021-08-25 02:07:09 -06:00
Edward Hartnett
4ac7fa9584 more quantize testing 2021-08-25 02:00:14 -06:00
Edward Hartnett
b2c0bb9810 more quantize testing 2021-08-25 01:54:25 -06:00
Edward Hartnett
a02faa0cb5 more testing of qunatize setting 2021-08-25 01:45:38 -06:00
Tobias Kölling
b47f61bc25 added test for opening a trunceded file using in-memory open
This test currently fails.
When trying to open an in-memory file which is only available partially
(i.e. by accidental truncation), then the library should fail with an
error in stead of an assertation, such that user code can react on this.
2021-08-24 17:04:40 +02:00
Edward Hartnett
148706b657 now reading quantize attribute to get settings 2021-08-24 03:35:52 -06:00
Edward Hartnett
d6d9825b2c now qunatizing with inq function in dispatch table 2021-08-24 01:53:16 -06:00
Edward Hartnett
9a18689ffa getting ready for next try at quantization code 2021-08-24 00:45:38 -06:00
Greg Sjaardema
28457cb570 Disable varible rename test
This PR adds the coordinate dimids to all variables; previously 1D
variables did not have it.  There is an issue with renaming variables
with the coordinate dimid which is now exposed in this test which
renames a 1D variable.

Disabling parts of this test until the variable renaming code can be
refactored.
2021-08-12 10:56:39 -06:00
Ward Fisher
9f798e2ed6 Merge branch 'virtual_datasets' of https://github.com/d70-t/netcdf-c into gh1983.wif 2021-07-19 09:44:35 -07:00
Ward Fisher
b6c3568ec0 Fix in support of https://github.com/Unidata/netcdf-c/issues/2027 2021-07-06 11:34:30 -06:00
Dennis Heimbigner
4bf58c65dd fix conflicts 2021-06-02 10:59:26 -06:00
Ward Fisher
94262989eb
Merge pull request #1991 from gsjaardema/eliminate_need_for_hdf5-1.6-API
Remove need for HDF5-1.6 API being defined
2021-06-01 16:36:28 -06:00
Ward Fisher
384e77d9fe
Merge pull request #2012 from DennisHeimbigner/dimscope.dmh
Regularize the scoping of dimensions
2021-06-01 16:28:12 -06:00
Ward Fisher
7446311dfd
Merge pull request #2014 from Unidata/fix-makedist.wif
Another PR to fix 'make distcheck' issues that had crept in.
2021-06-01 15:26:23 -06:00
Ward Fisher
c41f7943cb
Merge branch 'master' into dimscope.dmh 2021-06-01 14:12:04 -06:00
Ward Fisher
e21ef7bcb0
Merge branch 'master' into dap4fixes2.dmh 2021-06-01 14:11:39 -06:00
Ward Fisher
64fa63a774 Clean up stray file that was fouling make distcheck 2021-06-01 13:55:10 -06:00
Dennis Heimbigner
ec5b3f9a4f Regularize the scoping of dimensions
This is a follow-on to pull request
````https://github.com/Unidata/netcdf-c/pull/1959````,
which fixed up type scoping.

The primary changes are to _nc\_inq\_dimid()_ and to ncdump.

The _nc\_inq\_dimid()_ function is supposed to allow the name to be
and FQN, but this apparently never got implemented. So if was modified
to support FQNs.

The ncdump program is supposed to output fully qualified dimension names
in its generated CDL file under certain conditions.

Suppose ncdump has a netcdf-4 file F with variable V, and V's parent group
is G. For each dimension id D referenced by V, ncdump needs to determine
whether to print its name as a simple name or as a fully qualified name (FQN).

The algorithm is as follows:

1. Search up the tree of ancestor groups.
2. If one of those ancestor groups contains the dimid, then call it dimgrp.
3. If one of those ancestor groups contains a dim with the same name as the dimid, but with a different dimid, then record that as duplicate=true.
4. If dimgrp is defined and duplicate == false, then we do not need an fqn.
5. If dimgrp is defined and duplicate == true, then we do need an fqn to avoid incorrectly using the duplicate.
6. If dimgrp is undefined, then do a preorder breadth-first search of all the groups looking for the dimid.
7. If found, then use the fqn of the first found such dimension location.
8. If not found, then fail.

Test case ncdump/test_scope.sh was modified to test the proper
operation of ncdump and _nc\_inq\_dimid()_.

Misc. Other Changes:
* Fix nc_inq_ncid (NC4_inq_ncid actually) to return root group id if the name argument is NULL.
* Modify _ncdump/printfqn_ to print out a dimid FQN; this supports verification that the resulting .nc files were properly created.
2021-05-31 15:51:12 -06:00
Dennis Heimbigner
e632d02041 Re-enable DAP2 authorization tests
The thredds-test server now has some password protected datasets
that can be used to test DAP2 authorization support.
The general location is
````
https://thredds.ucar.edu/thredds/tdscapabilities/authTest.html
````
and specifically:
````
https://thredds.ucar.edu/thredds/dodsC/test3/testData.nc.html
````

This PR replaces old testcases with ncdap_test/testauth.sh.
This testcase allows us to test use of the .dodsrc file and .netrc file
and embedded user+pwd.

As part of this, I had to create a program (ncdap_test/pathcvt.c)
that is essentially the equivalent to cygpath. Given a path in
windows, unix, msys or cygwin format, it converts it to the
equivalent format in one of those four cases.  So it can be used
to convert a cygwin path to a windows path, for example. This is
needed in testpathcvt and testauth to make sure that the paths
in .daprc (e.g. the reference to .netrc) are of the proper
format.

Misc. Other Changes:
1. Fix some memory leaks in libdap2
2. Setting the env variable CURLOPT_VERBOSE allows tracking of curl
   operations.
3. Make tst_charvlenbug be conditional on NC_VLEN_NOTEST.
2021-05-29 21:30:33 -06:00
Greg Sjaardema
e2d0bbb8ea
Merge branch 'master' into eliminate_need_for_hdf5-1.6-API 2021-05-28 07:11:13 -06:00
Ward Fisher
19809e2c26
Merge branch 'master' into ncdumpvlenbug.dmh 2021-05-27 14:50:05 -06:00
Ward Fisher
cc618af959
Merge branch 'master' into badfilter.dmh 2021-05-27 12:30:39 -06:00
Dennis Heimbigner
8ceafa62d4 Improve operation of the DAP4 code and fix bugs
re: e-support EOT-483791

* Add a new set of remote tests based on using the thredds-test server.
* Improve error reporting when server requests fail.
* Fix handing of _NCProperties attribute
2021-05-21 20:46:56 -06:00
Dennis Heimbigner
0e931f22a5 More cygwin fixes 2021-05-19 21:04:53 -06:00
Dennis Heimbigner
3194585c08 add extra test 2021-05-18 14:26:33 -06:00
Dennis Heimbigner
74e7812d83 Improve error message when non-existent filter is encountered.
re: https://github.com/Unidata/netcdf-c/issues/1996

Improve the error message and location that is reported when reading a filter with a variable that uses a filter that is not available on the reading platform.

This requires checking the availability of the filter, recording it, and failing when any attempt is made to read or write that variable. A test case was added for this in tst_filter.sh. Also, LOG level 0 message is generated giving the variable and the filter id.

Note that by design if there is no attempt to read or write the variable, then no error is reported; this means that, for example, ncdump -h will list the filter even though it is not actually available. This is important for allowing a user to see the filter details.
2021-05-17 19:49:58 -06:00
Greg Sjaardema
362b37b552 Fix for use with szip and also 1.8.21 2021-04-28 15:42:02 -06:00
Greg Sjaardema
cbcee382b0 Remove need for HDF5-1.6 API being defined 2021-04-28 13:59:24 -06:00
Dennis Heimbigner
c984b3a428 fix CMake error 2021-04-16 18:54:35 -06:00
Dennis Heimbigner
e07e32d552 Add test case 2021-04-16 16:12:53 -06:00
Ward Fisher
34e63705a6 Restored cleanup stanza in tst_filter.sh 2021-03-17 10:34:37 -06:00
Ward Fisher
6b2f25818f Fix tst_filter.sh such that it returns an error immediately on failure. 2021-03-09 13:40:12 -07:00
Dennis Heimbigner
efd905a323 Add tests for filter order on read and write cases
re: https://github.com/Unidata/netcdf-c/issues/1923
re: https://github.com/Unidata/netcdf-c/issues/1921

The issue was raised about the order of returned filter ids
for nc_inq_var_filter_ids() when creating a file as opposed
to later reading the file.

For creation, the order is the same as the order in which the
calls to nc_def_var_filter() occur.
However, after the file is closed and then reopened for reading,
the question was raised if the returned order is the same or the reverse.
In fact the order is the same in both cases.

This PR extends the existing filter order testcase to check the create
versus read orders. This also required changing the H5Znoop(1) filters
in the plugins directory.

Misc. Unrelated Changes
1. fix calls to fdopen under windows
2. Temporarily suppres the nczarr_tests/run_chunkcases test
   since it seems to be causing problems with github actions.
2020-12-29 20:12:35 -07:00
Dennis Heimbigner
730aa1f6bc Improve the building of NCZARR S3 support in CMake and Autoconf
There were some irregularities in the flags for handling NCZarr S3 support.

The primary change is to regularize the flags controlling this to the following.

1. Automake: --enable-nczarr-s3 and CMake: ENABLE_NCZARR_S3
2. Automake: --enable-nczarr-s3-tests and CMake: ENABLE_NCZARR_S3_TESTS

Flag 1 indicates that NCZarr should be built with S3 support enabled.
Flag 2 indicates that the NCZarr S3 tests should be run

These two flags are separate because running the NCZarr S3 tests
requires access to protected S3 resources. Currently, running
these tests is restricted to Unidata personnel. However, users
may want to enable S3 support even if they cannot run the tests.
It is, of course, an error to specify 2 without specifying 1.

Additionally, if the AWS S3 SDK library is not found, then the NCZARR S3
support and testing must be disabled. Otherwise an error is signaled
during the build.

Some of these NCZarr and S3 changes are propagated to nc-config.

Misc. Other Changes:

1. Allow testing for CYGWIN or MSVC in shell scripts.
2. Add specific test for HDF5 library version 1.10.6.
   This is encoded as "HDF5_UTF8_PATHS" because that is the first
   version where HDF5 properly supports it under Windows. This is used
   in hdf5internal/nc4_ndf5_ansi_to_utf8.
3. Add a AM Conditional -- AX_IGNORE -- for use in testing
   when it is desirable to temporarily suppress Makefile code.
4. Add MULTIFILTER flag to CMakeLists.txt
2020-10-16 15:04:51 -06:00
Dennis Heimbigner
aeb3ac2809 Mostly revert the filter code to reduce its complexity of use.
re: https://github.com/Unidata/netcdf-c/issues/1836

Revert the internal filter code to simplify it. From the user's
point of view, the only visible changes should be:

1. The functions that convert text to filter specs have had their signature reverted and have been moved to netcdf_aux.h
2. Some filter API functions now return NC_ENOFILTER when inquiry is made about some filter.

Internally,the dispatch table has been modified to get rid of the filter_actions
entry and associated complex structures. It has been replaced with
inq_var_filter_ids and inq_var_filter_info entries and the dispatch table
version has been bumped to 3. Corresponding NOOP and NOTNC4 functions
were added to libdispatch/dnotnc4.c. Also, the filter_action entries
in dispatch tables were replaced for all dispatch code bases (HDF5, DAP2,
etc). This should only impact UDF users.

In the process, it became clear that the form of the filters
field in NC_VAR_INFO_T was format dependent, so I converted it to
be of type void* and pushed its management into the various dispatch
code bases. Specifically libhdf5 and libnczarr now manage the filters
field in their own way.

The auxilliary functions for parsing textual filter specifications
were moved to netcdf_aux.h and were renamed to the following:
* ncaux_h5filterspec_parse
* ncaux_h5filterspec_parselist
* ncaux_h5filterspec_free
* ncaux_h5filter_fix8

Misc. Other Changes:

1. Document NUG/filters.md updated to reflect the changes above.
2. All the old data types (structs and enums)
   used by filter_actions actions were deleted.
   The exception is the NC_H5_Filterspec because it is needed
   by ncaux_h5filterspec_parselist.
3. Clientside filters were removed -- another enhancement
   for which no-one ever asked.
4. The ability to remove filters was itself removed.
5. Some functionality needed by nczarr was moved from libhdf5
   to libsrc4 e.g. nc4_find_default_chunksizes
6. All the filterx code was removed
7. ncfilter.h and nc4filter.c no longer used

Misc. Unrelated Changes:

1. The nczarr_test makefile clean was leaving some directories; so
   add clean-local to take care of them.
2020-09-27 12:43:46 -06:00
Tobias Kölling
a80d473ca8 Merge remote-tracking branch 'upstream/master' into virtual_datasets 2020-09-15 09:50:25 +02:00
Tobias Kölling
b6b9f2fd6f enable test for virtual datasets only for HDF5 >= 1.10.0 2020-09-14 18:06:34 +02:00
Dennis Heimbigner
2f0a6d22e9 Fix error where not converting fill data
re: Github Issue https://github.com/Unidata/netcdf-c/issues/1826

It turns out that the common get code (NC4_get_vars) in libhdf5
(and libnczarr) has an optimization where it does not attempt to
read from the file if the file is all fill values. Rather it
just fills the output buffer with the fill value.  The problem
is that -- in that case -- it forgets that conversion might still be
needed.  So the conversion never occurs and the raw bits of
the fill data are stored directly into the memory space.

Solution: move some code around to properly do the
conversion no matter how the data was obtained.

Added a test cases nc_test4/test_fillonly.sh and
nczarr_test/test_fillonlyz.sh
2020-09-12 14:49:59 -06:00
Tobias Kölling
4b80965491 ange H5F_CLOSE_SEMI -> H5F_CLOSE_WEAK for netcdf related tests 2020-09-02 21:29:26 +02:00
Tobias Kölling
89e656d7a5 tst_virtual_datasets: add missing hdf5 close calls 2020-09-02 16:11:43 +02:00
Ward Fisher
31dee0c4da
Revert "Revert "Fix nczarr-experimental: improve build support, disengage hdf5 vs netcdf4 flags, and find AWS libraries"" 2020-08-17 19:15:47 -06:00
Ward Fisher
16c27ca13f
Revert "Fix nczarr-experimental: improve build support, disengage hdf5 vs netcdf4 flags, and find AWS libraries" 2020-08-17 15:51:01 -06:00
Dennis Heimbigner
d85bb6fe20 The big change for this commit is complete the
disengagement of enable-netcdf4 from enable-hdf5.
That is, with the advent of nczarr, it is possible
to turn off hdf5 but still need netcdf-4 enabled
because nczarr uses libsrc4, but not libhdf5.
This change involves a bunch of things:
1. Modify configure.ac and CMakelist to make enable_hdf5
   control if hdf5 support is provided. For back compatibility,
   disable-netcdf4 is treated as disable-hdf5. But internally,
   netcdf4 support is controlled only by the enabling of formats
   that require it.
2. In support of #1, modify .travis.yml to use enable/disable-hdf5
   instead of enable/disable-netcdf4.
3. test_common.in is modified to track selected features,
   including enable-hdf5 and enable-s3-tests. This is used in
   selected tests that mix netcdf-3 and netcdf4 tests.
4. The conflation of USE_HDF5 and USE_NETCDF4 is common in
   code, tests, and build files, so all of those had to be weeded out.
5. It turns out that some of the NC4_dim functions really are HDF5 specific,
   but are not treated as such. So they are moved from nc4dim.c to
   hdf5dim.c or hdf5dispatch.c
6. Some generic functions in libhdf5 can be (and were) moved to libsrc4.
2020-08-12 15:42:50 -06:00
Tobias Kölling
1a7dd2332d added test for reading virtual datasets 2020-07-22 17:55:28 +02:00
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
Dennis Heimbigner
73537603e2 Make scalar X filter return an error instead of ignoring it 2020-03-02 15:10:54 -07:00
Dennis Heimbigner
8a5ae84dc6 fix memory leak 2020-02-27 14:29:28 -07:00
Dennis Heimbigner
b488c272d5 Fix conflicts with master 2020-02-27 14:06:45 -07:00
Edward Hartnett
5a1bbf07e4 resolved conflict in tst_h_vars2.c 2020-02-27 05:25:31 -07:00
Edward Hartnett
6f95f655dd
Merge branch 'master' into ejh_dispatch 2020-02-26 16:12:57 -07:00
Edward Hartnett
418e428a05 fixed problem with scalar compact 2020-02-26 09:13:12 -07:00
Edward Hartnett
b31aedcc8e all tests passing but compact storage for scalars not being properly written in file yet 2020-02-26 08:14:06 -07:00
Edward Hartnett
3241aca93a include storage in rec_print_metadata() output 2020-02-25 16:12:50 -07:00
Edward Hartnett
6241a6e7a0 more tests for storage, changed var names to reflect stortage 2020-02-25 15:55:34 -07:00
Edward Hartnett
2ff24bd6fe more tests for compact storage 2020-02-25 13:30:38 -07:00
Edward Hartnett
8952c9b9f1 whitespace cleanup of tst_h_vars2.c 2020-02-25 06:44:40 -07:00
Edward Hartnett
5b893d8e0a adding more test for compact var 2020-02-25 05:46:09 -07:00
Edward Hartnett
4b163b65e1 added some testing for compact vars 2020-02-24 14:34:27 -07:00
M. Scot Breitenfeld
9f9b125028 Updated H5Oget_info* and H5Oinfo_t to be compatible with HDF5 1.12.0.
Issue: build netcdf with hdf5-1.12.0 beta release fails in h5_test directory #1628
2020-02-20 17:24:29 -06:00
Dennis Heimbigner
44d0dcaad2 Add support for multiple filters per variable.
re: https://github.com/Unidata/netcdf-c/issues/1584

Support has been added for multiple filters per variable.  This
affects a number of components in netcdf. The new APIs are
documented in NUG/filters.md.

The primary changes are:
* A set of new functions are provided (see __include/netcdf_filter.h__).
    - Obtain a list of the filters associated with a variable
    - Obtain the parameters for a specific filter.
* The existing __nc_inq_var_filter__ function now returns info
  about the first defined filter.
* The utilities (ncgen, ncdump, and nccopy) now support
  an extended format for specifying a sequence of filters.
  The general form is __<filter>|<filter>..._.
* The ncdump **_Filter** attribute now dumps a list of all the
  filters associated with a variable using the above new format.
* Filter specifications can now use a filter name instead of number
  for filters known to the netcdf library, which in turn is taken
  from the HDF5 filter registration page.
* New errors are defined: NC_EFILTER and NC_ENOFILTER. The latter
  is returned if an attempt is made to access an unknown filter.
* Internally, the dispatch table has been extended to add a function
  to handle all of the filter functions.
* New, filter-related, tests were added to nc_test4.
* A new plugin was added to the plugins directory to help with testing.

Notes:
1. The shuffle and fletcher32 filters are not part of the multifilter system.

Misc. changes:
1. A debug module was added to libhdf5 to help catch error locations.
2020-02-16 12:59:33 -07:00
Edward Hartnett
07ce91a137
Merge branch 'master' into ejh_h5_par 2020-02-15 09:09:35 -07:00
Edward Hartnett
a8684c730c fixed merge conflict in RELEASE_NOTES 2020-02-15 06:42:49 -07:00
Edward Hartnett
8b9298c58d more checking in 3D test 2020-02-12 08:21:52 -07:00
Edward Hartnett
fe70e818e8 checking 3D file again after close 2020-02-12 08:18:41 -07:00
Edward Hartnett
6e316f44a6 switched to vara functions in 3D test 2020-02-12 08:17:35 -07:00
Edward Hartnett
fe96b6a3e5 checking 2nd var data in 3D test 2020-02-12 08:14:13 -07:00
Edward Hartnett
77ae2cfecc improving 3d test 2020-02-12 08:11:37 -07:00
Edward Hartnett
2addd91215 added another var to 2D test 2020-02-12 08:10:16 -07:00
Edward Hartnett
550b8fa188 better 3d unlimited testing 2020-02-12 08:06:04 -07:00
Edward Hartnett
d922af9820 adding 3d test 2020-02-12 08:04:32 -07:00
Edward Hartnett
93ef9b1bdc adding 3d test 2020-02-12 07:49:04 -07:00
Edward Hartnett
4ea78cc985 testing two unlimited dims 2020-02-12 07:45:59 -07:00
Edward Hartnett
168850c373 testing two unlimited dims 2020-02-12 07:45:29 -07:00
Edward Hartnett
4683a4da3b testing two unlimited dims 2020-02-12 07:44:54 -07:00
Edward Hartnett
2f9856b2e6 testing two unlimited dims 2020-02-12 07:30:00 -07:00
Edward Hartnett
bf87013c6b adding test 2020-02-12 07:27:51 -07:00
Edward Hartnett
fe31d48a01 adding test 2020-02-12 07:25:02 -07:00
Edward Hartnett
4c9f1d91e4 making room for new tests 2020-02-12 07:21:22 -07:00
Edward Hartnett
1cd37f1e57 whitespace cleanup 2020-02-12 07:16:12 -07:00
Edward Hartnett
03c7e61b20 merged changes from master 2020-02-11 17:20:22 -07:00
Edward Hartnett
15059a18b7 merged changes from master 2020-02-11 17:19:25 -07:00
Edward Hartnett
1487a921ba now test that bad version number in dispatch table causes rejection 2020-02-09 13:23:22 -07:00
Edward Hartnett
e957ebccfa now test that bad version number in dispatch table causes rejection 2020-02-09 13:22:35 -07:00
Edward Hartnett
e25174a29f whitespace cleanup of tst_udf.c 2020-02-09 13:19:10 -07:00
Edward Hartnett
a0839a2a7a added version to dispatch table 2020-02-09 13:07:58 -07:00
Edward Hartnett
834adfe3b1 cleanup of nc_test4/run_par_test.sh.in 2020-02-08 06:36:29 -07:00
Edward Hartnett
558988bb18 fixed docs, removed unneeded defines in test 2020-02-07 07:54:12 -07:00
Edward Hartnett
a5079585a0 test more values for szip 2020-02-07 07:05:29 -07:00
Edward Hartnett
b9aa2e76db test more values for szip 2020-02-07 07:04:48 -07:00
Edward Hartnett
c4d3937099 now check number of elements in chunk against pixels_per_block for szip compression 2020-02-07 07:03:40 -07:00
Edward Hartnett
ff7280512e checking for some bad pixels_per_block values for szip 2020-02-07 06:53:52 -07:00
Edward Hartnett
81a079997e test development for different szip option mask settings 2020-02-07 06:02:02 -07:00
Edward Hartnett
67a562393b adding test of different szip option mask settings 2020-02-07 05:58:59 -07:00
Edward Hartnett
6ae81a17c7 starting to add test for szip param values 2020-02-07 05:16:21 -07:00
Edward Hartnett
6d2d751e4e disallow zlib if szip already in use 2020-02-07 05:01:06 -07:00
Edward Hartnett
78cd7f7512 removed unneeded var 2020-02-07 04:37:04 -07:00
Edward Hartnett
3d169c432b removed redundant test 2020-02-07 04:32:57 -07:00
Edward Hartnett
04624c7be3 fix error in makefile building tst_parallel_compress.c 2020-02-06 09:17:49 -07:00
Edward Hartnett
fb2a1048bb documentation improvements for nc_inq_var_szip() 2020-02-06 07:42:53 -07:00
Edward Hartnett
6d50ba67e8 turned on some previously failing tests for nc_inq_var_szip() 2020-02-06 07:39:01 -07:00
Edward Hartnett
ca5c0234d4 renamed var for clarity 2020-02-06 07:36:10 -07:00
Edward Hartnett
d5859e91b7 not return 0 for parameters to nc_inq_var_szip if szip is not turned on for var 2020-02-06 07:35:07 -07:00
Edward Hartnett
cf74f49fdb moved tst_parallel_zlib2 to tst_parallel_compress 2020-02-05 17:40:31 -07:00
Edward Hartnett
4a2ac1a338 now parallel szip test working in tst_parallel_zlib2.c 2020-02-05 15:08:30 -07:00
Edward Hartnett
6c39c1dc23 more of szip test in tst_parallel_zlib2.c 2020-02-05 15:01:31 -07:00
Edward Hartnett
3247061dc0 adding szip test to tst_parallel_zlib2.c 2020-02-05 14:56:06 -07:00
Edward Hartnett
b09446b0da test nc_inq_var_szip after call to nc_def_var_szip, but before enddef 2020-02-04 08:47:18 -07:00
Edward Hartnett
a6fbc3eea2 fix problem with pre-enddef call to nc_inq_var_szip() 2020-02-04 07:11:44 -07:00
Edward Hartnett
bf3407ce67 more tests 2020-02-04 05:38:15 -07:00
Edward Hartnett
e363bd59c7 testing nc_def_var_szip when szip has not been built into HDF5 2020-02-04 05:33:52 -07:00
Edward Hartnett
21a204c4e8 start using par filters in HDF5-1.10.3 2020-01-17 14:01:07 -07:00
Edward Hartnett
b9823d2658 fixed shell test for par filters 2020-01-17 12:13:45 -07:00
Edward Hartnett
3da6304f6a fixing running of parallel filter tests only when parallel filters are present 2020-01-17 11:33:58 -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
Edward Hartnett
7e332690d2 more szip testing 2020-01-06 08:04:27 -07:00
Edward Hartnett
9c8719bd00 more szip tests 2020-01-06 08:01:28 -07:00
Edward Hartnett
65e5897533 whitespace clean up 2020-01-06 07:58:11 -07:00
Edward Hartnett
8a341372ea clean up 2020-01-06 07:57:50 -07:00
Edward Hartnett
1c3edc503d now checking for proper error from nc_def_var_szip() when szip is not present 2020-01-06 07:53:31 -07:00
Edward Hartnett
c47b404531 added test for when szip is missing from HDF5 2020-01-06 07:50:02 -07:00
Edward Hartnett
808a0e2be9 merged ejh_parallel_zlib 2020-01-02 14:25:31 -07:00
Ward Fisher
8f2be58d95
Merge pull request #1566 from NetCDF-World-Domination-Council/ejh_unlim_dims
Fix problems with read past end of dataset but within dimension length for vars with multiple unlimited dimensions
2019-12-23 15:08:56 -07:00
Edward Hartnett
af0b28ffd5 removed unneeded delete 2019-12-20 14:05:57 -07:00
Edward Hartnett
c4a8671a0d fixed comments 2019-12-20 14:04:57 -07:00
Edward Hartnett
61477db387 fixed comments 2019-12-20 14:03:48 -07:00
Edward Hartnett
9ded9b1dfd restored tst_mode tests 2019-12-20 14:00:59 -07:00
Edward Hartnett
680e44f628 changed name of macro 2019-12-20 13:58:01 -07:00
Edward Hartnett
c16e7ef3ce more test development 2019-12-20 12:52:38 -07:00