[mpich-discuss] Files in MPI format

ESMAEILI AMIN amin at cavelab.cs.tsukuba.ac.jp
Mon Oct 3 22:58:41 CDT 2011


Dear Anthony

Hi
 I changed my program to the MPI but I have a problem using I/O files:
in my program the files are in this style:
 Jout=Iout+5
       open(Jout,status="unknown",form="unformatted")
       write(Jout)bwx,bwy,bwz
       close(Jout)

And as it is now in MPI format and has decomposition in x direction and
using 4 guard cells, I do not know how to change these files in mpi format.
I think as it is 3D it is difficult to use MPI_GATHER as follows:
CALL MPI_GATHER(bx, mFx*my*mz, MPI_REAL, bwx, mFx*my*mz,
     & MPI_REAL, 0, MPI_COMM_WORLD, ierr)

CALL MPI_GATHER(by, mFx*my*mz, MPI_REAL, bwy, mFx*my*mz,
     & MPI_REAL, 0, MPI_COMM_WORLD, ierr)

CALL MPI_GATHER(bz, mFx*my*mz, MPI_REAL, bwz, mFx*my*mz,
     & MPI_REAL, 0, MPI_COMM_WORLD, ierr)

And also as it is unformatted it is difficult to use
call MPI_FILE_WRITE(thefile, buf, BUFSIZE, MPI_INTEGER
     &               ,MPI_STATUS_IGNORE, ierr)

Is there any way to change this to MPI?

Kind Regards
Sincerely
Amin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/mpich-discuss/attachments/20111004/1ec3888e/attachment.htm>


More information about the mpich-discuss mailing list