Commit Graph

3426 Commits

Author SHA1 Message Date
Dennis Heimbigner
ddfb6d6279 Make sure that the _NcProperties attr is null terminated and stored as such 2016-08-08 21:54:23 -06:00
Dennis Heimbigner
f205989d59 Undo debug output because Travis won't show it 2016-08-08 11:23:14 -06:00
Dennis Heimbigner
7701bc932c travis failing; add debug output 2016-08-08 10:39:34 -06:00
Dennis Heimbigner
0cf1e2c49f re: Github issue netcdf-c 300
Modified provenance code to allocate the minimal space
needed for _NCProperties attribute in file.  Basically
required using malloc in the provenance code and in ncdump.
Otherwise should cause no externally visible effects.
Also removed the ENABLE_FILEINFO from configure.ac since
the provenance code is no longer optional.
2016-08-08 09:24:19 -06:00
Ward Fisher
ec879abca6 Updated release notes. 2016-07-27 14:14:32 -06:00
Ward Fisher
05cbb8444b Propegated previous change into cmake-based builds. 2016-07-27 14:10:05 -06:00
Ward Fisher
792322dc4b Got nc-config to properly parse nf-config in support of https://github.com/Unidata/netcdf-c/issues/296 2016-07-27 14:05:47 -06:00
Greg Sjaardema
2bfd984fad Update testing -- not error if start==size 2016-07-21 09:30:18 -06:00
Greg Sjaardema
c7ccdfa543 More pedantically correct check
This modifies the previous change to be more pedantically correct.  It should always be an NC_EINVALCOORDS error if start exceeds fdims[2]; however, if start equals fdims[2], then it is only an error if count is non-zero.
2016-07-21 09:30:18 -06:00
Greg Sjaardema
9290b31c9d Fix variable bounds check for parallel output
The following code is in nc4hdf.c, function `nc4_put_vara`.

```
  /* Check dimension bounds. Remember that unlimited dimnsions can
   * put data beyond their current length. */
  for (d2 = 0; d2 < var->ndims; d2++)
    {
      dim = var->dim[d2];
      assert(dim && dim->dimid == var->dimids[d2]);
      if (!dim->unlimited)
        {
          if (start[d2] >= (hssize_t)fdims[d2])
            BAIL_QUIET(NC_EINVALCOORDS);
          if (start[d2] + count[d2] > fdims[d2])
            BAIL_QUIET(NC_EEDGE);
        }
    }
```

There is an issue when the process with the highest rank has zero items to output.  As an example, if I have 4 mpi processes which are each writing the following amount of data:
 * rank 0: 0 items
 * rank 1: 2548 items
 * rank 2: 4352 items
 * rank 3: 0 items.

I will define the variable to have a length of 6900 items (0 + 2548 + 4352 + 0).  When I am outputting data to the variable, each rank will call nc_put_vara_longlong with the following start and count values:
 * rank 0: start = 0, count = 0
 * rank 1: start = 0, count = 2548
 * rank 2: start = 2548, count = 4352
 * rank 3: start = 6900, count = 0.

In each case, the `start` for rank N is equal to `start` for rank N-1 + `count` for rank N-1.  This all works ok until the highest rank is writing 0 items.  In that case, the `start` value for that rank is equal to the total size of the variable and the check in the code fragment shown above fails since `start[] == fdims[]`.

This could be fixed in the application code by checking whether the `count` is zero and if so, then set `start` to 0 also, but I think that is a kluge that should not be required.

Note that this test appears three times in this file.  In one case, the check for non-zero count already exists, but not in the other two.  This pull request adds the check to the other two tests.
2016-07-21 09:30:18 -06:00
Ward Fisher
fa6d64d018 Merge branch 'patch-6' of https://github.com/gsjaardema/netcdf-c into gh-squash 2016-07-21 09:27:24 -06:00
Ward Fisher
31722a98ef Merge pull request #294 from tbeu/patch-1
Test all three files for compatibility
2016-07-18 15:32:19 -06:00
tbeu
eae6d75d47 Test all three files for compatibility 2016-07-18 22:18:42 +02:00
Greg Sjaardema
4ba6005ff2 Merge branch 'master' into patch-6 2016-07-18 07:05:27 -04:00
Ward Fisher
c1ec950d70 Merge branch 'extent-llu' of https://github.com/brtnfld/netcdf-c into consolidate-gh 2016-07-15 14:42:49 -06:00
Ward Fisher
d419b53925 Merge branch 'patch-1' of https://github.com/gsjaardema/netcdf-c into consolidate-gh 2016-07-15 14:40:32 -06:00
Ward Fisher
9fde5ed227 Merge branch 'patch-3' of https://github.com/gsjaardema/netcdf-c into consolidate-gh 2016-07-15 14:37:55 -06:00
Greg Sjaardema
033712ef1e Use correct symbol
As best I can tell, this should be ENABLE_PARALLEL4 instead of ENABLE_PARALLEL.  ENABLE_PARALLEL is not used other than in a couple documentation files.  But, ENABLE_PARALLEL4 is set in the top-level CMakeLists.txt file if a parallel hdf5 library is detected.
2016-07-15 07:47:40 -04:00
Ward Fisher
373e3ae87e Merge branch 'master' into gh277 2016-07-13 15:17:30 -06:00
Ward Fisher
cd6b94f2f4 Merge branch 'nc3-hashmap-fix' of https://github.com/gsjaardema/netcdf-c into gh282 2016-07-13 11:35:09 -06:00
Ward Fisher
2fe943d32e Wiring in test contributed by Greg Sjaardema in support of https://github.com/Unidata/netcdf-c/issues/282 2016-07-12 16:58:49 -06:00
Ward Fisher
55e4b7acfd Merge branch 'master' into gh277 2016-07-12 13:48:00 -06:00
Ward Fisher
ad8a85769d Merge pull request #287 from Unidata/typedef
mutiple typedefs causing compile problems
2016-07-12 13:22:35 -06:00
Greg Sjaardema
fcb1455b28 Update nc4hdf.c
If H5Aopen_idx on line 1964 fails, then attid will be < 0.  The BAIL will goto exit at line 1989 and then the test of "if (attid ...)" at line 1995 will pass (attd != 0) and then call H5Aclose(attid) with a negative attid.    Similar issue for spaceid.  

