<div>Dear Anthony</div><div><br></div><div>Hi</div><div> I changed my program to the MPI but I have a problem using I/O files:</div><div>in my program the files are in this style:</div><div><font class="Apple-style-span" face="'courier new', monospace"><span class="Apple-tab-span" style="white-space:pre">        </span> Jout=Iout+5</font></div>
<div><font class="Apple-style-span" face="'courier new', monospace"> open(Jout,status="unknown",form="unformatted")</font></div><div><font class="Apple-style-span" face="'courier new', monospace"> write(Jout)bwx,bwy,bwz</font></div>
<div><font class="Apple-style-span" face="'courier new', monospace"> close(Jout)</font></div><div><br></div><div>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.</div>
<div>I think as it is 3D it is difficult to use MPI_GATHER as follows:</div><div><font class="Apple-style-span" face="'courier new', monospace"><span class="Apple-tab-span" style="white-space:pre">        </span>CALL MPI_GATHER(bx, mFx*my*mz, MPI_REAL, bwx, mFx*my*mz,</font></div>
<div><font class="Apple-style-span" face="'courier new', monospace"> & MPI_REAL, 0, MPI_COMM_WORLD, ierr)</font></div><div><font class="Apple-style-span" face="'courier new', monospace"><br></font></div>
<div><font class="Apple-style-span" face="'courier new', monospace"><span class="Apple-tab-span" style="white-space:pre">        </span>CALL MPI_GATHER(by, mFx*my*mz, MPI_REAL, bwy, mFx*my*mz,</font></div><div><font class="Apple-style-span" face="'courier new', monospace"> & MPI_REAL, 0, MPI_COMM_WORLD, ierr)</font></div>
<div><font class="Apple-style-span" face="'courier new', monospace"><br></font></div><div><font class="Apple-style-span" face="'courier new', monospace"><span class="Apple-tab-span" style="white-space:pre">        </span>CALL MPI_GATHER(bz, mFx*my*mz, MPI_REAL, bwz, mFx*my*mz,</font></div>
<div><font class="Apple-style-span" face="'courier new', monospace"> & MPI_REAL, 0, MPI_COMM_WORLD, ierr)</font></div><div><font class="Apple-style-span" face="'courier new', monospace"><br></font></div>
<div><font class="Apple-style-span" face="'courier new', monospace">And also as it is unformatted it is difficult to use</font></div><div><font class="Apple-style-span" face="'courier new', monospace"><span class="Apple-tab-span" style="white-space:pre">        </span>call MPI_FILE_WRITE(thefile, buf, BUFSIZE, MPI_INTEGER</font></div>
<div><font class="Apple-style-span" face="'courier new', monospace"> & ,MPI_STATUS_IGNORE, ierr)</font></div><div><br></div><div>Is there any way to change this to MPI?</div><div><br></div><div>
Kind Regards</div><div>Sincerely</div><div>Amin</div>