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

Heshan Lin hlin2 at ncsu.edu
Sun Feb 4 18:59:56 CST 2007


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. One solution I can
think of is to dynamically create communicator that only includes the
processes with data to write. However, this would require reopening the file
for every output iteration. Is there any better way to solve the problem?
Thanks for your help.

Best,
Heshan




More information about the mpich-discuss mailing list