Thanks for reply. One more thing I would like to know is that since the message 
has already left the sender, how to make sure that the receiver side receives 
this message? From the output of my program, it seems that the receiver side is 
waiting for the message(MPI_Recv).  



List-Post: users@lists.open-mpi.org
Date: Sat, 26 Sep 2009 08:42:35 -0700
From: eugene....@sun.com
To: us...@open-mpi.org
Subject: Re: [OMPI users] Is there an "flush()"-like function in MPI?

guosong wrote: 


Hi all,
I am wondering if there is an flush()-like function in MPI. I saw the output of 
my program. One sent something but some other process did not receive it, just 
sitting there waiting. I used MPI_Isend for sending and MPI_Recv for receiving. 
Is it possible the message was lost or the message was not flushed out and was 
still in the I/O buffer. Thanks.
If you send with MPI_Isend, the send operation is started.  In order to 
complete the send, you need a corresponding MPI_Wait (or MPI_Test or variant 
like MPI_Waitall, etc.).

Even then, it is possible for the MPI implementation to buffer the message 
internally.  That is, the completion of the send operation only means that the 
message has left the user's send buffer -- not that the message has been 
received at the other end.

There are also synchronous sends such as MPI_Ssend (or the non-blocking variant 
MPI_Issend).  This guarantees that the send completes not only once the message 
has left the user's send buffer but only only once the receiver has posted a 
matching receive.  It does not, however, guarantee that the full message has 
arrived at or been received by the receiver.

I think once you've completed the send (e.g., adding an MPI_Wait to your 
MPI_Isend), there is nothing more to do on the sender's side to push the 
message along.

_________________________________________________________________
Messenger安全保护中心,免费修复系统漏洞,保护Messenger安全!
http://im.live.cn/safe/

Reply via email to