Commit Graph

459 Commits

Author SHA1 Message Date
Ed Hartnett
54eb9dad77
Merge branch 'master' into ejh_non_contoversial 2019-03-19 14:16:52 -06:00
Ward Fisher
e2b31ffae4
Merge branch 'master' into byterange.dmh 2019-03-19 12:05:44 -06:00
Ed Hartnett
39c258449c now properly running pnetcdf example program in parallel 2019-03-12 09:00:31 -06:00
Ed Hartnett
1077459a18 configure.ac cleanup 2019-03-12 08:55:30 -06:00
Ed Hartnett
63f8680540 configure.ac cleanup 2019-03-12 08:39:06 -06:00
Ed Hartnett
c0717426fd removed extra --with-chunck-cache-preemption option to configure 2019-03-12 08:37:07 -06:00
Ed Hartnett
d05c88b4db removed unused option --enable-extra-example-tests 2019-03-12 08:35:54 -06: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
b27c7d899d Merge branch 'master' into byterange.dmh 2019-01-25 14:50:23 -07:00
Ward Fisher
9a365be6d0 Merge branch 'ansifix.dmh' into pr-aggregation.wif 2019-01-15 14:58:54 -07:00
Ward Fisher
c21820a1ae Merge branch 'master' into ansifix.dmh 2019-01-02 22:26:59 -08:00
Dennis Heimbigner
84c2bc0d78 Merge branch 'master' into byterange.dmh 2019-01-02 13:18:45 -07:00
Ed Hartnett
74e4dcc4a2 deprecated non-relaxed boundary checking 2019-01-02 11:04:28 -07:00
Ed Hartnett
bdf7eef7c6 merged master 2019-01-02 03:52:51 -07: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
Ed Hartnett
3697f43b1d whitespace fixes in header file, fixed enable-benchmarks doc string in configure.ac 2018-12-17 07:59:33 -07:00
Dennis Heimbigner
735ae80928 merge master and fix conflicts 2018-12-12 11:47:54 -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
Ed Hartnett
693271c278 now always relax coord bounds checking, also fix parallel builds for --enable-pnetcdf 2018-12-03 06:17:23 -07:00
Ed Hartnett
bbfbd98f6e test and util changes to split libsrc4 and libhdf5 2018-12-01 08:24:56 -07:00
Ed Hartnett
db83d0b4bf got disable-hdf5 builds working without utils 2018-12-01 07:29:58 -07:00
Ed Hartnett
e55b9d697e separation of libhdf5 from libsrc4 2018-11-29 07:02:31 -07:00
Ed Hartnett
5d60ca1027 trying to fix classic build problem 2018-11-28 18:12:56 -07:00
Ed Hartnett
6dbcc42eb6 changes in support of separating HDF5 and libsrc4 2018-11-26 04:31:23 -07:00
Ed Hartnett
cebf4f3a32 fixed static hdf5 lib problems, changed tarball name 2018-11-14 10:36:27 -07:00
Ed Hartnett
50bda41b6b fixed dap configure issue 2018-11-09 08:45:27 -07:00
Ed Hartnett
e3f2c6811f fixed dap configure issue 2018-11-09 07:39:12 -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
Ward Fisher
16ee523a45
Merge branch 'master' into ejh_hdf4_config_issues 2018-10-12 17:20:43 -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
Ed Hartnett
8259455582
Merge branch 'master' into ejh_hdf4_config_issues 2018-10-10 06:17:27 +03:00
Wei-keng Liao
08629267e4 add default setting in configure help strings 2018-10-02 01:18:51 -05:00
Ed
8cd4f89aa4 fixing curl.h problem a bit 2018-09-25 04:17:56 -06:00
Ed
faac874399 now ensure that --disable-netcdf was used when building hdf4, also check for jpeg library with HDF4 builds 2018-09-24 23:53:05 -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
Ward Fisher
5b5311ef80
Merge branch 'master' into pnetcdf_driver 2018-09-18 12:21:11 -06: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
5259b4b1e8
Merge branch 'master' into ejh_hdf5_sep_next_2 2018-09-17 14:53:55 -06:00
Ward Fisher
26b02ae362 Corrected a few things for old experimental bootstrap fortran option. Still not working tho. 2018-09-14 16:08:11 -06:00
Ed Hartnett
08a2dce904 merged master 2018-09-07 12:40:44 -06:00
Ward Fisher
784d777bff Merge branch 'master' into provenance.dmh 2018-09-06 15:13:09 -06:00
Ed Hartnett
86e002d794 merged master 2018-09-06 14:01:59 -06:00
Ward Fisher
fbe0a18b1c
Merge branch 'master' into ejh_loop_cleanup_2 2018-09-05 11:22:55 -06:00