[MPICH] Questions about independent non-contiguous I/O

Rajeev Thakur thakur at mcs.anl.gov
Tue Jan 30 13:21:32 CST 2007


> According to the above discussion, specifically "... ensure 
> that no write
> sequence on any process is concurrent with any sequence (read 
> or write) on
> any other process", does it mean writing to a file in this 
> I/O scheme can
> not be performed in parallel? Or we can rely on the underline 
> file system to
> take care of the consistency issue? 

Yes, if each process opens a common file with MPI_COMM_SELF, MPI does not
guarantee consistency if a write from one process happens concurrently with
a read from some other process, even if they are to different parts of the
file. That does not mean it won't work -- it is not guaranteed to work; you
cannot rely on it working. It may happen to work on your particular MPI
implementation or file system.

> In some of my preliminary tests, I found non-contiguous 
> independent write
> without any application level synchronization can generate 
> correct results
> on PVFS2 but not on NFS. Does this make sense and how can we make
> assumptions about which file systems can support the LEVEL 2 I/O?

You should not assume anything about the file system. You should follow MPI
rules regardless of the file system.

I am attaching some slides I use in MPI-IO tutorials to explain consistency
semantics. Look at Example 3. I recommend not using MPI_COMM_SELF if you can
use MPI_COMM_WORLD. The consistency semantics are very weak with COMM_SELF.

Rajeev
 

> -----Original Message-----
> From: owner-mpich-discuss at mcs.anl.gov 
> [mailto:owner-mpich-discuss at mcs.anl.gov] On Behalf Of Heshan Lin
> Sent: Monday, January 29, 2007 8:59 PM
> To: mpich-discuss at mcs.anl.gov
> Subject: [MPICH] Questions about independent non-contiguous I/O
> 
> Hi,
> 
> Some questions about non-contiguous independent file access, which is
> classified as LEVEL 2 access pattern in MPI-I/O in Chapter 3 
> of book "Using
> MPI-2: Advanced Features of the Message-passing Interface". 
> It looks to me
> with this type of I/O, the file is (or at least is legal to 
> be) opened with
> MPI_COMM_SELF communicator, is it correct?
> 
> Then I am a little confused about the file consistency when using
> non-contiguous independent write. In the same Chapter of book 
> "Using MPI-2",
> there is following discussion about the consistency.
> 
> "Now let's consider the case where all processes access a 
> common file but
> specify MPI_COMM_SELF as the communicator when they open it. 
> (It's legal to
> do so, but we don't recommend it in general.) In this case, 
> there is only
> one way to achieve consistency: the user must take steps to 
> ensure that no
> write sequence on any process is concurrent with any sequence (read or
> write) on any other process. This is needed even if there are 
> no overlapping
> accesses among processes, that is, even if each process 
> accesses separate
> parts of the file."
> 
> According to the above discussion, specifically "... ensure 
> that no write
> sequence on any process is concurrent with any sequence (read 
> or write) on
> any other process", does it mean writing to a file in this 
> I/O scheme can
> not be performed in parallel? Or we can rely on the underline 
> file system to
> take care of the consistency issue? 
> 
> In some of my preliminary tests, I found non-contiguous 
> independent write
> without any application level synchronization can generate 
> correct results
> on PVFS2 but not on NFS. Does this make sense and how can we make
> assumptions about which file systems can support the LEVEL 2 I/O?
> 
> I'd appreciate it if anyone can clarify this.
> 
> Thanks,
> Heshan
> 
> 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: io-consistency.pdf
Type: application/pdf
Size: 18822 bytes
Desc: not available
URL: <http://lists.mcs.anl.gov/pipermail/mpich-discuss/attachments/20070130/8d6cb842/attachment.pdf>


More information about the mpich-discuss mailing list