Commit Graph

593 Commits

Author SHA1 Message Date
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
Dennis Heimbigner
4a1e84b721 Re github issue https://github.com/Unidata/netcdf-c/issues/1131
The identifier typename is apparently a reserved word in C++.
It is used as a fieldname in the ALignment struct in
include/ncoffsets.h.

Change the field name to type_name in ncoffsets.h
and also in libdispatch/doffsets.c, which uses that field.
2018-09-03 13:30:11 -06:00
Ward Fisher
5e33522f52
Merge branch 'master' into default_format 2018-08-28 15:02:17 -06:00
Ward Fisher
373d0365a1
Merge branch 'master' into default_format 2018-08-24 11:27:07 -06:00
Ed Hartnett
ab1216da10 fix memory issue 2018-08-14 10:38:28 -06:00
Ed Hartnett
9953e53573 converting NULL checking of put functions 2018-08-14 09:21:45 -06:00
Ed Hartnett
829d9d28ae converting NULL checking of put functions 2018-08-14 09:09:08 -06:00
Ed Hartnett
5f9b7af467 converting NULL checking of put functions 2018-08-14 09:04:16 -06:00
Ed Hartnett
d6c0cbe234 removing unneeded file lookups 2018-08-14 08:56:58 -06:00
Ed Hartnett
5800fdd617 removing unneeded file lookups 2018-08-14 08:49:23 -06:00
Ed Hartnett
24f0c9d74c removing unneeded file lookups 2018-08-14 08:39:17 -06:00
Ed Hartnett
bc3c63bf03 removing unneeded file lookups 2018-08-14 08:32:45 -06:00
Ed Hartnett
1e3fe2b8cc removing unneeded file lookups 2018-08-14 08:29:02 -06:00
Ed Hartnett
d1ed803b31 removing unneeded file lookups 2018-08-14 08:18:05 -06:00
Ed Hartnett
3046dabda0 more NULL parameter changes 2018-08-14 08:06:01 -06:00
Ed Hartnett
baa76219d3 more NULL parameter changes 2018-08-14 08:01:54 -06:00
Ed Hartnett
69b37d994e fixed HDF4 test 2018-08-14 06:44:11 -06:00
Ed Hartnett
acc22e0c54 checking NULLs in function 2018-08-14 06:28:28 -06:00
Ed Hartnett
a0bea92919 fixed problem of not calling NC_ versions of vars and varm functions for extra error checking 2018-08-14 05:04:09 -06:00
Ed Hartnett
0b13f52766 documentation 2018-08-14 04:44:26 -06:00
Ed Hartnett
5c39fa115a return error for NULL start for varm functions 2018-08-14 04:35:38 -06:00
Ed Hartnett
a271ebb5f2 testing NULL starts 2018-08-14 04:17:34 -06:00
Ed Hartnett
97c2541a37 put_vars checking for NULL start for non-scalar vars and test 2018-08-13 13:05:32 -06:00
Ed Hartnett
8b26c83379 undid unneeded nc_test changes 2018-08-13 09:15:50 -06:00
Ed Hartnett
b29cc1b94f removed unneeded netcdf-4 checks in dvarget.c 2018-08-13 09:06:51 -06:00
Ed Hartnett
ec3d3a3d06 return error for put_vara calls with NULL start 2018-08-13 09:03:49 -06:00
Ed Hartnett
a63f3449c3 return error for put_vara calls with NULL start 2018-08-13 08:54:38 -06:00
Ed Hartnett
19222632b4 return error for put_vars calls with NULL start 2018-08-13 08:48:20 -06:00
Ed Hartnett
df371b2b99 reject NULL start for put_vars 2018-08-13 08:25:54 -06:00
Dennis Heimbigner
f46b65c602 Clear up coverity complaints
with respect to this coverity report.

