Commit Graph

459 Commits

Author SHA1 Message Date
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
ad592448df merged master 2018-08-29 06:32:28 -06:00
Ed Hartnett
5eb0d19227 merged master 2018-08-28 10:03:49 -06:00
Ward Fisher
5f29fe5eba Merge branch 'configure_error_out' of https://github.com/wkliao/netcdf-c into combined-pr.wif 2018-08-27 13:21:23 -06: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
8847c843fb further cleanup for benchmark builds 2018-08-24 12:48:42 -06:00
Ward Fisher
b5db03595e
Merge branch 'master' into check_pnetcdf_version 2018-08-24 11:26:30 -06:00
Ed Hartnett
0feeba691e removed enum test file from configure because it is not being used 2018-08-21 07:24:43 -06:00
Ed Hartnett
f77350c66d testing error for HDF5 file with circular groups 2018-08-20 09:26:50 -06:00
Ed Hartnett
0514a64207 fixed comment 2018-08-18 04:17:24 -06:00
Ed Hartnett
99c758c649 cleaned up configure.ac, fixed parallel test warning 2018-08-16 11:43:01 -06:00
Ed Hartnett
1b318a01fb getting automake build working 2018-08-16 10:55:11 -06:00
Ed Hartnett
afb7e5ab43 set mpiexec from configure 2018-08-16 07:23:41 -06:00
Wei-keng Liao
0a5d93bdaa check PnetCDF version at compile time 2018-07-27 12:18:37 -05:00
Wei-keng Liao
9d4fa6f542
Merge branch 'master' into configure_error_out 2018-07-26 01:40:53 -05:00
Wei-keng Liao
5a06155f88
Merge branch 'master' into relax_coord_bound 2018-07-26 01:39:59 -05: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
Wei-keng Liao
c8f3a647b6 add NC_RELAX_COORD_BOUND to netcdf_meta.h.in 2018-07-13 16:32:43 -05:00
Dennis Heimbigner
bd96509735 Doxygen is apparently buggy when trying to combine a markdown
file with @internal. The equivalent can be faked using
the Doxygen ENABLED_SECTIONS mechanism. See docs/testserver.dox
to see how this is done. So I make --enable-internal-docs
also set ENABLED_SECTIONS = INTERNAL and then used it
in docs/testserver.dox to decide if it needs to be included.
2018-07-01 21:56:59 -06:00
Wei-keng Liao
26f1d9137c revise #1033 and emulate CMAKE OPTION to use 3rd option AUTO 2018-07-01 19:42:03 -05:00
Ward Fisher
68fb79daea
Merge branch 'master' into enable-cdf5 2018-06-30 10:51:40 -06:00
Wei-keng Liao
f95d3e3325 replace USE_CDF5 with ENABLE_CDF5 2018-06-29 21:17:07 -05:00
Ward Fisher
246b56dedd
Revert "fix cdf5 configure option" 2018-06-29 14:23:40 -06:00
Wei-keng Liao
5d16b2ddcc update check message for --disable-cdf5 2018-06-28 09:49:21 -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
2ca8526278 merged master 2018-06-14 16:57:38 -06:00
Ed Hartnett
c172acab98 more magic numbers 2018-06-06 12:54:03 -06:00
Ed Hartnett
d556dcb2c9 udf1 stuff 2018-06-03 06:28:55 -06:00
Ed Hartnett
01d1364331 user defined formats working 2018-06-03 06:14:23 -06:00
Ed Hartnett
0f0cd5085a configure options for user-defined formats 2018-06-02 07:13:08 -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
c06ec6aa48
Merge branch 'master' into ejh_logging 2018-05-14 17:17:36 -06:00
Ed Hartnett
ebc6f1fd86 change to trigger CI 2018-05-13 08:38:21 -06:00
Ed Hartnett
60f7732142 cleaned up handling of classic only builds 2018-05-13 06:35:19 -06:00
Ed Hartnett
82c80c8c6c fixed issue building without nc_set_log_level 2018-05-12 11:46:04 -06:00
Ed Hartnett
27a74dee54 now always define nc_set_log_level unless user disables 2018-05-12 11:27:11 -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
c402b79ed8 merged changes from master 2018-05-08 12:13:03 -06:00
Ed Hartnett
5526ca65d1 created libhdf5, moved some files 2018-05-08 11:58:01 -06:00
Dennis Heimbigner
9aa1e9a14e master merge 2018-05-03 21:02:12 -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
Dennis Heimbigner
ff212442f1 merge master and conflict resolve 2018-04-26 14:22:01 -06:00
Dennis Heimbigner
0a44d9ae3a Merge branch 'master' into inmemory.dmh 2018-04-23 11:30:14 -06:00
Dennis Heimbigner
d3b309722e re: gh issue https://github.com/Unidata/netcdf-c/issues/911
I took Ed's advice and moved the plugin stuff to its own
top-level directory. This is an attempt to solve the problem of
copying files that we have experienced. In any case, it will
serve as a place to stick additional plugins.
2018-04-21 20:10:47 -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
Dennis Heimbigner
4739cd3225 Master merge and conflict resolution 2018-04-12 21:51:17 -06:00
Ward Fisher
e2e2c2117f
Merge branch 'master' into index.dmh 2018-04-02 18:13:34 -06:00
Ed Hartnett
bf3757c2d6
Merge branch 'master' into ejh_valgrind_3 2018-03-30 18:48:37 -06:00
Ed Hartnett
4652d9c3df fixed spaces 2018-03-28 18:04:24 -06:00
Ed Hartnett
af79dfa14d new method of using valgrind 2018-03-28 13:54:05 -06:00
Ward Fisher
36c4b7947d Merge branch 'master' into newhash1.dmh 2018-03-20 11:20:14 -06:00
Dennis Heimbigner
cc136cad08 Add a configurable "test case" that will create
and then open a file with a lot of metadata.
The test is configurable to determine the parameters
for the created metadata.
2018-03-17 16:25:13 -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
17f7a76356 moved HDF4 tests 2018-03-05 03:45:18 -07:00
Ward Fisher
c359a0e96a
Merge branch 'master' into newhash1.dmh 2018-03-04 22:40:51 -07:00
Ward Fisher
faad52041f Merge branch 'ejh_valgrind_removal_unidata_again' of https://github.com/NetCDF-World-Domination-Council/netcdf-c into pr-aggregation2.wif 2018-03-02 14:22:42 -07:00
Dennis Heimbigner
618f786053 Merge branch 'master' into inmemory.dmh 2018-02-28 10:46:02 -07:00
Ward Fisher
1f6264273e
Merge branch 'master' into newhash1.dmh 2018-02-27 12:15:06 -07:00
Ed Hartnett
45329862a8 removed valgrind stuff 2018-02-27 08:36:12 -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
Ward Fisher
43b9c6302c Fix in support of https://github.com/Unidata/netcdf-c/issues/881 2018-02-26 12:56:10 -07:00
Dennis Heimbigner
ccc70d640b re: esupport MQO-415619
and https://github.com/Unidata/netcdf-c/issues/708

