LAM/MPI logo

LAM/MPI Development Mailing List Archives

  |   Home   |   Download   |   Documentation   |   FAQ   |   all just in this list

From: Jeff Squyres (jsquyres_at_[hidden])
Date: 2006-01-18 23:13:46


On Jan 18, 2006, at 7:09 PM, Samuel RICHARD wrote:

> I was wondering what happens with LAM MPI tcp rpi if the TCP send
> buffer
> (inside the kernel) is full (the application is computing faster
> than the
> network sends packets).
> I think the socket API must return an error when the application is
> trying
> to write data to the socket but how does LAM behaves in such a case?
> Does LAM tries to re-send data after a defined delay?

Check the man page for write(2).

In some cases, LAM will put the socket in a blocking mode, and if
more data is written than the kernel will handle, write() will simply
block until all the data is able to be sent.

In other cases, LAM will put the socket in a non-blocking mode. If
more data is written than the kernel can handle, write() will return
the number of bytes actually written, and LAM keeps track of what
bytes of the message still need to be written.

In short -- LAM handles the return values from write() properly to
ensure that the entire message is able to be sent.

Hope that helps.

-- 
{+} Jeff Squyres
{+} The Open MPI Project
{+} http://www.open-mpi.org/