Bug in ncmpii_sanity_check, version 1.8.1
Wei-keng Liao
wkliao at eecs.northwestern.edu
Thu Nov 30 16:45:59 CST 2017
Hi, Greg
Thanks for catching the bug and yes 1.9.0.pre1 has fixed it.
I plan to release 1.9.0 soon.
Wei-keng
On Nov 30, 2017, at 4:19 PM, Sjaardema, Gregory D wrote:
> Not sure if you are still fixing bugs in 1.8.1 and I verified that it doesn’t exist in 1.9.0.pre1, so feel free to ignore…
>
> In the sanity test starting at line 166, there is the following block:
>
> for (i=firstDim; i<(*varp)->ndims; i++) {
> #ifdef RELAX_COORD_BOUND
> if (start[i] < 0 || start[i] > (*varp)->shape[i]) {
> DEBUG_ASSIGN_ERROR(err, NC_EINVALCOORDS)
> goto fn_exit;
> }
> if (start[i] == (*varp)->numrecs) {
> if (api == API_VAR1) {
> /* for var1 APIs, count[0] is considered of 1 */
> DEBUG_ASSIGN_ERROR(err, NC_EINVALCOORDS)
> goto fn_exit;
> }
> else if (count != NULL && count[i] > 0) {
> DEBUG_ASSIGN_ERROR(err, NC_EINVALCOORDS)
> goto fn_exit;
> }
> }
> #else
> if (start[i] < 0 || start[i] >= (*varp)->shape[i]) {
> DEBUG_ASSIGN_ERROR(err, NC_EINVALCOORDS)
> goto fn_exit;
> }
> #endif
> }
>
> The “(*varp)->numrecs” in the if statement at line 172 should be “(*varp)->shape[i]” I think this is a cut-paste bug where two instances were changed, but the third was missed.
>
> ..Greg
More information about the parallel-netcdf
mailing list