Expand the NC_INMEMORY capabilities to support writing and accessing
the final modified memory.

Three new functions have been added:
nc_open_memio, nc_create_mem, and nc_close_memio.

The following new capabilities were added.
1. nc_open_memio() allows the NC_WRITE mode flag
   so a chunk of memory can be passed in and be modified
2. nc_create_mem() allows the NC_INMEMORY flag to be set
   to cause the created file to be kept in memory.
3. nc_close_mem() allows the final in-memory contents to be
   retrieved at the time the file is closed.
4. A special flag, NC_MEMIO_LOCK, is provided to ensure that
   the provided memory will not be freed or reallocated.

Note the following.
1. If nc_open_memio() is called with NC_WRITE, and NC_MEMIO_LOCK is not set,
   then the netcdf-c library will take control of the incoming memory.
   This means that the original memory block should not be freed
   but the block returned by nc_close_mem() must be freed.
2. If nc_open_memio() is called with NC_WRITE, and NC_MEMIO_LOCK is set,
   then modifications to the original memory may fail if the space available
   is insufficient.

Documentation is provided in the file docs/inmemory.md.
A test case is provided: nc_test/tst_inmemory.c driven by
nc_test/run_inmemory.sh

WARNING: changes were made to the dispatch table for
the close entry. From int (*close)(int) to int (*close)(int,void*).
2018-02-25 21:45:31 -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
40805e5dfa
Merge branch 'master' into ejh_hdf4_dispatch_unidata2 2018-02-16 13:02:05 -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
Ed Hartnett
111cef3891 disable HDF4 if netCDF-4 is not enabled 2018-02-08 11:35:27 -07:00
Ed Hartnett
2358d4a910 moved HDF4 to its own dispatch layer 2018-02-08 06:20:58 -07:00
Ward Fisher
b268f268bd Merge branch 'ejh_dims_unidata' of https://github.com/NetCDF-World-Domination-Council/netcdf-c into ejh_batch 2018-02-05 11:43:41 -07:00
Wei-keng Liao
be871248b9 disable CDF-5 feature when size_t is of size 4 bytes 2018-02-03 00:05:14 -06:00
Ward Fisher
f428660b69 Corrected typo in libnetcdf.settings.in when using autoconf. 2018-02-02 20:31:45 -07:00
Ward Fisher
c1d54b0213 Added check for genlib.h 2018-02-02 20:57:55 -06:00
Ward Fisher
8487a0a954
Merge branch 'master' into cdf5_var_len 2018-01-25 16:30:58 -07:00
Ward Fisher
7df45badce Added ERANGE_FILL information to netcdf_meta.h 2018-01-25 12:46:46 -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
Wei-keng Liao
d0c2015ced fix tst_converts.c when enable-erange-fill is set 2018-01-20 15:44:04 -06: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
Ed Hartnett
46d3bca8f4 removed non-working BUILD_DLL target 2017-11-30 05:40:17 -07:00
Ed Hartnett
4f983e5803 autotools cleanup 2017-11-30 05:29:22 -07:00
Dennis Heimbigner
4db4393e69 Begin changing over to use strlcat instead of strncat because
strlcat provides better protection against buffer overflows.

