Commit Graph

20 Commits

Author SHA1 Message Date
edwardhartnett
94f1a89a40 final removal 2019-08-15 07:05:10 -06:00
edwardhartnett
2077729abc removed base_pe functions from dispatch table 2019-08-15 06:51:06 -06:00
edwardhartnett
170c5b0901 removed NC from open in dispatch table 2019-08-01 14:30:20 -06:00
Dennis Heimbigner
4c92fc3405 Remove netcdf-4 conditional on the dispatch table.
Partially address: https://github.com/Unidata/netcdf-c/issues/1056

Currently, some of the entries in the dispatch table
are conditional'd on USE_NETCDF4.

As a step in upgrading the dispatch table for use
with user-defined tables, we remove that conditional.
This means that all dispatch tables must implement the
netcdf-4 specific functions even if only to make them
return NC_ENOTNC4. To simplify this, a set of default
functions are defined in libdispatch/dnotnc4.c to provide this
behavior. The file libdispatch/dnotnc3.c is also relevant to
this.

The primary fix is to modify the various dispatch tables to
remove the conditional and use the functions in
libdispatch/dnotnc4.c as appropriate. In practice, all of the
existing tables are prepared to handle this, so the only
real change is to remove the conditionals.

Misc. Unrelated fixes
1. Fix some annoying warnings in ncvalidator.

Notes:
1. This has not been tested with either pnetcdf or hdf4 enabled.
   When those are enabled, it is possible that there are still
   some conditionals that need to be fixed.
2019-07-20 13:59:40 -06:00
Dennis Heimbigner
331a1f1c63 Centralize calls to curl_global_init and curl_global_cleanup
re: https://github.com/Unidata/netcdf-c/issues/1388

1. Centralize calls to curl_global_init and curl_global_cleanup
   to libdispatch/ddispatch.c
2. Make the above calls if options require curl: currently
   any of DAP2, DAP4, or byterange.
3. Side issue: Fix obscure bug in mmapio.c involving non-persistent mmap.
2019-05-03 13:22:54 -06:00
Dennis Heimbigner
6934aa2e8b Thread safety: step 1: cleanup
re: https://github.com/Unidata/netcdf-c/issues/1373 (partial)

* Mark some global constants be const to indicate to make them easier to track.
* Hide direct access to the ncrc_globalstate behind a function call.
* Convert dispatch tables to constants (except the user defined ones)
  This has some consequences in terms of function arguments needing to be marked
  as const also.
* Remove some no longer needed global fields
* Aggregate all the globals in nclog.c
* Uniformly replace nc_sizevector{0,1} with NC_coord_{zero,one}
* Uniformly replace nc_ptrdffvector1 with NC_stride_one
* Remove some obsolete code
2019-03-30 14:06:20 -06:00
Dennis Heimbigner
75759ca957 Separate out the --ansi comment fixes.
re: pull request https://github.com/Unidata/netcdf-c/pull/1242

This pr should be applied before https://github.com/Unidata/netcdf-c/pull/1242.
It fixes only the -ansi '//' comment problems. There may be some
slight conflicts with that other pr when it is applied, since in some
cases I converted #if 0...#endif to /*...*/
2018-12-12 13:23:09 -07:00
Ward Fisher
72d56fb601 Updated copyright stanza in libdap4 2018-12-06 14:24:28 -07:00
Wei-keng Liao
0ed70756cc Ignore flags NC_MPIIO and NC_MPIPOSIX. 2018-09-22 20:22:34 -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
Ward Fisher
0f36b279be Merge remote-tracking branch 'origin/cleanncgen.dmh' into pr-aggregate.wif 2018-04-20 13:06:26 -06:00
Wei-keng Liao
0f4a85b9f2 a clean commit for #383 2017-12-20 20:53:30 -06:00
Ward Fisher
16d6f94f30 Merge branch 'master' into filters.dmh 2017-11-13 11:15:02 -07:00
Dennis Heimbigner
4ee89ed71b Fix conflicts with master 2017-11-06 13:15:10 -07:00
Dennis Heimbigner
026544964a Cleanup some ncgen memory problems 2017-10-31 14:03:57 -06:00
Dennis Heimbigner
8e2abdeed8 Initial version 2017-08-31 14:19:56 -06:00
Dennis Heimbigner
7c592cfb2a 1. Unify the rc file reading into libdispatch/drc.c. Eventually extend
if we need rc file for netcdf itself as opposed to the dap code.
2017-08-30 17:44:57 -06:00
Dennis Heimbigner
ed44fd7306 Add szip support via libaec 2017-08-27 13:35:20 -06:00
Dennis Heimbigner
7c3164577e Finalize the compression support.
This relies on the HDF5 capability to
dynamically load compression filters.
Note that a compression filter is just
a subcase of filters.

The primary user-visible changes are as follows:
1. Add a standard header "netcdf_filter.h" that defines
   the necessary API extensions
2. Modify ncgen to support two new special attributes
   "_Filter_ID" and "_Filter_Parameters" so that compression
   can be turned on when creating a file using ncgen.
4. Add a detailed description of filtering support
   to the user's guide; see the file filters.md
5. Add a test case directory for this: nc_test4/filter_test.
   It is fragile and a ./configure flags (-enable-filter-test)
   is defined (default disabled) to shut this off this test
   to avoid spurious 'make check' failures.

Note that the HDF5 documentation is not up-to-date, so
much of what is encoded here comes from examining the
actual code in the file H5PL.c in the HDF5 source code.
2017-04-27 13:01:59 -06:00
Dennis Heimbigner
3db4f013bf Primary change: add dap4 support
Specific changes:
1. Add dap4 code: libdap4 and dap4_test.
   Note that until the d4ts server problem is solved, dap4 is turned off.
2. Modify various files to support dap4 flags:
	configure.ac, Makefile.am, CMakeLists.txt, etc.
3. Add nc_test/test_common.sh. This centralizes
   the handling of the locations of various
   things in the build tree: e.g. where is
   ncgen.exe located. See nc_test/test_common.sh
   for details.
4. Modify .sh files to use test_common.sh
5. Obsolete separate oc2 by moving it to be part of
   netcdf-c. This means replacing code with netcdf-c
   equivalents.
5. Add --with-testserver to configure.ac to allow
   override of the servers to be used for --enable-dap-remote-tests.
6. There were multiple versions of nctypealignment code. Try to
   centralize in libdispatch/doffset.c and include/ncoffsets.h
7. Add a unit test for the ncuri code because of its complexity.
8. Move the findserver code out of libdispatch and into
   a separate, self contained program in ncdap_test and dap4_test.
9. Move the dispatch header files (nc{3,4}dispatch.h) to
   .../include because they are now shared by modules.
10. Revamp the handling of TOPSRCDIR and TOPBUILDDIR for shell scripts.
11. Make use of MREMAP if available
12. Misc. minor changes e.g.
	- #include <config.h> -> #include "config.h"
	- Add some no-install headers to /include
	- extern -> EXTERNL and vice versa as needed
	- misc header cleanup
	- clean up checking for misc. unix vs microsoft functions
13. Change copyright decls in some files to point to LICENSE file.
14. Add notes to RELEASENOTES.md
2017-03-08 17:01:10 -07:00