possible bug in prerelease

Jim Edwards jedwards at ucar.edu
Fri Dec 1 16:43:42 CST 2017


I think that I've found a bug in the prerelease in file ncmpio_wait.c

In coalescing blocklengths at line 2095
​
            if (ai - a_last_contig == blocklengths[last_contig_req])
                /* user buffer of request j is contiguous from j-1
                 * we coalesce j to j-1 */
                blocklengths[last_contig_req] += blocklengths[j];

​It's possible that ​blocklengths[last_contig_req] + blocklengths[j];
overflows the integer datatype.
I tried to fix that by avoiding the coalescing:

            if ((ai - a_last_contig == blocklengths[last_contig_req]) &&
(blocklengths[last_contig_req] + blocklengths[j] > 0))
                /* user buffer of request j is contiguous from j-1
                 * we coalesce j to j-1 */
                blocklengths[last_contig_req] += blocklengths[j];

​but that leads to another overflow problem ​:

ad_gpfs_aggrs.c:572: ADIOI_GPFS_Calc_my_req: Assertion `curr_idx == (int)
curr_idx' failed.


-- 
Jim Edwards

CESM Software Engineer
National Center for Atmospheric Research
Boulder, CO
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/parallel-netcdf/attachments/20171201/d16cf077/attachment.html>


More information about the parallel-netcdf mailing list