Commit Graph

8554 Commits

Author SHA1 Message Date
Ward Fisher
6aee687446 Tweak to software.html static page. 2022-03-18 10:17:25 -06:00
Ward Fisher
526552034c
Merge pull request #2250 from WardF/oc_auth_fix.wif
Change order in which auth.html is generated and copied.
2022-03-17 16:40:13 -06:00
Ward Fisher
3accf83725 Change order in which auth.html is generated and copied. 2022-03-17 15:57:16 -06:00
Dennis Heimbigner
6d44ec39f6 1. Fix conflicts with current master.
2. There is a bug in building tinyxml2 under OSX, so as a hack, the absence of an installed libxml2 under OSX will disable libxml2 and DAP4.
2022-03-15 15:33:13 -06:00
Ward Fisher
e0a2236b5a
Merge pull request #2123 from xantares/patch-1
cmake: list zip libs before szip
2022-03-15 09:19:48 -06:00
Ward Fisher
aba6fc0c84
Merge pull request #2247 from WardF/gh2104.wif
Rebase of #2104
2022-03-14 22:13:17 -06:00
Ward Fisher
06cc87ca7f
Merge pull request #2246 from WardF/gh2103.wif
Rebase of #2103
2022-03-14 17:01:58 -06:00
Ward Fisher
5856b8ed9c Merge branch 'mingw-w64-name_path' of https://github.com/mjwoods/netcdf-c into gh2104.wif 2022-03-14 16:11:18 -06:00
Ward Fisher
247ffac282 Merge branch 'mingw-w64-cmake' of https://github.com/mjwoods/netcdf-c into gh2103.wif 2022-03-14 16:08:42 -06:00
Ward Fisher
8152a515c4
Merge pull request #2089 from d70-t/open_mem_truncated_file
Don't assert if trying to open truncated file from memory.
2022-03-14 16:06:56 -06:00
Ward Fisher
d281be2333
Merge branch 'main' into open_mem_truncated_file 2022-03-14 15:02:02 -06:00
Dennis Heimbigner
ad4a3f69b9 typo 2022-03-14 14:36:49 -06:00
Dennis Heimbigner
bbdfec2dcf retry 2022-03-14 14:14:08 -06:00
Dennis Heimbigner
746dbc05f8 more strlcat remove 2022-03-14 14:08:54 -06:00
Dennis Heimbigner
1290022433 remove use of strlcat 2022-03-14 14:00:09 -06:00
Dennis Heimbigner
150e19cf87 Fix new LGTM errors 2022-03-14 13:50:41 -06:00
Dennis Heimbigner
7230cf16b4 fix conflicts 2022-03-14 13:08:14 -06:00
Dennis Heimbigner
092c395c76 Update release notes 2022-03-14 13:06:58 -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
Ward Fisher
f121e0b39b
Merge pull request #2050 from e4t/strict-aliasing
Fix Compiler Strict Aliasing Rule Violations
2022-03-10 15:22:58 -07:00
Ward Fisher
3bf18fbdb8
Merge pull request #2039 from mathstuf/various-fixes
Various fixes
2022-03-10 14:52:30 -07:00
Ward Fisher
cb0062a245
Merge pull request #2243 from WardF/main
Remove stale badges, add badge for Repology
2022-03-10 14:37:06 -07:00
Ward Fisher
a328318d6b Remove stale badges, add badge for Repology in support of https://github.com/Unidata/netcdf-c//pull/1350 2022-03-10 14:31:54 -07:00
Ward Fisher
84b109ec68
Merge pull request #2239 from seanm/Wstrict-prototypes
Fixed Clang -Wstrict-prototypes warnings
2022-03-09 14:30:45 -07:00
Aaron Kaplan
ead1cd4ad3 Fix incorrect PR link 2022-03-03 13:44:26 -05:00
Sean McBride
bb03191356 Fixed Clang -Wstrict-prototypes warnings 2022-03-01 23:21:24 -05:00
Ward Fisher
c30801f7b0
Merge pull request #2238 from WardF/gh2206.wif
Conflict resolution for #2206
2022-03-01 10:34:30 -08:00
Ward Fisher
7c113cfae4 Merge branch 'h5align.dmh' of https://github.com/DennisHeimbigner/netcdf-c into gh2206.wif 2022-03-01 09:49:13 -08:00
Dennis Heimbigner
bbbc72739f Incorporate Dave Allured's documentation 2022-02-28 14:40:35 -07:00
Dennis Heimbigner
a698b919c1 Update get/set alignment documentation 2022-02-27 16:12:08 -07:00
Ward Fisher
49842fc3f9
Merge pull request #2231 from DennisHeimbigner/vlenfilter.dmh
Explicitly disallow variable length type compression
2022-02-22 16:26:03 -07:00
Ward Fisher
3956e1734a
Merge branch 'main' into vlenfilter.dmh 2022-02-22 16:25:52 -07:00
Ward Fisher
f1c1d7db32
Merge pull request #2211 from Dave-Allured/format-compat-release-notes-2
Release notes for #2176 format compatibility
2022-02-22 16:03:58 -07:00
Charlie Zender
d509396d16 Fix mis-copied comparator 2022-02-21 10:07:57 -08:00
Charlie Zender
dff2cb56ec
Merge branch 'Unidata:main' into csz_bitround 2022-02-20 13:35:59 -08:00
Charlie Zender
4264ee817d Add missing BitRound block to zsync.c 2022-02-20 13:00:37 -08:00
Dennis Heimbigner
78f8dad82b Update Release Notes 2022-02-19 17:22:11 -07:00
Charlie Zender
3299ba534b Add BitRound to ncgen 2022-02-19 16:08:36 -08:00
Charlie Zender
7b8c39f722 Change name to _QuantizeGranularBitRoundNumberOfSignificantDigits. Change identifier from QUANTIZEBR to QUANTIZEGBR to make room for new BitRound token = BR. 2022-02-19 15:55:36 -08:00
Dennis Heimbigner
9b7202bf06 Explicitly disallow variable length type compression
re: https://github.com/Unidata/netcdf-c/issues/2189

