pnetcdf-write-nb.c non-blocking
Wei-keng Liao
wkliao at eecs.northwestern.edu
Mon Sep 7 16:25:11 CDT 2015
Hi,
The example program is buggy.
The write buffers for the two iput calls should be different.
FYI. Once a nonblocking iput/iget API is posted, the contents
of the buffers should not be touched before the call to
ncmpi_wait_all/ncmpi_wait. Otherwise, the results can be incorrect.
Please see the bug fix in http://trac.mcs.anl.gov/projects/parallel-netcdf/changeset/2095
Thanks for reporting this problem.
Wei-keng
On Sep 7, 2015, at 1:52 PM, W. Miah wrote:
> Hello,
>
> I have downloaded pNetCDF and am browsing through the example code
> parallel-netcdf-1.6.0/examples/tutorial/pnetcdf-write-nb.c (attached
> with this email) which should write the MPI ranks into two arrays, but
> instead seems to be writing random values:
>
> [miahw at bengal tutorial]$ ncdump output.nc
> netcdf output {
> dimensions:
> d1 = 4 ;
> variables:
> int v1(d1) ;
> int v2(d1) ;
>
> // global attributes:
> :string = "Hello World\n",
> "" ;
> data:
>
> v1 = 0, 16777216, 33554432, 50331648 ;
>
> v2 = 0, 16777216, 33554432, 50331648 ;
> }
>
> I have looked at the code but can't see anything wrong with it. Could
> it be that the library has a bug?
>
> Regards,
>
> --
> web: http://miahw.wordpress.com
> gnupg: 2E29 B22F
> <pnetcdf-write-nb.c>
More information about the parallel-netcdf
mailing list