[MPICH] Collective write when only a subset of processes have data to write

Robert Latham robl at mcs.anl.gov
Mon Feb 5 09:53:18 CST 2007


On Sun, Feb 04, 2007 at 07:59:56PM -0500, Heshan Lin wrote:
> Hi,
> 
> I am testing collective write with a parallel program in which every MPI
> process needs to periodically output non-contiguous data. The basic program
> structure for each MPI process looks like following. 
> 
> MPI_File_open(MPI_COMM_WORLD)
> WHILE (not end) {
>     Computation()
>     MPI_File_set_view()
>     MPI_File_write_all()
> }
> 
> One problem I have encountered now is that at some iteration there are only
> a subset of MPI processes having data to write. In that case the program
> will hang if not all processes issue write requests.

Go ahead and have all processes --  even those with no work to do --
call MPI_File_write_all.  The MPI-IO implementation will know what do
to. 

==rob

-- 
Rob Latham
Mathematics and Computer Science Division    A215 0178 EA2D B059 8CDF
Argonne National Lab, IL USA                 B29D F333 664A 4280 315B




More information about the mpich-discuss mailing list