Compression of a variable whose type is variable length
fails for all current filters. This is because at some point,
the compression buffer will contain pointers to data instead
of the actual data. Compression of pointers of course is meaningless.

The PR changes the behavior of nc_def_var_filter so that it will
fail with error NC_EFILTER if an attempt is made to add a filter
to a variable whose type is variable-length.

A variable is variable-length if it is of type string or VLEN
or transitively (via a compound type) contains a string or VLEN.

Also added a test case for this.

## Misc Changes
1. Turn off a number of debugging statements
2022-02-19 16:47:31 -07:00
Charlie Zender
b4969df1ef Set bit_xpl_nbr_sgn_dbl=52 not 53. No longer add additional bit to prc_bnr_xpl_rqr for BitGroom NC_DOUBLE. Bugfix maintains original BG behavior, fixes corner case. 2022-02-19 14:48:08 -08:00
xantares
1eb6b28820 cmake: list zip libs before szip
as szip libs references libz as optimized, the REMOVE_DUPLICATES strips zlib out of TLL_LIBS but not its optimized keyword resulting in an invalid list
just list zip before fixes the issue (or removing the REMOVE_DUPLICATES of TLL_LIBS)
2022-02-19 12:37:24 +01:00
Charlie Zender
72eb8b2ce2 Fix bone-headed stuff. tst_quantize and tst_filter remain borken. 2022-02-18 12:06:28 -08:00
Charlie Zender
a74d3573e5 First draft of BitRound implementation 2022-02-18 11:00:37 -08:00
Ward Fisher
a7465d46cb
Merge pull request #2216 from edwardhartnett/ejh_logging
Better handling of logging for parallel I/O builds
2022-02-16 15:48:29 -07:00
Greg Sjaardema
c746c11539
Merge branch 'main' into dimscale_attachement_optional 2022-02-16 11:47:14 -07:00
Ward Fisher
53fdee6757
Merge pull request #2218 from scivision/main
CMake: CMP0075 requires CMake >= 3.12.
2022-02-10 10:48:34 -07:00
Dennis Heimbigner
2a9edc8969 Update Release Notes (2) 2022-02-08 22:25:51 -07:00
Dennis Heimbigner
c0f086fc14 Update Release Notes 2022-02-08 20:55:23 -07:00
Dennis Heimbigner
36102e3c32 Improve UTF8 Support On Windows
re: Issue https://github.com/Unidata/netcdf-c/issues/2190

The primary purpose of this PR is to improve the utf8 support
for windows. This is persuant to a change in Windows that
supports utf8 natively (almost). The almost means that it is
still utf16 internally and the set of characters representable
by utf8 is larger than those representable by utf16.

This leaves open the question in the Issue about handling
the Windows 1252 character set.

This required the following changes:

1. Test the Windows build and major version in order to see if
   native utf8 is supported.
2. If native utf8 is supported, Modify dpathmgr.c to call the 8-bit
   version of the windows fopen() and open() functions.
3. In support of this, programs that use XGetOpt (Windows versions)
   need to get the command line as utf8 and then parse to
   arc+argv as utf8. This requires using a homegrown command line parser
   named XCommandLineToArgvA.
4. Add a utility program called "acpget" that prints out the
   current Windows code page and locale.

Additionally, some technical debt was cleaned up as follows:

1. Unify all the places which attempt to read all or a part
   of a file into the dutil.c#NC_readfile code.
2. Similary unify all the code that creates temp files into
   dutil.c#NC_mktmp code.
3. Convert almost all remaining calls to fopen() and open()
   to NCfopen() and NCopen3(). This is to ensure that path management
   is used consistently. This touches a number of files.
4. extern->EXTERNL as needed to get it to work under Windows.
2022-02-08 20:53:30 -07:00