[mpich-discuss] ad_pvfs2_read bug in ADIOI_PVFS2_ReadStrided()

Rob Latham robl at mcs.anl.gov
Mon Jun 1 23:36:50 CDT 2009


On Mon, Jun 01, 2009 at 06:17:24PM -0500, Wei-keng Liao wrote:
> This situation has been handled at line 209 where frd_size is  
> calculated.
> n_filetypes will be increased by 1 so frd_size is kept > 0
>
> In fact, this is very similar to our previous patch for data sieving
> that makes sure the file pointer always points to a valid byte in the
> fileview. But since pvfs2 driver is not updated with that patch, it
> is still using the old approach and the old one can automatically
> move the pointer to the right place in the NEXT I/O call.

Thanks for explaining.  I missed that the Strided code would fix up
the file pointers in the subsequent call.  However, what about the
WriteContig code?   That doesn't do any pointer fixing-up if using the
implicit file pointer (only the _at routines use the explicit file
pointer).

> I have revised my test code vector_view_read.c to include your test
> pattern. It ran just fine with my patch. The only difference is the
> pointer value, fd->fp_ind. But the I/O results are correct. So, it is
> you call to pick one of two.

I know, it's kind of a stretch to think of an application that would
do a noncontiguous read/write of a partial datatype, followed by a
contig, but I could maybe see one of the high-level I/O libraries
doing that.  If that's the case, then I think I'm more comfortable
with fd->fp_ind being at the right place when the function exits:
there might be more than one place in ROMIO that assumes that
behavior.

> You can include the attached codes in ROMIO test repository.

Great! thanks for the tests and the good discussion.  Definitely helps
me work through this code. 

==rob

-- 
Rob Latham
Mathematics and Computer Science Division
Argonne National Lab, IL USA


More information about the mpich-discuss mailing list