[MPICH] Behavour if MPI_File_Open fails on some nodes
Robert Latham
robl at mcs.anl.gov
Fri Aug 17 13:33:51 CDT 2007
On Fri, Aug 17, 2007 at 06:32:26PM +0100, James S Perrin wrote:
> The code below when run on a cluster where a filepath exists only on
> the head node locks up on 2 or more processes:
You can do this, but it requires some tricks.
> Am I making a mistake in my use of MPI_File_Open() should I be testing
> exists() before calling it?
MPI_File_open is a collective call. You'll have to make the call on
all processes.
Ok, so about that trick I mentioned. We call it "deferred open". Not
sure how much you know about ROMIO's collective I/O optimizations, but
with the right hints you can specify that only certain processes,
called "aggregators", carry out collective I/O. If you also hint that
you won't be doing independent I/O, then when you open the file, then
only aggregators will attempt to open the file (and only aggregators
will care if the file actually exists).
The relevant hints:
cb_config_list or cb_nodes
romio_no_indep_rw
So you could set the hints "cb_config_list" to "node0:1" and
"romio_no_indep_rw" to "true", and then as long as you carry out only
collective I/O (those routines ending in _all), your other nodes will
not care if the file exists only on one process, even if they have
data to write.
I'll be happy to explain in more detail if any of that is unclear to
you.
==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