Commit Graph

17 Commits

Author SHA1 Message Date
Dennis Heimbigner
25d2e05444 Prepare for the path management code
Rename some files in prep for eventual implementation
of more comprehensive cross-platform file path management.
2020-10-13 19:12:15 -06:00
Dennis Heimbigner
10fa0da210 Fix typo in mmapio.c 2019-05-04 21:09:59 -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
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
87110139f6 More synchronization of copyright stanzas. 2018-12-06 14:34:40 -07: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
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
Dennis Heimbigner
6dc6cf65ba re: issue https://github.com/Unidata/netcdf-c/issues/401
It turns out that the chunksize used in the
ncio-related code must be a multiple of eight in
size.  Both memio.c and mmapio.c were
potentially violating this constraint.

See also pr https://github.com/Unidata/netcdf-c/pull/400
2017-05-02 21:22:54 -06:00
Ward Fisher
8dddd222a3 Merged master, DAP4 support into branch. 2017-04-19 09:29:35 -06:00
Wei-keng Liao
7aa8fc36c7 include config.h the way suggested by autoconf 2017-03-11 13:03:17 -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
dmh
859f105005 merge-squash 2015-08-15 16:26:35 -06:00
dmh
3dd807a155 The original mem branch somehow got
hosed, so I rebuilt it as a new mem2 branch.
2015-05-28 15:10:10 -06:00
Dennis Heimbigner
5ca78309cc The effect of this change is to make the struct NC structure
contain as little file-type specific info as possible.  It
modifies especially libsrc so that all of the netcdf-3 data
that used to be in struct NC is now kept in a separate chunk
of data pointed to by the struct NC. This makes all of
current protocols consistent: netcdf-3, netcdf-4, and dap.
2012-09-06 19:44:03 +00:00
Dennis Heimbigner
60b3f3b6f3 change file permissions for memio and mmapio 2012-06-28 17:12:02 +00:00
Dennis Heimbigner
00e50f5a44 1. changed from using port 8080 to 8081 for motherlode
2. Fixed Ward's IGNORE problem with oc
3. Mmap support now works.
4. Fix an uninitialized variable pointed out by Russ in dnclog.c
2012-04-22 20:34:21 +00:00
Dennis Heimbigner
48ca394d2e diskless: make read and write loop to read/write whole file when persisting 2012-04-09 22:03:02 +00:00