On Thu, Mar 08, 2007 at 05:50:52PM +0100, Julian Martin Kunkel wrote:
> We see a rather strange and wrong behavior with PVFS2 using a file view with 
> MPI-IO using different levels :)

You guys do a great job finding the most excellent corner cases.
Turns out we have a problem in the way we deal with types of the form
{(0,0) (10, 10)} -- types with a contiguous region of data proceeded
by a 'gap' and a LB.  

Please try out the attached patch.  I get the correct pattern for your
level0 and level2 tests, the repeated run of your 50k test yielded
identical files, and there are no more valgrind errors.

Hope you don't find any more bugs, but if you do, keep the reports
coming.

==rob

-- 
Rob Latham
Mathematics and Computer Science Division    A215 0178 EA2D B059 8CDF
Argonne National Lab, IL USA                 B29D F333 664A 4280 315B
Index: adio/ad_pvfs2/ad_pvfs2_read.c
===================================================================
RCS file: /home/MPI/cvsMaster/romio/adio/ad_pvfs2/ad_pvfs2_read.c,v
retrieving revision 1.26
diff -u -p -r1.26 ad_pvfs2_read.c
--- adio/ad_pvfs2/ad_pvfs2_read.c       1 Mar 2007 17:28:26 -0000       1.26
+++ adio/ad_pvfs2/ad_pvfs2_read.c       9 Mar 2007 20:16:42 -0000
@@ -340,7 +340,11 @@ void ADIOI_PVFS2_ReadStrided(ADIO_File f
        /* determine how many blocks in file to read */
        f_data_read = ADIOI_MIN(st_frd_size, bufsize);
        total_blks_to_read = 1;
-       j++;
+       if (j < (flat_file->count-1)) j++;
+       else {
+           j = 0;
+           n_filetypes++;
+       }
        while (f_data_read < bufsize) {
            f_data_read += flat_file->blocklens[j];
            total_blks_to_read++;
Index: adio/ad_pvfs2/ad_pvfs2_write.c
===================================================================
RCS file: /home/MPI/cvsMaster/romio/adio/ad_pvfs2/ad_pvfs2_write.c,v
retrieving revision 1.28
diff -u -p -r1.28 ad_pvfs2_write.c
--- adio/ad_pvfs2/ad_pvfs2_write.c      1 Mar 2007 17:28:26 -0000       1.28
+++ adio/ad_pvfs2/ad_pvfs2_write.c      9 Mar 2007 20:16:42 -0000
@@ -387,7 +387,11 @@ void ADIOI_PVFS2_WriteStrided(ADIO_File 
        /* determine how many blocks in file to write */
        f_data_wrote = ADIOI_MIN(st_fwr_size, bufsize);
        total_blks_to_write = 1;
-       j++;
+       if (j < (flat_file->count -1)) j++;
+       else {
+           j = 0;
+           n_filetypes++;
+       }
        while (f_data_wrote < bufsize) {
            f_data_wrote += flat_file->blocklens[j];
            total_blks_to_write++;
_______________________________________________
Pvfs2-developers mailing list
[email protected]
http://www.beowulf-underground.org/mailman/listinfo/pvfs2-developers

Reply via email to