Jeff, Thanks for the explanation. It's very clear.
Best regards, Zhen On Mon, May 9, 2016 at 10:19 AM, Jeff Squyres (jsquyres) <jsquy...@cisco.com > wrote: > On May 9, 2016, at 8:23 AM, Zhen Wang <tod...@gmail.com> wrote: > > > > I have another question. I thought MPI_Test is a local call, meaning it > doesn't send/receive message. Am I misunderstanding something? Thanks again. > > From the user's perspective, MPI_TEST is a local call, in that it checks > to see if an MPI_Request has completed. It is also defined to return > "immediately", which most MPI implementations -- Open MPI included -- > interpret to mean "return in a short, finite time." > > In Open MPI's case, MPI_TEST (and friends) run through the internal > progression engine. I.e., it checks the status of ongoing MPI_Requests and > sees if it can advance them in a non-blocking manner. For example, a > socket may have [partially] drained since the last time through the > progression engine, and therefore we can write new bytes down that socket > without blocking. > > In your case, if you MPI_ISEND a very large message, and it uses the TCP > BTL as the transport, it'll likely try to send the first fragment of that > message to the peer. When the peer ACKs that first fragment, that gives > the sender permission to send the remaining fragments (i.e., the receiver > is ready for the entire message). Hence, each time through the progression > engine, the sender will write as many bytes as possible down the socket to > that peer until the entire message has been written. > > -- > Jeff Squyres > jsquy...@cisco.com > For corporate legal information go to: > http://www.cisco.com/web/about/doing_business/legal/cri/ > > _______________________________________________ > users mailing list > us...@open-mpi.org > Subscription: https://www.open-mpi.org/mailman/listinfo.cgi/users > Link to this post: > http://www.open-mpi.org/community/lists/users/2016/05/29139.php >