Code is taken from the FreeBSD project source code. Specifically:
https://github.com/freebsd/freebsd/blob/master/lib/libc/string/strlcat.c
License appears to be acceptable, but needs to be checked by e.g. Debian.

Step 1:
1. Add to netcdf-c/include/ncconfigure.h to use our version
   if not already available as determined by HAVE_STRLCAT in config.h.
2. Add the strlcat code to libdispatch/dstring.c
3. Turns out that strlcat was already defined in several places.
   So remove it from:
	ncgen3/genlib.c
	ncdump/dumplib.c
3. Define strlcat extern definition in ncconfigure.h.
4. Modify following directories to use strlcat:
	libdap2 libdap4 ncdap_test dap4_test
   Will do others in subsequent steps.
2017-11-23 10:55:24 -07:00
Ward Fisher
7d8f58a752
Merge branch 'master' into ejh_ncdump_3 2017-11-21 15:54:29 -07:00
Ward Fisher
2341f9f2b4 Updated release notes 2017-11-21 12:49:14 -07:00
Ward Fisher
a07eddd0e4 More wiring in of test. [ci skip] 2017-11-20 15:58:39 -07:00
Ed Hartnett
21053f5c49 clean up and removal of extra_tests 2017-11-17 15:35:14 -07:00
Ed Hartnett
a2c1aea044 merging documentation fixes 2017-11-14 11:48:27 -07:00
Ward Fisher
16d6f94f30 Merge branch 'master' into filters.dmh 2017-11-13 11:15:02 -07:00
Ed Hartnett
bd15ad06cf set DOXYGEN_SERVER_BASED_SEARCH in configure.ac 2017-11-13 06:37:07 -07:00
Ed Hartnett
b9911d6e6f took out most uses of EXTRA_TESTS, returned it to disabled by default 2017-11-08 13:25:23 -07:00
Ward Fisher
bb2505cf4e
Merge branch 'master' into newrc.dmh 2017-11-03 14:57:27 -06:00
Ward Fisher
2425d6610e Merge branch 'ejh_configure_fix' of https://github.com/NetCDF-World-Domination-Council/netcdf-c into ejh_even_more_merges 2017-10-31 12:54:58 -06:00
Dennis Heimbigner
2d77e6451b Master merge 2017-10-28 14:06:39 -06:00