possible bug in prerelease

Wei-keng Liao wkliao at eecs.northwestern.edu
Fri Dec 1 20:07:20 CST 2017


Hi, Jim,

Yes, that is a bug. I have developed a fix. Please check out the
latest commit from PnetCDF SVN repo and let me know if it works for you.
Thanks for reporting.

Wei-keng

On Dec 1, 2017, at 4:43 PM, Jim Edwards wrote:

> 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 



More information about the parallel-netcdf mailing list