[MPICH] disp argument in MPI_File_set_view() in Fortran

Wei-keng Liao wkliao at ece.northwestern.edu
Sun Jan 28 02:18:39 CST 2007


I am testing a Fortran MPI I/O code. I found that when setting the file 
view, if I used "0" directly for the disp argument in MPI_File_set_view() 
call, then MPI_File_write() or MPI_File_write_at() will fail.

But if I used a variable of type integer(KIND=MPI_OFFSET_KIND) and set it 
to 0 and used it in the disp argument, everything works fine. I also can 
see all Fortran test codes in ROMIO test directory written in this way.

I looked into ADIO implementation, in particular, ad_nfs_write.c and 
ad_pvfs_write.c. I put a print statement to print the offset value passed 
into functions ADIOI_NFS_WriteContig() and ADIOI_PVFS_WriteContig() and I 
got a very large number, like 85899346160, although it should be very 
small or 0 in my test code. I believe there is something fishy in type 
casting when passing the offset variable among functions in ROMIO. 
However, C seems not having this problem.

I am using mpich2-1.0.5 on a Linux cluster running athlon i386 and RedHat 
2.4.21-32.0.1.EL. MPICH is compiled with gcc, gfortran 4.0.0.

Wei-keng





More information about the mpich-discuss mailing list