Result of function if probably the same since there is a failure somewhere, but more difficult to track down if looks like failure is happening in the wrong place.
2016-07-12 08:59:01 -04:00
Greg Sjaardema
c361938c8e Fix att_name size
There was a mismatch between the allocated size of att_name and the size that H5Aget_name was told the size was.
2016-07-12 08:12:23 -04:00
Ward Fisher
af26592f50 Filled in short description for group-related functions in support of https://github.com/Unidata/netcdf-c/issues/277 full documentation still pending. 2016-07-11 16:55:30 -06:00
Ward Fisher
c5d1b664f3 refactoring of documentation. 2016-07-11 14:43:39 -06:00
Dennis Heimbigner
d3f44747f1 A couple of people have reported that
the multiple definitions of
    typedef struct DCEparsestate
near lines 10 and 42 causes compiler
problems with some versions of gcc.
remove the second typedef.
2016-07-11 14:11:20 -06:00
Greg Sjaardema
586e832f64 Fix variable and dimension renaming for nc3 with hashmap
The problem is that the name was being updated prior to the old
variable being removed from the hashmap. It checks whether the key and
the name of the variable being removed match, but since the name had
already been updated, the names did not match so the variable was not
removed. This patch removes the variable from the hashmap first,
then updates the name, and then adds the variable with the new name to
the hashmap.

Similar change for renaming dimensions.
2016-07-11 15:44:40 -04:00
Ward Fisher
ca49086a32 Cleaned up warnings about undocumented parameters for NC_inq_var_all. 2016-07-11 13:43:19 -06:00
Ward Fisher
37162e55cc Roughed in documentation blocks for the group-related functions in dgroup.c. Details for the bulk of the code still need to be filled in. 2016-07-11 11:27:26 -06:00
Ward Fisher
6da5d38dde Started filling out group documentation. See https://github.com/Unidata/netcdf-c/issues/277 for more information. 2016-07-08 15:38:05 -06:00
Ward Fisher
13fabc4036 Merge branch 'doc-update' 2016-07-08 10:26:31 -06:00
Ward Fisher
973ec5f2ad Updated hdf5 version in documentation for pre-built Windows installers. 2016-07-07 15:14:48 -06:00
Ward Fisher
900fcd2e1f Merge branch 'master' into coverity 2016-07-06 16:06:26 -06:00
Ward Fisher
6d5a924354 Addressed coverity issue 719941, missing varargs cleanup. 2016-07-06 15:41:49 -06:00
Ward Fisher
8507d923b7 Fixed a typo in 'makeparser' ncgen/ target. 2016-07-06 15:32:53 -06:00
Ward Fisher
ad201da5f1 Addressed coverity issue 1256385, potential resource leak. 2016-07-06 15:06:06 -06:00
Ward Fisher
d8e86219b5 Corrected coverity issue 1264401, buffer not null terminated. 2016-07-06 14:49:15 -06:00
Ward Fisher
2406afd368 Merge branch 'master' into staging 2016-07-06 14:48:11 -06:00
Ward Fisher
6b79ffaa16 While I'm at it, fixed an incorrect development version. 2016-06-30 12:20:50 -06:00
Ward Fisher
120fe1def3 Bumped development version to reflect current state and post 4.4.1 release. 2016-06-30 12:19:35 -06:00
Ward Fisher
5452f7f1ab Added new test to autoconf-based builds and make dist, in support of https://github.com/Unidata/netcdf-c/issues/281 2016-06-30 12:11:05 -06:00
Ward Fisher
be24f34e63 Merge branch 'patch-17' of https://github.com/gsjaardema/netcdf-c into gh274 2016-06-29 15:06:08 -06:00
Ward Fisher
a4189e9dd3 Bumped SO version. 2016-06-28 13:33:12 -06:00
Ward Fisher
6aa3763622 Bumped version humber in autotools file. 2016-06-28 13:26:02 -06:00
Ward Fisher
770a646a89 Added some notes to release notes. 2016-06-28 13:23:14 -06:00
Ward Fisher
e502b40d6a Updated static software html page. 2016-06-27 15:38:29 -06:00
Ward Fisher
b4e805bd8a Added a link to https://github.com/Unidata/netcdf-c/pull/279 in Release notes. 2016-06-27 15:12:31 -06:00
Ward Fisher
17903e617d Merge pull request #279 from Unidata/dapreport
Make ncdump/nccopy return a better error when given a bad constraint in a dap url
2016-06-27 21:09:28 +00:00