On Tue, Mar 30, 2010 at 11:51:39PM +0100, Ricardo Reis wrote:
> If using the master/slace IO model, would it be better to cicle
> through all the process and each one would write it's part of the
> array into the file. This file would be open in "stream" mode...
> do p=0,nprocs-1
> openfile (append mode)
> call MPI_Barrier(world,ierr)
Note that there's no guarantee of the order here, though. Nothing
prevents rank 30 from hitting that loop before rank 2 does. To ensure
order, you could MPI_SEND a token around a ring of MPI processes.
One approach might be to use MPI_SCAN to collect offsets (the amount
of data each process will write) and then do an MPI_FILE_WRITE_AT_ALL.
If you are stuck with NFS, then yes, send to master.
Mathematics and Computer Science Division
Argonne National Lab, IL USA