Commit Graph

932 Commits

Author SHA1 Message Date
Dennis Heimbigner
7a44ae9184 Unify definition of NC_DISPATCH_VERSION
re: Issue

The netcdf dispatch table version was defined in several places.
Modify to only require defining it in CMakeLists.txt and configure.ac.

Fix entailed the following changes:
* Up the NC_DISPATCH_VERSION from 2 to 3 in configure.ac and CMakeLists.txt
* Create include/netcdf_dispatch.h.in and use it to configure include/netcdf_dispatch.h
* For CMAKE, make it search CMAKE_CURRENT_BINARY_DIR so code can locate the configured netcdf_dispatch.h
* Add entry to config.h.cmake.in for NC_DISPATCH_VERSION
* Move NCerror from include/ncdispatch.h to libdap2/nccomon.h
* Fix an API problem re nchttp.h
* Fix a conversion warning in libdispatch/dinfermodel.c
2021-01-31 21:40:08 -07:00
Dennis Heimbigner
e7d5f24078 Add zip file support
The primary change is to support the use of a zip file as a
storage format. Simultaneously the .nz4 support is made obsolete

Use of zip requires the libzip support library, so a number of
changes to the build files (Makefile.am, CMakeLists.txt) are
necessary to locate and incorporate libzip.  The nczarr_tests
tests are also changed to add zip testing.

Other changes:
* Make sure distcheck leaves no files around.
* Add some functions to netcdf_aux to export some functions of libnetcdf.
* Add a new error NC_EFOUND as the complement of NC_EEMPTY.
* Add tracing support to nclog and use it in libnczarr.
* Modify the zmap interface to support the writeonce semantics of zip.
* Create a new s3util.c to support a variety of S3 auxilliary functions.
* EXTERNL'ize a number of functions so they can be used in s3util.
* Add support for the S3 ListObjects CommonPrefixes mechanism
  to improve search.
* Add experimental support for running nczarr X s3 tests against
  the actual Amazon S3 cloud.
