Commit Graph

717 Commits

Author SHA1 Message Date
Kyle Shores
9584b4fa3b Replace ENABLE_LIBXML2 with NETCDF_ENABLE_LIBXML2 2024-03-18 15:52:09 -05:00
Kyle Shores
c5f24df396 Replace ENABLE_HDF5 with NETCDF_ENABLE_HDF5 2024-03-18 15:52:02 -05:00
Kyle Shores
0535edd9c1 Replace ENABLE_FILTER_TESTING with NETCDF_ENABLE_FILTER_TESTING 2024-03-18 15:51:55 -05:00
Kyle Shores
6d1bae4de9 Replace ENABLE_EXTERNAL_SERVER_TESTS with NETCDF_ENABLE_EXTERNAL_SERVER_TESTS 2024-03-18 15:51:35 -05:00
Kyle Shores
831bf665ce Replace ENABLE_DOXYGEN with NETCDF_ENABLE_DOXYGEN 2024-03-18 15:51:24 -05:00
Kyle Shores
d270aa8e93 Replace ENABLE_DAP with NETCDF_ENABLE_DAP 2024-03-18 15:51:14 -05:00
Kyle Shores
2bce1e6776 Replace ENABLE_CDF5 with NETCDF_ENABLE_CDF5 2024-03-18 15:51:04 -05:00
Kyle Shores
b4eb8bf019 Replace ENABLE_BYTERANGE with NETCDF_ENABLE_BYTERANGE 2024-03-18 15:50:57 -05:00
Kyle Shores
e934438e14 replacing ENABLE_ATEXIT_FINALIZE 2024-03-18 15:30:20 -05:00
Kyle Shores
dc4830a632 replacing BUILD_UTILITIES 2024-03-18 15:29:24 -05:00
Kyle Shores
ce2d5d9045 matching cmake variables in autotools configuration 2024-01-08 10:29:14 -06:00
Ward Fisher
807c6ef3f9
Merge branch 'main' into execinfo.dmh 2023-11-15 15:54:35 -07:00
Ward Fisher
f1ada42b5d Added fenceposts so that dependencies and options specific to nczarr are skipped if nczarr is not enabled. 2023-11-07 12:18:13 -07:00
Dennis Heimbigner
adea80f376 Remove the execinfo capability
re: Issue https://github.com/Unidata/netcdf-c/issues/2766

This attempt to programmatically dump stack never worked,
so it is time to kill it off.
2023-11-04 21:32:33 -06:00
Ward Fisher
3c013ce342 Merged in current state of https://github.com/Unidata/netcdf-c/pulls/2741 2023-09-29 15:05:43 -06:00
Dennis Heimbigner
2bb6013dfd Update S3 subtree 2023-09-27 18:53:45 -06:00
Dennis Heimbigner
df3636b959 Mitigate S3 test interference + Unlimited Dimensions in NCZarr
This PR started as an attempt to add unlimited dimensions to NCZarr.
It did that, but this exposed significant problems with test interference.
So this PR is mostly about fixing -- well mitigating anyway -- test
interference.

The problem of test interference is now documented in the document docs/internal.md.
The solutions implemented here are also describe in that document.
The solution is somewhat fragile but multiple cleanup mechanisms
are provided. Note that this feature requires that the
AWS command line utility must be installed.

## Unlimited Dimensions.
The existing NCZarr extensions to Zarr are modified to support unlimited dimensions.
NCzarr extends the Zarr meta-data for the ".zgroup" object to include netcdf-4 model extensions. This information is stored in ".zgroup" as dictionary named "_nczarr_group".
Inside "_nczarr_group", there is a key named "dims" that stores information about netcdf-4 named dimensions. The value of "dims" is a dictionary whose keys are the named dimensions. The value associated with each dimension name has one of two forms
Form 1 is a special case of form 2, and is kept for backward compatibility. Whenever a new file is written, it uses format 1 if possible, otherwise format 2.
* Form 1: An integer representing the size of the dimension, which is used for simple named dimensions.
* Form 2: A dictionary with the following keys and values"
   - "size" with an integer value representing the (current) size of the dimension.
   - "unlimited" with a value of either "1" or "0" to indicate if this dimension is an unlimited dimension.

