Open MPI logo

Open MPI User's Mailing List Archives

  |   Home   |   Support   |   FAQ   |   all Open MPI User's mailing list

Subject: Re: [OMPI users] Is there an "flush()"-like function in MPI?
From: guosong (guosong1079_at_[hidden])
Date: 2009-09-26 12:45:17


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).
 

Date: Sat, 26 Sep 2009 08:42:35 -0700
From: Eugene.Loh_at_[hidden]
To: users_at_[hidden]
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/
--_56d69769-e2f3-44e9-9918-e61012370c83_
Content-Type: text/html; charset="gb2312"
Content-Transfer-Encoding: 8bit

<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Verdana
}
--></style>
</head>
<body class='hmmessage'>
Thanks for&nbsp;reply.&nbsp;One more thing I would like to know&nbsp;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). &nbsp;<BR>&nbsp;<BR>
<HR id=stopSpelling>
Date: Sat, 26 Sep 2009 08:42:35 -0700<BR>From: Eugene.Loh_at_[hidden]<BR>To: users_at_[hidden]<BR>Subject: Re: [OMPI users] Is there an "flush()"-like function in MPI?<BR><BR>guosong wrote:
<BLOCKQUOTE cite=midCOL102-W5EEC171A7E39325BFD41AA8D80_at_phx.gbl>
<STYLE>
.ExternalClass .ecxhmmessage P
{padding:0px;}
.ExternalClass body.ecxhmmessage
{font-size:10pt;font-family:Verdana;}
</STYLE>
Hi all,<BR>I am wondering if there is&nbsp;an flush()-like function in MPI. I saw the&nbsp;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&nbsp;was not flushed out and was still in the I/O buffer. Thanks.<BR></BLOCKQUOTE>If you send with MPI_Isend, the send operation is started.&nbsp; In order to complete the send, you need a corresponding MPI_Wait (or MPI_Test or variant like MPI_Waitall, etc.).<BR><BR>Even then, it is possible for the MPI implementation to buffer the message internally.&nbsp; 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.<BR><BR>There are also synchronous sends such as MPI_Ssend (or the non-blocking variant MPI_Issend).&nbsp; 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.&nbsp; It does not, however, guarantee that the full message has arrived at or been received by the receiver.<BR><BR>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.<BR> <br /><hr />ʹÓÃÐÂÒ»´ú Windows Live Messenger ÇáËɽ»Á÷ºÍ¹²Ïí£¡ <a href='http://www.windowslive.cn/Messenger/' target='_new'>Á¢¿ÌÏÂÔØ£¡</a></body>
</html>
--_56d69769-e2f3-44e9-9918-e61012370c83_--