2021-01-28 20:11:01 -07:00
Ward Fisher
52011297f3
Merge branch 'master' into fix-hdf5-zlib-check 2021-01-26 11:47:52 -07:00
Dan Ibanez
9ad3e49371 more missing includes for MPI without wrapper 2021-01-19 10:33:08 -07:00
Scot Breitenfeld
a464bea84b removed the check for H5Pset_libver_bounds (HAVE_H5PSET_LIBVER_BOUNDS) since API
function was introduced in 1.8.0 (and some tests used  H5Pset_libver_bounds without
checking HAVE_H5PSET_LIBVER_BOUNDS.
2021-01-11 16:36:23 -06:00
Dennis Heimbigner
2ce6b0b5c8 Fix CMake bug 2020-12-30 13:30:12 -07:00
Greg Sjaardema
29d37adc3d
Fix detection and use of SZIP library
Potential fix for #1915
2020-12-21 08:25:37 -07:00
Greg Sjaardema
143c191898
Fix CMake build so netcdf_meta.h has correct form
The `NC_HAS_MULTIFILTERS` line in `netcdf_meta.h` was not of the correct form  -- showed as
```
#define NC_HAS_MULTIFILTERS
```
Instead of the better form:
```
#define NC_HAS_MULTIFILTERS 0  (or 1 if enabled)
```
2020-12-17 16:13:39 -07:00
Dennis Heimbigner
d2316f866c Additional Fixes to NCZarr
Primary Fixes:
* Add a whole variable optimization -- used in the rare case that nc_get/put_vara covers the whole of a variable and the variable has a single chunk.
* Fix chunking error when stride causes whole chunks to be skipped.
* Fix some memory leaks
* Add test cases
* Add one performance test to nczarr_test/. This uses the timer utils from unit_test: timer_utils.[ch].
* Move ncdumpchunks utility from ncdump to nczarr_test

Misc. Other Changes:
* Make check for aws libraries conditional on --enable-nczarr-s3
* Remove all but one bm tests from nczarr_test until they are working.
* Remove another dependency on HDF5 from supposedly non-HDF5 specific code; specifically hdf5_log_hdf5.
* Make the BAIL2 macro be hdf5 specific and replace elsewhere with an HDF5 independent equivalent.
* Move hdf5cache.c to libsrc4/nc4cache.c because it is used by nczarr.
* Modify unit_tests so that some of them are run even if using Windows.
* Misc. small bug fixes and refactors and memory leaks.
* Rename some conflicting tests for cmake.
* Attempted to make nc_perf work with cmake and failed.
2020-12-16 20:48:02 -07:00
Ward Fisher
66a2cd371a More tweaking. 2020-12-07 14:45:14 -07:00
Ward Fisher
6fafa6612c Merge remote-tracking branch 'origin/gh1739.wif' into gh1740.wif 2020-12-07 12:49:28 -07:00
Dennis Heimbigner
90fd1406bc Make use of clock_gettime be conditional.
Re: GH Issue https://github.com/Unidata/netcdf-c/issues/1900

Apparently the clock_gettime() function is not always available.
It is used in unit_test/tst_exhash.c and unit_test/tst_xcache.c.

To solve this, a number of things were changed:
* Move the timing code to a new file unit_tests/timer_utils.[ch]
* Modify the timing code to choose one of several timing methods
depending on availability. The prioritized order is as follows:
    1. If Windows, use the QueryPerformanceCounter mechanism else
    2. Use clock_gettime if available else
    3. Use gettimeofday if available else
    4. Use getrusage if available

Note that the resolution of 3 and 4 is less than 1 or 2.

Misc. Other Changes:
* Move the test in CMakeLists.txt that disables unit tests for WIN32 to unit_test/CMakeLists.txt since some unit tests actually work under Visual Studio.
* Fix some of the unit tests to work under visual studio
* Fix problem with using remove() in zmap_nzf.c
* Remove some warning about use of EXTERNL
2020-12-06 18:19:53 -07:00
Dennis Heimbigner
c25ebd7787 Fix a number of CMake problems 2020-11-19 22:24:13 -07:00
Dennis Heimbigner
eb3d9eb0c9 Provide a Number of fixes/improvements to NCZarr
Primary changes:
* Add an improved cache system to speed up performance.
* Fix NCZarr to properly handle scalar variables.

Misc. Related Changes:
* Added unit tests for extendible hash and for the generic cache.
* Add config parameter to set size of the NCZarr cache.
* Add initial performance tests but leave them unused.
* Add CRC64 support.
* Move location of ncdumpchunks utility from /ncgen to /ncdump.
* Refactor auth support.

Misc. Unrelated Changes:
* More cleanup of the S3 support
* Add support for S3 authentication in .rc files: HTTP.S3.ACCESSID and HTTP.S3.SECRETKEY.
* Remove the hashkey from the struct OBJHDR since it is never used.
2020-11-19 17:01:04 -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
f3218a2e2c Use the built-in HDF5 byte-range reader, if available.
re: Issue https://github.com/Unidata/netcdf-c/issues/1848

The existing Virtual File Driver built to support byte-range
read-only file access is quite old. It turns out to be extremely
slow (reason unknown at the moment).

Starting with HDF5 1.10.6, the HDF5 library has its own version
of such a file driver. The HDF5 developers have better knowledge
about building such a driver and what incantations are needed to
get good performance.

This PR modifies the byte-range code in hdf5open.c so
that if the HDF5 file driver is available, then it is used
in preference to the one written by the Netcdf group.

Misc. Other Changes:

1. Moved all of nc4print code to ncdump to keep appveyor quiet.
2020-09-24 14:33:58 -06:00
Ward Fisher
85621dd06f Fixe szlib write status message for cmake-based builds. 2020-09-15 15:00:02 -06:00
Ward Fisher
a89e1f73b8 Merge branch 'ncgenchunks.dmh' of https://github.com/DennisHeimbigner/netcdf-c into master 2020-09-09 10:24:33 -06: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
616812f204
Merge branch 'master' into nczarr-update1.dmh 2020-08-14 13:03:24 -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
Magnus Ulimoen
12d86675ef H5Znoop1.c copied to BINARY_DIR instead of SOURCE_DIR 2020-08-12 17:03:33 +02:00
Magnus Ulimoen
9d10e605c2 Move generated file to BINARY_DIR 2020-08-12 16:55:14 +02:00
Magnus Ulimoen
a3f2c5847f Configure netcdf_meta.h directly to BINARY_DIR 2020-08-12 16:14:23 +02:00
Magnus Ulimoen
8f1fc8a73c Generate m4 files out of tree 2020-08-12 16:14:23 +02:00
Dennis Heimbigner
70c873cd91 Merge branch 'nczarr-update1.dmh' of https://github.com/DennisHeimbigner/netcdf-c into nczarr-update1.dmh 2020-08-04 17:31:39 -06:00
Dennis Heimbigner
6074c8a02d Fix items in netcdf_meta.h 2020-08-04 17:31:24 -06:00
Dennis Heimbigner
a905c886d1
Merge branch 'master' into nczarr-update1.dmh 2020-07-27 19:17:57 -06:00
Edward Hartnett
088528987f fixed dispatch version number in CMakeLists.txt 2020-07-15 06:58:16 -06:00
Dennis Heimbigner
b3ec7140e1 Move closer to getting S3 support work with CMake under Visual
Studio. The code will build and all the tests will run except for the
S3 tests in nczarr_test.
2020-07-14 19:24:20 -06:00
Dennis Heimbigner
d538cf38c2 Fix nczarr-experimental to better support CMake and find AWS libraries
The primary fix is to improve CMake build support.
Specific changes include:
* CMake: Provide a better soln to locating the AWS SDK
  libraries; the new way is the preferred method as described in
  the aws-cpp-sdk documentation.
* CMake (and Automake): allow -DENABLE_S3_SDK (default off) to suppress
  looking for AWS libraries.
* CMake: add the complete set of nczarr tests
* CMake: add EXTERNL as needed to various .h files.
* Improve support for windows drive letters in paths.
* Add nczarr and s3 flags to nc-config
* For VisualStudio X nczarr, cleanup the NAN+INFINITY handling
* Convert _MSC_VER -> _WIN32 and vice versa as needed
* NCZarr - support multiple platform paths including windows, cygwin.
  mingw, etc.
* NCZarr - sort the test outputs because different platforms
  produce directory contents in different orders.

One big change concerns netcdf-c/CMakeLists.txt and netcdf-c/configure.ac.
In the current versions, it was the case that --disable-hdf5
disabled netcdf-4 (libsrc4). With nczarr, this can no longer
be the case because nczarr requires libsrc4 even if libhdf5
is disabled. So, I modified the above files to move the
format options (HDF5, NCZarr, HDF4, etc) to a single place
near the front of the files. Now it is the case that:
* Enabling any of the formats that require libsrc4
  also does an implicit --enable-netcdf4.
* --disable-netcdf4 | --disable-netcdf-4 now becomes
  and alias for --disable-hdf5.

There are probably some bugs in this change in terms of
dependencies between format options.

Problems:
* CMake S3 support is still not working for Visual Studio
* A recent issue points out that there is work to do on handling
  UTF8 filenames, but that will be addressed in a separate fix.

Notes:
* Consider converting all of our includes/.h files to use EXTERNL
2020-07-12 12:21:56 -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
65414eeaa4 Fix some protocol differences between netcdf-c and the Hyrax server.
re: Partly addresses issue https://github.com/Unidata/netcdf-c/issues/1712.

1. Turn on Hyrax Hack to accept Hyrax style attribute containers.
2. Support Url type as alias for String.
3. Accept the special attribute, "__DAP4_Checksum_CRC32",
   to control per-variable checksums.
4. Make _DAP4_xxx attributes be reserved and only accessible
   by name (ala _SuperBlock attribute).
5. Fix handling of checksums. There is a hack in the code
   that uses an extra flag in the chunk header to indicate
   that all variables have checksums. This violates the spec
   and will be removed once it is possible to regenerate the
   test cases.

Note that checksumming with the Hyrax test server has not
been tested. This, along with some other probable inconsistencies,
needs fixing when OPeNDAP and Unidata can agree on the proper
specification. Testing will be included.
2020-05-30 17:36:25 -06:00
Ward Fisher
31712192b2 More m4 fenceposting. 2020-05-26 16:09:10 -06:00
Ward Fisher
5961d6dc37 Added a check for m4 and throw an error if m4 isn't on the path and the generated file isn't present (as it would be in a point release). In support of https://github.com/Unidata/netcdf-c/issues/1739 2020-05-26 14:46:32 -06:00
Dennis Heimbigner
dc51d436f6 master merge update 2020-05-20 10:23:47 -06:00
Antonio Valentino
1fbe1afb85 Fix HDF5_ZLIB check 2020-05-20 16:02:10 +02:00
Ward Fisher
c2ea69df23
Merge pull request #1732 from DennisHeimbigner/vsfix.dmh
Fix undefined references when using Visual Studio
2020-05-19 16:21:04 -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
Peter Hill
e1ef7a958c Fix wrong header include in testing HDF5 for zlib 2020-05-16 12:45:13 +01:00
Dennis Heimbigner
a9cede7647 handle missing H5Dread_chunks 2020-05-14 12:59:00 -06:00
Ward Fisher
fc1d75f842
Merge pull request #1721 from gsjaardema/patch-39
Different method of setting Parallel Filters variables
2020-05-13 15:05:34 -06:00
Ward Fisher
9f6981bc6b
Merge pull request #1719 from DennisHeimbigner/filterrepeat.dmh
Allow redefinition of variable filters
2020-05-12 16:03:51 -06:00
Greg Sjaardema
485810262d
Fix CMake generation of netcdf_meta.h
These changes seem to be correct for the generation of `netcdf_meta.h` in a CMake build.  I think this addresses #1723 

There is still an issue with the libnetcdf.settings
2020-05-11 16:53:30 -06:00
Greg Sjaardema
8d7d5ac9e5
Different method of setting Parallel Filters variables
The current method of setting the `HDF5_HAS_PAR_FILTERS` and `HAS_PAR_FILTERS` variables is done purely based on the `HDF5_VERSION` and that variable is only set inside the if block which finds the HDF5 library based on CMake package files.  If the user specifies the explicit location of the HDF5 library and include files (for example, via:
```
         -DHDF5_C_LIBRARY:PATH=${INSTALL_PATH}/lib/libhdf5.${LD_EXT} \
         -DHDF5_HL_LIBRARY:PATH=${INSTALL_PATH}/lib/libhdf5_hl.${LD_EXT} \
         -DHDF5_INCLUDE_DIR:PATH=${INSTALL_PATH}/include
```
Then, the code path which determines whether the par filters variables is set is not run.  However, later on in the file, there is another check for parallel filter support (near line 759):
```
  # Check to see if this is hdf5-1.10.3 or later.
  CHECK_LIBRARY_EXISTS(${HDF5_C_LIBRARY_hdf5} H5Dread_chunk "" HDF5_SUPPORTS_PAR_FILTERS)
```

This PR moves the code that sets the two other par filters variables down after this check and instead of setting their values based on the version, it bases it on the results of this test.

I'm not totally sure why there are three variables; it looks like the `HDF5_SUPPORTS_PAR_FILTERS` and `HDF5_HAS_PAR_FILTERS` could be combined.  I think the `HAS_PAR_FILTERS` is a string which is used to show the results of the configuration and the other two are booleans.

The new check should work for both types of HDF5 installs (cmake-based and configure-based)
2020-05-11 11:11:24 -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
Dennis Heimbigner
313121a229 Use proper CURLOPT values for VERIFYHOST and VERIFYPEER
re: https://github.com/Unidata/netcdf-c/issues/1684
re: e-support VZL-904142

Two issues:
1. As of libcurl 7.66, the semantics of CURLOPT_SSL_VERIFYHOST
   changed so that the non-zero values affects certificate processing.
2. The current library was forcing the values of VERIFYPEER
   and VERIFYHOST to zero instead of leaving them to the default values.

Solution was first to leave the defaults in place for VERIFYPEER and VERIFYHOST
as long as they are not set in .ocrc/.dodsrc file.
Second, the value of HTTP.SSL.VERIFYPEER or HTTP.SSL.VERIFYHOST
as set in .ocrc/.dodrc is used to set the corresponding CURLOPT flags.
So for example, adding
> HTTP.SSL.VERIFYHOST=2
will set the value of CURLOPT_SSL_VERIFYHOST to 2, the default.
Using
> HTTP.SSL.VERIFYHOST=0
will set the value of CURLOPT_SSL_VERIFYHOST to 0, which disables it.
Similarly for VERIFYPEER.

Finally the semantics of HTTP.SSL.VALIDATE is now equivalent to
> HTTP.SSL.VERIFYPEER=1
> HTTP.SSL.VERIFYHOST=2
2020-04-10 13:42:27 -06:00
Ward Fisher
65a17399b9 Corrected parallel (mpi) testing on cmake builds. 2020-04-02 10:09:57 -06:00
Ward Fisher
b0e2d78ffa Corrected an issue with parallel filter test logic in cmake-based builds. 2020-04-01 17:08:24 -06:00
Ward Fisher
9d482c3f20 Added hard failure to script, modified cmake default. 2020-04-01 16:20:33 -06:00
Ward Fisher
d9e69bbb6b Updated soversion, bump to next development version in preparation of upstream merge back into master from 4.7.4 wellspring. 2020-03-26 11:31:43 -06:00
Greg Sjaardema
aca7b5cc2e
Better finding of the hdf5.h include path
The `FIND_PATH` function has a non-intuitive order in which is searches for include paths and the original form could find a system-installed version of HDF5 even though the developer specified an explicit path via `HDF5_INCLUDE_DIR`.  See https://cmake.org/cmake/help/latest/command/find_path.html for more information.

The form in this patch is the recommended method from that page for changing the default search order to find the explicitly specified path *first*


> The default search order is designed to be most-specific to least-specific for common use cases. Projects may override the order by simply calling the command multiple times and using the NO_* options:
```
find_path (<VAR> NAMES name PATHS paths... NO_DEFAULT_PATH)
find_path (<VAR> NAMES name)
```
> Once one of the calls succeeds the result variable will be set and stored in the cache so that no call will search again.
2020-03-05 14:44:38 -07:00
Dennis Heimbigner
b488c272d5 Fix conflicts with master 2020-02-27 14:06:45 -07: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
Ward Fisher
b01fbb058d
Merge pull request #1619 from NOAA-GSD/ejh_more_szip
fixed libnetcdf.settings output in cmake build wrt szip
2020-02-06 12:42:27 -07:00
Ward Fisher
1573fead56
Merge pull request #1606 from NOAA-GSD/ejh_no_zlib
detect if HDF5 was built without zlib, and error out of configure/cmake
2020-02-06 12:42:04 -07:00
Edward Hartnett
dfd496d3a5 fixed libnetcdf.settings output in cmake build wrt szip 2020-02-02 13:55:58 -07:00
Ward Fisher
e8c2d22ddd Cleaned up szlib status message in libnetcdf.settings. 2020-01-24 16:36:29 -07:00
Edward Hartnett
0672310411 fixed cmake check for zlib in HDF5 library 2020-01-23 06:51:44 -07:00
Edward Hartnett
adf2aa31e4 moved cmake detection of lack of zlib to be with other HDF5 stuff 2020-01-23 05:43:48 -07:00
Edward Hartnett
60cfe7782d detecting lack of zlib in cmake build 2020-01-23 05:40:44 -07:00
Edward Hartnett
0735a45178 switch cmake build to check for func H5Dread_chunk to detect 1.10.3 or later 2020-01-21 07:42:14 -07:00
Edward Hartnett
21a204c4e8 start using par filters in HDF5-1.10.3 2020-01-17 14:01:07 -07:00
Edward Hartnett
fb51e4475b adding NC_HAS_SZIP_WRITE and NC_HAS_PAR_FILTERS to cmake build 2020-01-17 10:30:14 -07:00
Ward Fisher
488b7e43d1
Merge pull request #1588 from oxelson/jsremotetest
changed/removed references to jetstream remotetest instance.
2020-01-13 16:07:17 -07:00
Ward Fisher
8771d0bdf4
Merge pull request #1582 from NOAA-GSD/ejh_parallel_zlib
Allow user to turn on zlib, shuffle, and/or fletcher32 filters with parallel I/O for HDF5-1.10.2+
2020-01-13 16:06:51 -07:00
Jennifer Oxelson
1b343324ea
Merge branch 'master' into jsremotetest 2020-01-10 17:35:34 -07:00
Ward Fisher
438119dd69
Merge pull request #1560 from NOAA-GSD/ejh_cache_docs
increase default cache size for netCDF-4/HDF5 files, also improve cache docs and add benchmarking program
2020-01-07 11:46:30 -07:00
Ward Fisher
20a8db5a7b
Merge pull request #1532 from NetCDF-World-Domination-Council/ejh_cmake_unit_tests
Adding rest of unit_tests to CMake build, but not running them on Windows
2020-01-07 11:44:56 -07:00
Jennifer Oxelson
feb7da82ec changed/removed references to jetstream remotetest instance. 2020-01-03 13:12:58 -07:00
Dennis Heimbigner
30b3401358 Forgot to create pingurl4.c for Cmake 2020-01-02 11:47:25 -07:00
Edward Hartnett
680e44f628 changed name of macro 2019-12-20 13:58:01 -07:00
Edward Hartnett
32a776badf getting parallel I/O with zlib working in cmake builds 2019-12-20 09:43:56 -07:00
James Sharpe
c5d1e4bdec Call find_package(MPI) to locate MPI paths and link to libdispatch if required 2019-12-18 16:48:40 +00:00
Edward Hartnett
4a5ae05dbf cleanup of RELAX_COORD_BOUND in cmake build 2019-11-26 06:59:03 -07:00
Edward Hartnett
8c648b5a2d changed cmake build to only allow relaxed coord builds 2019-11-26 05:40:03 -07:00
Edward Hartnett
a4465da974 new cache default in cmake build 2019-11-25 17:23:07 -07:00
Ward Fisher
dac41651ee Merge branch 'feature/cmake-targets' of https://github.com/kprussing/netcdf-c into v4.7.3-wellspring.wif 2019-11-19 14:12:41 -07:00
Keith F. Prussing
808803ceeb Add namespace for CMake targets
The usual convention with modern CMake is to namespace the targets.
This gives the netCDF namespace to the package.
2019-11-19 14:45:21 -05:00
Keith F. Prussing
adf2f4d098 Add include directories as netcdf property
Modern CMake tracks the properties of targets so that down stream
libraries do not have to worry about include directories.  However, the
include directories must be added to the target and not just at the
directory level.
2019-11-19 14:39:46 -05:00
Ward Fisher
e4efdd4cfb Bumped version to next development version. 2019-11-18 14:35:01 -07:00
Ward Fisher
a268e6d69f Ctest security stance. 2019-11-18 12:07:01 -07:00
Ward Fisher
7cbbc32dad Adding new security stance to cdash instance. 2019-11-18 10:58:44 -07:00
edwardhartnett
14f2b50f2f turned off unit tests for windows 2019-11-16 07:20:45 -07:00
edwardhartnett
f6ace74afb merged master 2019-11-16 07:19:40 -07:00
edwardhartnett
c1989b738e fixed setting of NC_DISPATCH_VERSION in cmake build 2019-11-15 14:57:07 -07:00
edwardhartnett
7b2ddf2537 trying unit tests on windows 2019-11-15 14:22:34 -07:00
edwardhartnett
a0f984f997 added dispatch version to netcdf_meta.h and libnetcdf.settings 2019-11-15 10:06:46 -07:00
Turing Eret
84a293351e Changes to make it possible to nest this project inside of another CMake
project.
2019-11-07 14:00:53 -07:00
Ward Fisher
f8a588843d Preparing for 4.7.3 development pushed back upstream, forking off to 4.7.2 release branch. 2019-10-18 12:09:28 -06:00
John Buonagurio
bc2a3babf9 Enable HDF5 parallel support for MSVC; add MPI dependency. 2019-09-21 21:56:39 -04:00
Greg Sjaardema
56c0d5cf8a Spelling fixes 2019-09-18 08:03:01 -06:00
Ward Fisher
7aab16254a Bumped to next development version. 2019-08-26 13:07:51 -06:00
Ward Fisher
9a92201c94 Wiring unit test directory into cmake-based builds. 2019-08-21 14:50:09 -06:00
edwardhartnett
e123957618 removed commented lines refering to run_par_test2.sh, which does not exist 2019-08-16 04:42:57 -06:00
Ward Fisher
103e5a3ff5
Merge pull request #1385 from Unidata/mmapfix.dmh
Fix cmake wrt mmap
2019-05-02 11:09:12 -06:00
Ward Fisher
44fce0904e
Merge pull request #1387 from Unidata/fixffilter.dmh
Minor config.h changes to support filters in Fortran
2019-05-01 14:44:53 -06:00
Dennis Heimbigner
62e2b472b4 Minor config.h changes to support filters in Fortran 2019-04-29 16:36:08 -06:00
Ward Fisher
c86593aca3 Corrected cmake syntax, working with a list not a string. 2019-04-26 16:28:53 -06:00
Ward Fisher
dda48ced44 Corrected a case in CMake Syntax where an empty string would cause a failure. 2019-04-26 16:00:28 -06:00
Ward Fisher
88de6f0e1c Updated versions, Release Notes. 2019-04-25 15:40:04 -06:00
Dennis Heimbigner
c9d16d82d6 Fix cmake X mmap
supercede PR: https://github.com/Unidata/netcdf-c/pull/1384

Since we have an mmap user, undeprecate it and make sure
it works. Other changes:

* fix test cases to work with make -j
* fix exposed ncgen error.
2019-04-19 20:32:26 -06:00
Ward Fisher
832c90bb56 Merge branch 'master' into cleanup.wif 2019-04-02 10:44:51 -06:00
Ward Fisher
d0a46d0eed
Merge pull request #1371 from NetCDF-World-Domination-Council/ejh_move_perf
Move performance testing from nc_test4 to new directory nc_perf
2019-04-01 11:08:13 -06:00
Ward Fisher
3823307b9e Disable run_par_test2.sh.in template processing code temporarily. 2019-03-26 15:38:22 -06:00
Ward Fisher
7addb30afd
Merge pull request #1367 from jschueller/patch-1
Fix STRNG typo in CMakeList
2019-03-26 15:33:00 -06:00
Ed Hartnett
d4ab03ea23 merged upstream/master 2019-03-26 11:29:01 -06:00
Dennis Heimbigner
4026323383 Fix minor --ansi warnings in dinfermodel.c and bzlib.c
re:

Needed to provide centralized definitions of fileno and fdopen;
also need to #include sys/types.h
2019-03-22 15:16:47 -06:00
Ward Fisher
e2b31ffae4
Merge branch 'master' into byterange.dmh 2019-03-19 12:05:44 -06:00
Ed Hartnett
5c06d40006 attempting to get cmake build working with new nc_perf directory 2019-03-18 08:15:57 -06:00
Ed Hartnett
51b8ba10b4 attempting to get cmake build working with new nc_perf directory 2019-03-18 08:09:46 -06:00
Julien Schueller
5a5981989c
Fix STRNG typo in CMakeList 2019-03-17 09:09:16 +01:00
Ward Fisher
a4d18bdd66 Bumped SO version in line with http://www.gnu.org/software/libtool/manual/libtool.html#Libtool-versioning 2019-02-28 13:25:56 -07:00
Ward Fisher
eb9f6097d5 Bringing netcdf.pc generated by cmake in line with netcdf.pc generated by configure, in support of https://github.com/Unidata/netcdf-c/issues/gh1324 2019-02-27 14:36:42 -07:00
Ward Fisher
18c403aa02 Prepping for 4.6.3 release, bumping to subsequent version in dev branch. 2019-02-26 14:00:59 -07:00
Dennis Heimbigner
0c59e13bf7 Master merge, conflict resolution, cleanup 2019-02-24 16:54:13 -07:00
Dennis Heimbigner
45a8a265b8 master merge 2019-02-23 17:14:12 -07:00
Ward Fisher
d6c845370b Added fenceposting around H5free_memory, H5allocate_memory, H5resize_memory, as these were all introduced in hdf5 1.8.15. 2019-02-21 14:02:46 -07:00
Dennis Heimbigner
c59d5ce205 Fix handling of '/' characters in names in DAP2.
re: https://github.com/Unidata/thredds/issues/1224
[note that this is an issue in thredds, but the fix is in netcdf-c]

A thredds server can encode a netcdf-4 file into DAP2
by flattening names to include the containing group path,
where the group names are separated by '/'.

But the '/' is prohibited in netcdf names even if escaped
(a decision before my time).

So, if the netcdf-c/libdap2 code encounters a DAP2 name with '/'
characters, the '/' characters are converted to the string
%2f. Unfortunately, there is a glitch, namely that converting
the leading '/' produces a name that is still illegal. This PR
modifies the code to just drop the leading '/' character.
2019-02-14 20:25:40 -07:00
Ward Fisher
1fde39c8d7
Merge branch 'master' into byterange.dmh 2019-02-07 14:28:23 -07:00
Ward Fisher
b27c7d899d Merge branch 'master' into byterange.dmh 2019-01-25 14:50:23 -07:00
Ward Fisher
766d2acfc3 Update CmakeLists.txt in support of https://github.com/Unidata/netcdf-c/issues/1295 2019-01-25 11:26:26 -07:00
Ward Fisher
591b1fd131 Merge branch 'bugfix/debian-stable-default-compilation' of https://github.com/t-b/netcdf-c into pr-aggregation.wif 2019-01-23 15:10:15 -07:00
Ward Fisher
35d0815f82 Merge remote-tracking branch 'origin/gh1245.wif' into pr-aggregation.wif 2019-01-15 15:05:51 -07:00
Ward Fisher
440a9e2ca4
Merge branch 'master' into ansifix.dmh 2019-01-10 13:36:19 -07:00
Ward Fisher
f323a5fec9 Modified cmake configuration file in support of https://github.com/Unidata/netcdf-c/issues/1253 2019-01-08 16:37:33 -07:00
Thomas Braun
531df26af0 CMakeLists.txt: Fix compilation with default settings on debian stretch
Since 209c31d3 (Bringing config.h as generagted by cmake in line with config.h as generated by autotools., 2017-01-27)
we check that we can find the hdf5.h main include file.

But this file may reside in non-standard location so we have to search
in HDF5_INCLUDE_DIR as well.
2019-01-05 14:27:45 +01:00
Dennis Heimbigner
bf2746b8ea Provide byte-range reading of remote datasets
re: issue https://github.com/Unidata/netcdf-c/issues/1251

Assume that you have the URL to a remote dataset
which is a normal netcdf-3 or netcdf-4 file.

This PR allows the netcdf-c to read that dataset's
contents as a netcdf file using HTTP byte ranges
if the remote server supports byte-range access.

Originally, this PR was set up to access Amazon S3 objects,
but it can also access other remote datasets such as those
provided by a Thredds server via the HTTPServer access protocol.
It may also work for other kinds of servers.

Note that this is not intended as a true production
capability because, as is known, this kind of access to
can be quite slow. In addition, the byte-range IO drivers
do not currently do any sort of optimization or caching.

An additional goal here is to gain some experience with
the Amazon S3 REST protocol.

This architecture and its use documented in
the file docs/byterange.dox.

There are currently two test cases:

1. nc_test/tst_s3raw.c - this does a simple open, check format, close cycle
   for a remote netcdf-3 file and a remote netcdf-4 file.
2. nc_test/test_s3raw.sh - this uses ncdump to investigate some remote
   datasets.

This PR also incorporates significantly changed model inference code
(see the superceded PR https://github.com/Unidata/netcdf-c/pull/1259).

1. It centralizes the code that infers the dispatcher.
2. It adds support for byte-range URLs

Other changes:

1. NC_HDF5_finalize was not being properly called by nc_finalize().
2. Fix minor bug in ncgen3.l
3. fix memory leak in nc4info.c
4. add code to walk the .daprc triples and to replace protocol=
   fragment tag with a more general mode= tag.

Final Note:
Th inference code is still way too complicated. We need to move
to the validfile() model used by netcdf Java, where each
dispatcher is asked if it can process the file. This decentralizes
the inference code. This will be done after all the major new
dispatchers (PIO, Zarr, etc) have been implemented.
2019-01-01 18:27:36 -07:00
Ward Fisher
264dc38bf3 Fixed plugin compilation using MSVC in support of https://github.com/Unidata/netcdf-c/issues/1245 2018-12-18 13:26:49 -07:00
Dennis Heimbigner
735ae80928 merge master and fix conflicts 2018-12-12 11:47:54 -07:00
Ward Fisher
d135fb4200 Removed confounding text from a reference file, turned on filter testing by default in Cmake-based builds. 2018-12-07 14:44:47 -07:00
Dennis Heimbigner
1a7531392f Make the netcdf-c library compile with gcc -ansi.
Primary fixes to get -ansi to work.
1. Convert all '//' C++ style comments to /*...*/ or to use #if 0...#endif
2. It turns out that when -ansi is specified, then a number of
   functions no longer are defined in the header -- but they are still
   in the .so file.<br>
   The big example is strdup(). So, added code to include/ncconfig.h to define
   externs for those missing functions that occur in more than one place.
   These are enabled if !_WIN32 && __STDC__ == 1 (__STDC__ is supposed to
   be the equivalent compile time flag to -ansi). Note that this requires
   config.h (which references ncconfig.h) to be included in files where it is
   currently not included. Single uses will be only in the file that uses them.
3. Added mmap test for the MAP_ANONYMOUS flag to configure.ac. Apparently
   this is not always defined with -ansi.
4. fix some large integer constants in nc_test4/tst_atts3.c and nc_test4/tst_filterparser.c
   to avoid compiler complaints.
5. fix a double constant in nc_test4/tst_filterparser.c to avoid compiler complaints.

[Note I suspect #4 and #5 will be a problem on big-endian machines, but we have no way to test]

Misc. Changes:
1. convert more instances of _MSC_VER to _WIN32.
2. added some debugging code to include/nctestserver.h
3. added comment about libdispatch/drc.c always being compiled.
4. modify parser generation in ncgen to remove unneeded files.
2018-12-05 19:20:43 -07:00
Ward Fisher
ce78cf2d73
Merge branch 'master' into MT-for-MSVC-release 2018-11-15 15:49:05 -07:00
Greg Sjaardema
d18457a2d0
RPATH handling is not needed for archive library
If not building shared libraries, then the RPATH handling should not be specified.  Although ignored on some compilers, the CRAY / Intel compiler will error out when installing the NetCDF executables if the RPATH settings are enabled.
2018-11-06 10:11:57 -07:00
Ward Fisher
6eec91bc5f Merge branch 'leak1.dmh' into v4.6.2-release-branch.wif 2018-11-01 12:09:53 -06:00
Dennis Heimbigner
245961de00 re: github issues
https://github.com/Unidata/netcdf-c/issues/1168
    https://github.com/Unidata/netcdf-c/issues/1163
    https://github.com/Unidata/netcdf-c/issues/1162

This PR partially fixes memory leaks in the netcdf-c library,
in the ncdump utility, and in some test cases.

The netcdf-c library now runs memory clean with the assumption
that the --disable-utilities option is used. The primary remaining
problem is ncgen. Once that is fixed, I believe the netcdf-c library
will run memory clean with no limitations.

Notes
-----------
1. Memory checking was performed using gcc -fsanitize=address.
   Valgrind-based testing has yet to be performed.
2. The pnetcdf, hdf4, and examples code has not been tested.

Misc. Non-leak changes
1. Make tst_diskless2 only run when netcdf4 is enabled (issue 1162)
2. Fix CmakeLists.txt to turn off logging if ENABLE_NETCDF_4 is OFF
3. Isolated all my debug scripts into a single top-level directory
   called debug
4. Fix some USE_NETCDF4 dependencies in nc_test and nc_test4 Makefile.am
2018-10-30 20:48:12 -06:00
Ward Fisher
f5482d5f37 Recreating 4.6.2 release branch. 2018-10-22 16:52:07 -06:00
Ben Boeckel
005a1bf0b4 cmake: fix detection of the mmap function 2018-10-16 09:44:20 -04:00
Ben Boeckel
918cdf5155 cmake: remove duplicate check for fsync 2018-10-16 09:44:12 -04:00
Dennis Heimbigner
553de966d6 Add some visual studio bug fixes 2018-10-11 12:09:42 -06:00
Dennis Heimbigner
4636584d5b Revert/Improve nc_create + NC_DISKLESS behavior
re: https://github.com/Unidata/netcdf-c/issues/1154

Inadvertently, the behavior of NC_DISKLESS with nc_create() was
changed in release 4.6.1. Previously, the NC_WRITE flag needed
to be explicitly used with NC_DISKLESS in order to cause the
created file to be persisted to disk.

Additional analyis indicated that the current NC_DISKLESS
implementation was seriously flawed.

This PR attempts to clean up and regularize the situation with
respect to NC_DISKLESS control. One important aspect of diskless
operation is that there are two different notions of write.

1. The file is read-write vs read-only when using the netcdf API.
2. The file is persisted or not to disk at nc_close().

Previously, these two were conflated. The rules now are
as follows.

1. NC_DISKLESS + NC_WRITE means that the file is read/write using the netcdf API
2. NC_DISKLESS + NC_PERSIST means that the file is persisted to a disk file at nc_close.
3. NC_DISKLESS + NC_PERSIST + NC_WRITE means both 1 and 2.

The NC_PERSIST flag is new and takes over the obsolete NC_MPIPOSIX flag.
NC_MPIPOSIX is still defined, but is now an alias for the NC_MPIIO flag.

It is also now the case that for netcdf-4, NC_DISKLESS is independent
of NC_INMEMORY and in fact it is an error to specify both flags
simultaneously.

Finally, the MMAP code was fixed to use NC_PERSIST as well.
Also marked MMAP as deprecated.

Also added a test case to test various combinations of NC_DISKLESS,
NC_PERSIST, and NC_WRITE.

This PR affects a number of files and especially test cases
that used NC_DISKLESS.

Misc. Unrelated fixes
1. fixed some warnings in ncdump/dumplib.c
2018-10-10 13:32:17 -06:00
Dennis Heimbigner
a5a34f6aba
Merge branch 'master' into nc_mpiio_nc_mpiposix 2018-10-06 13:33:55 -06:00
Dennis Heimbigner
8072d1f6bb Modify DAP2 and DAP4 to optionally allow Fillvalue/Variable mismatch
re: issue https://github.com/Unidata/netcdf-c/issues/1151

Modify DAP2 and DAP4 code to handle case when _FillValue type is not
same as the parent variable type.

Specifically:
1. Define a parameter [fillmismatch] to allow this mismatch;
   default is to disallow.
2. If allowed, forcibly change the type of the _FillValue to match
   the parent variable.
3. If allowed Convert the values to match new type
4. Generate a log message
5. if not allowed, then fail

Implementing this required some changes to ncdap_test/dapcvt.c
Also added test cases.

Minor Unrelated Changes:
1. There were a number of warnings about e.g.
   assigning a const char* to a char*. Fix these
2. In nccopy.1, replace .NP with .IP "n"
   (re PR https://github.com/Unidata/netcdf-c/pull/1144)
3. fix minor error in ncdump/ocprint
2018-10-01 15:51:43 -06:00
Wei-keng Liao
0ed70756cc Ignore flags NC_MPIIO and NC_MPIPOSIX. 2018-09-22 20:22:34 -05:00
Wei-keng Liao
bc63c08f41 add a check for MPI_Info_f2c 2018-09-21 17:32:36 -05:00
Wei-keng Liao
5ed6c239e1 More replacement of "parallel-netcdf" with "PnetCDF". 2018-09-20 11:45:25 -05:00
Wei-keng Liao
48da78e133 Use PnetCDF instead of parallel-netcdf to avoid confusion with
parallel netcdf4. Also, update PnetCDF web page.
2018-09-17 17:18:48 -05:00
Ward Fisher
784d777bff Merge branch 'master' into provenance.dmh 2018-09-06 15:13:09 -06:00
Ed Hartnett
efe8e3e8e6
Merge branch 'master' into ejh_loop_cleanup_2 2018-09-06 07:49:18 -06:00
Ward Fisher
746cece75d For some reason, the check for H5free() was never added to CMakeLists.txt. This becomes an issue with newer compilers, as observed in Ubuntu 18.04 and HDF5 1.10.2. The issue isn't seen in HDF 1.8.20. 2018-09-05 14:42:51 -06:00
Ward Fisher
fbe0a18b1c
Merge branch 'master' into ejh_loop_cleanup_2 2018-09-05 11:22:55 -06:00
Ward Fisher
d0bb5ddde8 Merge remote-tracking branch 'origin/inmemory10.dmh' into combined-pr.wif 2018-09-04 13:39:34 -06:00
Ward Fisher
3c3119bed2 Merge remote-tracking branch 'origin/dapcurlopt.dmh' into combined-pr.wif 2018-09-04 12:50:55 -06:00
Dennis Heimbigner
d62a9e623c Fix the NC_INMEMORY code to work in all cases with HDF5 1.10.
re: github issue https://github.com/Unidata/netcdf-c/issues/1111

One of the less common use cases for the in-memory feature is
apparently failing with HDF5-1.10.x.  The fix is complicated and
requires significant changes to libhdf5/nc4memcb.c. The current
setup is detailed in the file docs/inmeminternal.dox.

Additionally, it was discovered that the program
nc_test/tst_inmemory.c, which is invoked by
nc_test/run_inmemory.sh, actually was failing because of the
above problem. But the failure is not detected since the script
does not return non-zero value.

Other Changes:
1. Fix nc_test_tst_inmemory to return errors correctly.
2. Make ncdap_tests/findtestserver.c and dap4_tests/findtestserver4.c
   be generated from ncdap_test/findtestserver.c.in.
3. Make LOG() print output to stderr instead of stdout to
   avoid contaminating e.g. ncdump output.
4. Modify the handling of NC_INMEMORY and NC_DISKLESS flags
   to properly handle that NC_DISKLESS => NC_INMEMORY. This
   affects a number of code pieces, especially memio.c.
2018-09-04 11:27:47 -06:00
Ward Fisher
ede7c5da60
Merge branch 'master' into provenance.dmh 2018-09-04 11:22:36 -06:00
Ed Hartnett
27281dfe4b
Merge branch 'master' into ejh_loop_cleanup_2 2018-08-28 17:32:40 -06:00
Ed Hartnett
5eb0d19227 merged master 2018-08-28 10:03:49 -06:00
Wei-keng Liao
ca0d2bef72 resolve a merge conflict 2018-08-27 17:57:07 -05:00
Wei-keng Liao
f88a34600e
Merge branch 'master' into default_format 2018-08-27 17:43:12 -05:00
Dennis Heimbigner
79e38de840 Add the ability to set some additional curlopt values
Add the ability to set some additional curlopt values via .daprc (aka .dodsrc).
This effects both DAP2 and DAP4 protocols.

Related issues:
[1] re: esupport: KOZ-821332
[2] re: github issue https://github.com/Unidata/netcdf4-python/issues/836
[3] re: github issue https://github.com/Unidata/netcdf-c/issues/1074

1. CURLOPT_BUFFERSIZE: Relevant to [1]. Allow user to set the read/write
buffersizes used by curl.
This is done by adding the following to .daprc (aka .dodsrc):
	HTTP.READ.BUFFERSIZE=n
where n is the buffersize in bytes. There is a built-in (to curl)
limit of 512k for this value.

2. CURLOPT_TCP_KEEPALIVE (and CURLOPT_TCP_KEEPIDLE and CURLOPT_TCP_KEEPINTVL):
Relevant (maybe) to [2] and [3]. Allow the user to turn on KEEPALIVE
This is done by adding the following to .daprc (aka .dodsrc):
	HTTP.KEEPALIVE=on|n/m
If the value is "on", then simply enable default KEEPALIVE. If the value
is n/m, then enable KEEPALIVE and set KEEPIDLE to n and KEEPINTVL to m.
2018-08-26 17:04:46 -06:00
Dennis Heimbigner
2ea1cf5f1b There was a request to extend the provenance information
stored in the _NCProperties attribute to allow two things:
1. capture of additional library dependencies (over and above
   hdf5)
2. Recognition of non-netcdf libraries that create netcdf-4 format
   files.

To this end, the _NCProperties format has been extended to be
and arbitrary set of key=value pairs separated by commas.
This new format has version = 2, and uses commas as the pair separator.
Thus the general form is:
    _NCProperties = "version=2,key1=value,key2=value2..." ;

This new version is accompanied by a new ./configure option of the form
    --with-ncproperties="key1=value1,key2=value2..."
that specifies pairs to add to the _NCProperties attribute for all
files created with that netcdf library.

At this point, what is missing is some programmatic way to
specify either all the pairs or additional pairs
to the _NCProperties attribute. Not sure of the best way
to do this.

Builders using non-netcdf libraries can specify
whatever they want in the key value pairs (as long
as the version=2 is specified first).

By convention, the primary library is expected to be the
the first pair after the leading version=2 pair, but this
is convention only and is neither required nor enforced.

Related changes:
1. Fixed the tests that check _NCProperties to properly operate with version=2.
2. When reading a version 1 _NCProperties attribute, convert it to look
   like a version 2 attribute.
2. Added some version 2 tests to ncdump/tst_fileinfo.c and
   ncdump/tst_fileinfo.sh

Misc Changes:
1. Fix minor problem in ncdap_test/testurl.sh where a parameter to
   buildurl needed to be quoted.
2. Minor fix to ncgen to swap switches -H and -h to be consistent
   with other utilities.
3. Document the -M flag in nccopy usage() and the nccopy man page.
4. Modify a test case to use the nccopy -M flag.
2018-08-25 21:44:41 -06:00
Ed Hartnett
33a47710b8 got par tests working in cmake build 2018-08-17 08:52:34 -06:00
Ed Hartnett
59a25093d9 added setting of mpiexec command to CMake build 2018-08-16 07:33:04 -06:00
Wei-keng Liao
4341e4f6c9 spell check 2018-07-28 16:10:07 -05:00
Wei-keng Liao
9d4fa6f542
Merge branch 'master' into configure_error_out 2018-07-26 01:40:53 -05:00
Ed Hartnett
ef7b525ce4 merged master 2018-07-23 09:45:39 -06:00
Jin-Whu
5bd160086b
Merge branch 'master' into MT-for-MSVC-release 2018-07-23 10:38:11 +08:00
Ward Fisher
b570d10e01
Merge branch 'master' into enable-cdf5 2018-07-17 11:26:02 -06:00
Wei-keng Liao
3141c1b2cc error out when conflicts with PnetCDF are detected 2018-07-16 14:42:37 -05:00
Ed Hartnett
9ac15aac46 attempting to fix ENABLE_SET_LOG_LEVEL problem with cmake build 2018-07-16 11:45:26 -06:00
Ed Hartnett
966fec740d attempting to fix ENABLE_SET_LOG_LEVEL problem with cmake build 2018-07-16 08:39:23 -06:00
Ed Hartnett
cdfa6abad8 attempting to fix ENABLE_SET_LOG_LEVEL problem with cmake build 2018-07-16 08:34:00 -06:00
Ed Hartnett
82d0302fa9 attempting to fix ENABLE_SET_LOG_LEVEL problem with cmake build 2018-07-16 06:39:15 -06:00
Ed Hartnett
987ce47f5e removed duplicate handling of logging 2018-07-16 06:24:57 -06:00
Ward Fisher
8d150a56b3 Merge remote-tracking branch 'origin/interndocs.dmh' into pr-aggregation.wif 2018-07-13 11:01:43 -06:00
Greg Sjaardema
ddabcda2c2 Test should be off by default 2018-07-11 13:40:37 -04:00
Greg Sjaardema
c3f63b6ffe Enable metadata_perf test in CMake build
Currently defaults to enabled, can change top-level
CMakeLists.txt file to change default to disabled
2018-07-11 13:40:31 -04:00
Wei-keng Liao
26f1d9137c revise #1033 and emulate CMAKE OPTION to use 3rd option AUTO 2018-07-01 19:42:03 -05:00
Dennis Heimbigner
c304b2075b
Merge branch 'master' into interndocs.dmh 2018-06-30 13:56:36 -06:00
Dennis Heimbigner
40013b72f6 The pr does some cleanup on the internal documentation
in the docs directory.
1. Add a new internal document -- testserver.dox -- to describe
   how to set up and maintain the dap test server.
2. It moves the internal documentation (internal.dox, indexing.dox,
   and testserver.dox) to later in the documentation table of contents.
3. Cleanup the formatting of the internal documents.
4. Cleanup some minor doxygen issues in other files.
2018-06-29 15:06:27 -06:00
Ward Fisher
246b56dedd
Revert "fix cdf5 configure option" 2018-06-29 14:23:40 -06:00
Wei-keng Liao
02dca6a541 add cmake -L option help string for ENABLE_CDF5 2018-06-28 13:17:08 -05:00
Wei-keng Liao
d122d53c78 fix cdf5 configure option 2018-06-28 02:26:42 -05:00
Dennis Heimbigner
1299a0fcee The Jetstream remote test server is now working.
So it now becomes the first default test server to try.
This also means that the dap4 remote testing is enabled.
The only issue to watch is to see if the jetstream-based
server can stay up for significant periods of time.
A uptimerobot (https://uptimerobot.com) has been set ups
to monitor this hourly, so we shall see.
2018-06-26 13:58:45 -06:00
Ed Hartnett
b9c0fd473d
Merge branch 'master' into ejh_logging 2018-05-17 04:26:28 -06:00
Ward Fisher
3f83cc4926 Merge branch 'master' into inmem2.dmh 2018-05-16 14:24:19 -06:00
Ed Hartnett
42d0bef7b2
Merge branch 'master' into ejh_logging 2018-05-16 01:51:42 -06:00
Ward Fisher
23abe014c0 Threads doesn't need to be required. 2018-05-15 12:19:33 -06:00
Ward Fisher
d54e133e8d Merge branch 'master' into appveyor.wif 2018-05-15 12:01:54 -06:00
Ed Hartnett
c06ec6aa48
Merge branch 'master' into ejh_logging 2018-05-14 17:17:36 -06:00
Ward Fisher
27ca221bdb Merge branch 'master' into appveyor.wif 2018-05-14 13:19:17 -06:00
Ed Hartnett
fac4bf61d6 fixed classic cmake builds without logging 2018-05-13 09:48:20 -06:00
Ed Hartnett
86fba34545 fixing cmake build 2018-05-12 13:40:38 -06:00
Ed Hartnett
82c80c8c6c fixed issue building without nc_set_log_level 2018-05-12 11:46:04 -06:00
Dennis Heimbigner
3c7ffcc6d1 Fix https://github.com/Unidata/netcdf-c/issues/963
Fix https://github.com/Unidata/netcdf-c/issues/962

1. remove the --disable-diskless option since it is no
   longer needed. Similarly for CMakeLists.txt.
2. Fixed nc4files.c where BAIL and return were mixed
   leading to situation where cleanup code was not
   being invoked. This probably occurs elsewhere,
   but I did not find any specifically.
2018-05-11 15:30:19 -06:00
Ed Hartnett
5526ca65d1 created libhdf5, moved some files 2018-05-08 11:58:01 -06:00
Ward Fisher
573cf80eb0
Merge branch 'master' into MT-for-MSVC-release 2018-05-04 14:55:18 -06:00
luz.paz
74fbacdb82 Misc. source comment typos
Some are user-facing. Found via `codespell` and through the downstream FreeCAD.
2018-04-26 23:04:01 -04:00
Ward Fisher
395841ee9b Added a cmake-based option to explicitly turn off shell script tests. 2018-04-26 16:27:20 -06:00
Ward Fisher
28ce3e4a8c Added fenceposts around bash scripts, excluding the bash.exe included with Windows 10 (for now) when searching to see if bash is available. 2018-04-26 14:38:56 -06:00
Ward Fisher
2ee4e80c2b Typo3. 2018-04-25 14:23:25 -06:00
Ward Fisher
545857ded0 Typo2. 2018-04-25 14:13:45 -06:00
Ward Fisher
569adf0981 Typo. 2018-04-25 14:10:56 -06:00
Ward Fisher
4048da1ba1 Added output from looking for m4 executable. 2018-04-25 14:02:10 -06:00
Ward Fisher
663f7706f1 Added threads package to cmake build. 2018-04-24 16:15:26 -06:00
XueyuanJin
90f463460d add CMAKE_C_FLAGS_RELEASE in specify_static_crt_flag 2018-04-24 20:14:11 +08:00
Dennis Heimbigner
3b0fb561d6 Make change work with cmake 2018-04-22 13:19:12 -06:00
Ward Fisher
1ff184d988 Enabled CDF5 support by default, in support of https://github.com/Unidata/netcdf-c/issues/931 2018-04-19 13:26:58 -06:00
Ward Fisher
308a840358
Merge branch 'master' into index.dmh 2018-03-26 17:06:19 -06:00
Ward Fisher
f460746a8b Silenced warning in CMakeLists.txt 2018-03-26 11:53:31 -06:00
Ward Fisher
36c4b7947d Merge branch 'master' into newhash1.dmh 2018-03-20 11:20:14 -06:00
Dennis Heimbigner
25f062528b This completes (for now) the refactoring of libsrc4.
The file docs/indexing.dox tries to provide design
information for the refactoring.

The primary change is to replace all walking of linked
lists with the use of the NCindex data structure.
Ncindex is a combination of a hash table (for name-based
lookup) and a vector (for walking the elements in the index).
Additionally, global vectors are added to NC_HDF5_FILE_INFO_T
to support direct mapping of an e.g. dimid to the NC_DIM_INFO_T
object. These global vectors exist for dimensions, types, and groups
because they have globally unique id numbers.

WARNING:
1. since libsrc4 and libsrchdf4 share code, there are also
   changes in libsrchdf4.
2. Any outstanding pull requests that change libsrc4 or libhdf4
   are likely to cause conflicts with this code.
3. The original reason for doing this was for performance improvements,
   but as noted elsewhere, this may not be significant because
   the meta-data read performance apparently is being dominated
   by the hdf5 library because we do bulk meta-data reading rather
   than lazy reading.
2018-03-16 11:46:18 -06:00
Ward Fisher
ede8f1b02e Bumping to post-4.6.1-release, for merge back into master. 2018-03-15 11:29:32 -06:00
Ed Hartnett
3e6661e1b1 fixed name 2018-03-05 04:22:15 -07:00
Ed Hartnett
17f7a76356 moved HDF4 tests 2018-03-05 03:45:18 -07:00
Dennis Heimbigner
f6a45b942e Merge branch 'master' into newhash1.dmh 2018-03-01 22:13:50 -07:00
Ward Fisher
3ccce81190 Accomodating special characters in path name. 2018-02-28 12:18:20 -07:00
Ward Fisher
1f6264273e
Merge branch 'master' into newhash1.dmh 2018-02-27 12:15:06 -07:00
Ward Fisher
cebe81a742 Corrected logic error in cmake. 2018-02-26 17:16:15 -07:00
Ward Fisher
18c47417f7 Updated ac, cmake based builds to require parallel functionality when parallel tests are requested. 2018-02-26 17:08:26 -07:00
Dennis Heimbigner
8cb1fc4cfe This is the second step in refactoring the libsrc4 code.
The first was branch newhash0.dmh.

As with newhash0.dmh, these changes should be transparent.
2018-02-24 20:36:24 -07:00
Ward Fisher
f9f27c5ab7
Merge branch 'master' into newhash0.dmh 2018-02-21 14:19:43 -07:00
Ward Fisher
40805e5dfa
Merge branch 'master' into ejh_hdf4_dispatch_unidata2 2018-02-16 13:02:05 -07:00
Ed Hartnett
13fcc67d90
Merge branch 'master' into ejh_hdf4_dispatch_unidata2 2018-02-15 13:25:11 -07:00
Ben Boeckel
b432a527c4 c: remove __CHAR_UNSIGNED__
In C, `char`, `signed char`, and `unsigned char` are three separate,
distinct types, so just because `char` happens to be signed does not
mean it is interchangeable with `signed char`.
2018-02-14 17:24:49 -05:00
Ben Boeckel
a7057925d6 configure: remove unused configure checks
These checks all control variables which are unused within the codebase.
2018-02-14 17:24:45 -05:00
Ben Boeckel
2c14d52c46 cmake: include modules by name
This allows for toolchains to override these modules.
2018-02-14 17:23:21 -05:00
Ward Fisher
30163bcd34 Fix syntax for NC_EXTRA_DEPS 2018-02-09 12:57:11 -07:00
Ward Fisher
d9e9e2bf52
Merge branch 'master' into newhash0.dmh 2018-02-09 11:46:18 -07:00
Ed Hartnett
392a12a7c2 attempting fix for cmake HDF4 build problem when netcdf-4 is not built 2018-02-09 08:26:58 -07:00
Ed Hartnett
2cbb4f6b64 attempting fix for cmake HDF4 build problem when netcdf-4 is not built 2018-02-09 07:44:40 -07:00
Dennis Heimbigner
727b613459 This is the initial step in moving to the new higher performance
(I hope) metadata mechanism. This mostly just adds new pieces of
code (e.g. nclistmap) and does some minor fixes.

It should be transparent to everything else.
The next set of changes will be the big step.
2018-02-08 19:53:40 -07:00
pedro-vicente
23b5e5bd8d changes to detect HDF5 HL, build with CRT and detect ZLIB in HDF5 2018-02-08 13:45:29 -05:00
Ed Hartnett
2358d4a910 moved HDF4 to its own dispatch layer 2018-02-08 06:20:58 -07:00
Ward Fisher
d02a905aa9 Updated typo. 2018-02-02 20:27:06 -07:00
Ward Fisher
c1d54b0213 Added check for genlib.h 2018-02-02 20:57:55 -06:00
Ward Fisher
27693ba4a3
Merge branch 'master' into nc3-per-var-fill-v2 2018-02-01 11:45:40 -07:00
Ward Fisher
6eb8dd3bfc Fixes in support of https://github.com/Unidata/netcdf-c/issues/805 2018-01-25 13:07:33 -07:00
Ward Fisher
8f6c1ed6c7 Preparing for 4.6.1 dev cycle. 2018-01-24 15:46:38 -07:00
Ward Fisher
d0339c8902 Merge branch 'pr-catchup' into v4.6.0-release-branch 2018-01-24 15:51:24 -06:00
Ward Fisher
d1296e5d9a
Merge branch 'master' into nc3-per-var-fill-v2 2018-01-23 17:36:14 -07:00
Ward Fisher
7192ac6a6f Turned off filter testing by default. 2018-01-23 18:27:14 -06:00
Wei-keng Liao
d0c2015ced fix tst_converts.c when enable-erange-fill is set 2018-01-20 15:44:04 -06:00
Dennis Heimbigner
991c4c6d16 Add some extra nccopy filter debug output 2018-01-19 12:06:02 -07:00
Ward Fisher
0f5fc7222b
Merge branch 'master' into plugins.dmh 2018-01-18 15:46:50 -07:00
Ward Fisher
8e01316980 Updated cdash on this branch. 2018-01-18 15:59:56 -06:00
Ward Fisher
b850482b8e Updated cdash dashboard location. 2018-01-18 10:50:24 -07:00
Dennis Heimbigner
99fccab359 1. Keep up to date by merging master
2. Fixed plugin building (nc_test4/hdf5plugins)
   to be done properly by cmake and automake.
4. Duplicated part of the nc_test4 filter test code
   in examples/C

An incomplete and untested set of hooks exist
for OS-X in nc_test4/findplugins.in. They need testing.
2018-01-16 11:00:09 -07:00
Ward Fisher
2281f3e133 Added cross-build check fix in support of https://github.com/Unidata/netcdf-c/issues/753 2018-01-02 14:05:52 -07:00