For Unlimited dimensions, the size is initially zero, and as variables extend the length of that dimension, the size value for the dimension increases.
That dimension size is shared by all arrays referencing that dimension, so if one array extends an unlimited dimension, it is implicitly extended for all other arrays that reference that dimension.
This is the standard semantics for unlimited dimensions.

Adding unlimited dimensions required a number of other changes to the NCZarr code-base. These included the following.
* Did a partial refactor of the slice handling code in zwalk.c to clean it up.
* Added a number of tests for unlimited dimensions derived from the same test in nc_test4.
* Added several NCZarr specific unlimited tests; more are needed.
* Add test of endianness.

## Misc. Other Changes
* Modify libdispatch/ncs3sdk_aws.cpp to optionally support use of the
   AWS Transfer Utility mechanism. This is controlled by the
   ```#define TRANSFER```` command in that file. It defaults to being disabled.
* Parameterize both the standard Unidata S3 bucket (S3TESTBUCKET) and the netcdf-c test data prefix (S3TESTSUBTREE).
* Fixed an obscure memory leak in ncdump.
* Removed some obsolete unit testing code and test cases.
* Uncovered a bug in the netcdf-c handling of big-endian floats and doubles. Have not fixed yet. See tst_h5_endians.c.
* Renamed some nczarr_tests testcases to avoid name conflicts with nc_test4.
* Modify the semantics of zmap\#ncsmap_write to only allow total rewrite of objects.
* Modify the semantics of zodom to properly handle stride > 1.
* Add a truncate operation to the libnczarr zmap code.
2023-09-26 16:56:48 -06:00
Ward Fisher
7333d09982 Correct the logic of when and how to link against amazon S3 AWS SDK libraries. 2023-08-24 17:39:49 -05:00
Ward Fisher
d90abc5de4 Modify how the aws-sdk-cpp libraries are detected using autotools. Complicated by the fact that the 'official' method uses cmake. 2023-08-24 16:03:05 -05:00
Ward Fisher
ccfe62de72 Fix a missing 'fi' 2023-08-11 11:29:30 -06:00
Ward Fisher
939245ca4a
Merge branch 'main' into shifterr.dmh 2023-08-11 11:02:55 -06:00
Dennis Heimbigner
f1a3a64b65 Cleanup the handling of cache parameters.
re: https://github.com/Unidata/netcdf-c/issues/2733

When addressing the above issue, I noticed that there was a disconnect
in NCZarr between nc_set_chunk_cache and nc_set_var_chunk cache.
Specifically, setting nc_set_chunk_cache had no impact on the per-variable cache parameters when nc_set_var_chunk_cache was not used.

So, modified the NCZarr code so that the per-variable cache parameters are set in this order (#1 is first choice):
1. The values set by nc_set_var_chunk_cache
2. The values set by nc_set_chunk_cache
3. The defaults set by configure.ac
2023-08-10 16:57:57 -06:00
Dennis Heimbigner
c4ecdd6403 Fix a number of minor bugs
1. Fix a shift bug in ncexhash.c (Issue https://github.com/Unidata/netcdf-c/issues/2702)
2. Fix an S3 related error in test_byterange.sh
3. Fix bz2/bzip2 handling in configure.ac
2023-07-24 16:20:26 -06:00
Ward Fisher
4a61f4771b Add autotools option to disable checking for libzstd. 2023-07-20 16:08:07 -06:00
Ward Fisher
dc7da87e7c Add option for blosc filter. 2023-07-20 15:59:53 -06:00
Ward Fisher
401bdd5541 Parity for enable_bz2. BZ2 cannot be disabled altogether, but can fall back to inbternal implementation. 2023-07-20 15:54:56 -06:00
Ward Fisher
9137873b3d
Merge pull request #2707 from WardF/remove_fortran_bootstrap.wif
Remove fortran bootstrap option
2023-06-26 10:31:09 -06:00
Dennis Heimbigner
8887b5bb51 Update tinyxml and allow its use under OS/X.
re: PR https://github.com/Unidata/netcdf-c/pull/2710

Apparently (see above PR) tinyxml2 now works under OS/X.
So this PR is a follow on to the above PR. It modifies
our OS/X github action to test tinyxml2 under OS/X.
2023-06-12 20:16:23 -06:00
Dennis Heimbigner
cfe6231aa6
Merge pull request #2710 from skosukhin/osx-config-fix
Fix building on macOS
2023-06-12 20:12:04 -06:00
Ward Fisher
8c8c10e790 Change the network access nomenclature to be less ambiguous. As it stood, did it refer to networked drives? Other things that are network adjacent? 2023-06-12 15:23:44 -06:00
Ward Fisher
2ac9239c00
Merge branch 'main' into netaccess.dmh 2023-06-12 15:08:45 -06:00
Sergey Kosukhin
4cdbef4a02 Fix building on macOS 2023-06-12 11:26:06 +02:00
Dennis Heimbigner
9341904b0b Add earthdata test case 2023-06-10 20:11:26 -06:00
Dennis Heimbigner
cdbf04956b Provide a single option to disable all network access and testing.
Add the option "--disable-network-access" (automake)
or "-DENABLE_NETWORK_ACCESS=OFF" (cmake).
When disabled, this option transitively disables all
network access capabilities and testing.
If set, this option implies the following:
* --disable-dap
* --disable-byterange
* --disable-s3

This PR answers a request for a feature from Ed Hartnett.

## Misc. Other changes
* Take the opportunity to clean up some old, unused options;
e.g. --enable-multifilters.
* Fix bug in using S3 urls.
2023-06-10 14:08:04 -06:00
Ward Fisher
2d4f2e5d05 Removing unmaintained fortran boostrap code. It was a nice thought, but never broadly adopted and didn't work super well. 2023-06-08 14:36:37 -06:00
Ward Fisher
258ad3fabe
Merge branch 'main' into vlenperf.dmh 2023-06-06 15:59:04 -06:00
Ward Fisher
a14bfde418
Merge branch 'main' into verifyhost.dmh 2023-05-25 11:54:49 -06:00
Dennis Heimbigner
fb40a72b45 Improve performance of the nc_reclaim_data and nc_copy_data functions.
re: Issue https://github.com/Unidata/netcdf-c/issues/2685
re: PR https://github.com/Unidata/netcdf-c/pull/2179

As noted in PR https://github.com/Unidata/netcdf-c/pull/2179,
the old code did not allow for reclaiming instances of types,
nor for properly copying them. That PR provided new functions
capable of reclaiming/copying instances of arbitrary types.

However, as noted by Issue https://github.com/Unidata/netcdf-c/issues/2685, using these
most general functions resulted in a significant performance
degradation, even for common cases.

This PR attempts to mitigate the cost of using the general
reclaim/copy functions in two ways.

First, the previous functions operating at the top level by
using ncid and typeid arguments. These functions were augmented
with equivalent versions that used the netcdf-c library internal
data structures to allow direct access to needed information.
These new functions are used internally to the library.

The second mitigation involves optimizing the internal functions
by providing early tests for common cases. This avoids
unnecessary recursive function calls.

The overall result is a significant improvement in speed by a
factor of roughly twenty -- your mileage may vary. These
optimized functions are still not as fast as the original (more
limited) functions, but they are getting close. Additional optimizations are
possible. But the cost is a significant "uglification" of the
code that I deemed a step too far, at least for now.

## Misc. Changes
1. Added a test case to check the proper reclamation/copy of complex types.
2. Found and fixed some places where nc_reclaim/copy should have been used.
3. Replaced, in the netcdf-c library, (almost all) occurrences of nc_reclaim_copy with calls to NC_reclaim/copy. This plus the optimizations is the primary speed-up mechanism.
4. In DAP4, the metadata is held in a substrate in-memory file; this required some changes so that the reclaim/copy code accessed that substrate dispatcher rather than the DAP4 dispatcher.
5. Re-factored and isolated the code that computes if a type is (transitively) variable-sized or not.
6. Clean up the reclamation code in ncgen; adding the use of nc_reclaim exposed some memory problems.
2023-05-20 17:11:25 -06:00
Dennis Heimbigner
98477b9f25 ## Addendum [5/9/23]
It turns out that attempting to test S3 using a github action secret is a very complex process. So, this was disabled for github actions. However, a new *run_tests_s3.yml* action file was added that will eventually encapsulate S3 testing.
2023-05-09 21:13:49 -06:00
Dennis Heimbigner
fc796b31c1 Fix handling of CURLOPT_CAINFO and CURLOPT_CAPATH
re: Issue https://github.com/Unidata/netcdf4-python/issues/1246

This provides a **partial** solution to the above PR.
The underlying problem is with libcurl, but at least a
workaround should be possible by creating a "~/.ncrc" file
containing the line "HTTP.SSL_CAINFO=\<path to the cert (.crt) file\>".
This was not working for obscure reasons. This PR should fix it.

## Misc. Other Changes

* Update/fix configure.ac to properly test for libcurl version >= 7.66.0
* Update include/netcdf_json.h
* Remove use of strlcat from plugins.
* Fix applicability of .rc file entries
2023-04-29 15:02:59 -06:00
Dennis Heimbigner
49737888ca Improve S3 Documentation and Support
## Improvements to S3 Documentation
* Create a new document *quickstart_paths.md* that give a summary of the legal path formats used by netcdf-c. This includes both file paths and URL paths.
* Modify *nczarr.md* to remove most of the S3 related text.
* Move the S3 text from *nczarr.md* to a new document *cloud.md*.
* Add some S3-related text to the *byterange.md* document.

Hopefully, this will make it easier for users to find the information they want.

## Rebuild NCZarr Testing
In order to avoid problems with running make check in parallel, two changes were made:
1. The *nczarr_test* test system was rebuilt. Now, for each test.
any generated files are kept in a test-specific directory, isolated
from all other test executions.
2. Similarly, since the S3 test bucket is shared, any generated S3 objects
are isolated using a test-specific key path.

## Other S3 Related Changes
* Add code to ensure that files created on S3 are reclaimed at end of testing.
* Used the bash "trap" command to ensure S3 cleanup even if the test fails.
* Cleanup the S3 related configure.ac flag set since S3 is used in several places. So now one should use the option *--enable-s3* instead of *--enable-nczarr-s3*, although the latter is still kept as a deprecated alias for the former.
* Get some of the github actions yml to work with S3; required fixing various test scripts adding a secret to access the Unidata S3 bucket.
* Cleanup S3 portion of libnetcdf.settings.in and netcdf_meta.h.in and test_common.in.
* Merge partial S3 support into dhttp.c.
* Create an experimental s3 access library especially for use with Windows. It is enabled by using the options *--enable-s3-internal* (automake) or *-DENABLE_S3_INTERNAL=ON* (CMake). Also add a unit-test for it.
* Move some definitions from ncrc.h to ncs3sdk.h

## Other Changes
* Provide a default implementation of strlcpy and move this and similar defaults into *dmissing.c*.
2023-04-25 17:15:06 -06:00
Ward Fisher
c8b3b37b1a Merge branch 'dap4tests2.dmh' of https://github.com/DennisHeimbigner/netcdf-c 2023-04-11 16:42:32 -06:00
Ward Fisher
9459f92f1f
Merge branch 'main' into dap4tests1.dmh 2023-04-11 16:23:48 -06:00
Ward Fisher
91591d37a0
Merge pull request #2660 from Unidata/v4.9.2-wellspring.wif
v4.9.2 Wellspring branch
2023-04-11 15:32:26 -06:00
Dennis Heimbigner
49ade9eb0b Fix bug in szip handling.
The list of filters in libnetcdf.settings was not properly
including szip because of an incorrect tag.
2023-04-09 13:28:14 -06:00
Dennis Heimbigner
d7d216a3f5 Merge branch 'master' into dap4tests2.dmh 2023-03-16 14:03:29 -06:00
Dennis Heimbigner
2971d9731d Merge branch 'master' into dap4tests1.dmh 2023-03-16 14:02:49 -06:00
Ward Fisher
5ea154da96 Maintainer mode should only be turned on prior to minting a release. 2023-03-14 14:29:56 -06:00
Ward Fisher
b41127bec5 Bump version strings to reflect next development version. 2023-03-13 15:43:44 -06:00
Ward Fisher
a55680d1c4 Bumped SO version. 2023-03-13 15:40:12 -06:00