https://u2389337.ct.sendgrid.net/wf/click?upn=08onrYu34A-2BWcWUl-2F-2BfV0V05UPxvVjWch-2Bd2MGckcRZApv53Ry-2FReUME-2Fmei1et81WqdBwm5AxSAYBM9iFSmbw-3D-3D_YxTn3nq1kZ9CfXcyYFaB2DtJSVHTn8U-2BK0LV-2FDyLYKcFvnwYJ7pm2zFB5UovsEUh5miIfeCfQzYxpN9HYcdqs9sKVjtklOkfPIjEpg0Tj8G9wiptznJeX-2FO4PrqJA1ViQYtQfpjugq01XGMQ3-2Bll42dUMxrmbdYSqi8T7bCcANC5evyZs4MKvmAWXt1bnPaHcOYJDN-2FUt-2FJTlhwu91HyR7h-2FnkvMY9paYUNB1gxiyUA-3D
2018-08-04 13:22:29 -06:00
Ward Fisher
59e98ef087
Merge branch 'master' into default_format 2018-08-03 10:59:41 -06:00
Wei-keng Liao
025c7d1bb2 introduce error code NC_EPNETCDF for errors at PnetCDF level 2018-07-29 15:33:08 -05:00
Wei-keng Liao
0ee68a3263 This commit fixes the logical problem of using the default file formats.
The fix includes the following changes.
1. Checking and using the default file format at file create time is now
   done only when the create mode (argument cmode) does not include any
   format related flags, i.e. NC_64BIT_OFFSET, NC_64BIT_DATA,
   NC_CLASSIC_MODEL, and NC_NETCDF4.
2. Adjustment of cmode based on the default format is now done in
   NC_create() only. The idea is to adjust cmode before entering the
   dispatcher's file create subroutine.
3. Any adjustment of cmode is removed from all I/O dispatchers, i.e.
   NC4_create(), NC3_create(), and NCP_create().
4. Checking for illegal cmode has been done in check_create_mode() called
   in NC_create(). This commit removes the redundant checking from
   NCP_create().
5. Remove PnetCDF tests in nc_test/tst_names.c, so it can focus on testing
   all classic formats and netCDF4 formats.

Two new test programs are added. They can be used to test netCDF with and
without this commit.
1. nc_test/tst_default_format.c
2. nc_test/tst_default_format_pnetcdf.c (use when PnetCDF is enabled).
2018-07-28 11:18:28 -05:00
Ward Fisher
a741bec8d9 Merge branch 'doc-cdf5' of https://github.com/wkliao/netcdf-c into pr-aggregation.wif 2018-07-18 14:08:20 -06:00
Ward Fisher
d6ed28291a
Merge branch 'master' into doc-cdf5 2018-07-17 15:53:56 -06:00
Ward Fisher
b570d10e01
Merge branch 'master' into enable-cdf5 2018-07-17 11:26:02 -06:00
Ward Fisher
d7ef36bb6f
Merge branch 'master' into doc-cdf5 2018-07-13 11:02:55 -06:00
Ward Fisher
9209a2ede5
Merge branch 'master' into interndocs.dmh 2018-07-10 16:00:39 -06:00
Ward Fisher
ca56fc768c
Merge branch 'master' into enable-cdf5 2018-07-10 16:00:12 -06:00
Ed Hartnett
39d45e9941 fixed clang warning in ncuri.c 2018-07-06 06:52:02 -06:00
Wei-keng Liao
577fcea506 add missing note about CDF-5 format 2018-07-05 22:54:41 -05:00
Wei-keng Liao
f95d3e3325 replace USE_CDF5 with ENABLE_CDF5 2018-06-29 21:17:07 -05: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
Ed Hartnett
29ce3b7d8c
Merge branch 'master' into ejh_udf 2018-06-08 14:49:15 -06:00
Ward Fisher
4fba5dfb45 Squaed a potential memory leak. 2018-06-08 12:08:33 -06:00
Ward Fisher
335f25e947 Corrected a couple of potential memory related issues and an uninitialized variable issue. 2018-06-08 11:38:11 -06:00
Ward Fisher
1af8b8f8fc Corrected a stored value that's never read issue detected by static analysis. 2018-06-07 16:17:32 -06:00
Ward Fisher
bb65fe5ea5 More potential memory leaks squashed. 2018-06-07 15:58:47 -06:00
Ward Fisher
3cce9e99e2 Corrected several potential null dereference or memory leak issues detected by static analysis. 2018-06-07 15:21:42 -06:00
Ed Hartnett
7aa073eb5d magic numbers working with user-defined formats 2018-06-07 06:49:16 -06:00