LAM/MPI logo

LAM/MPI General User's Mailing List Archives

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

From: Jeff Squyres (jsquyres_at_[hidden])
Date: 2001-12-08 18:01:13


On Sat, 8 Dec 2001, LEBEAU, GERALD J. (JSC-EG) (NASA) wrote:

> Just an FYI - and I may be doing something totally invalid - but I've
> never used mpi_wait with in my program that uses mpi_isend. I do
> however use the mpi_request_free call for each mpi_isend, and also
> believe that I've insured that all communication has completed (i.e.
> the corresponding mpi_recv's have completed) before deallocating the
> send buffers. I run this code on everything from Linux PC clusters to
> 1000 processor Origin systems and provide it to lots of people across
> the country, so I'd like to address this issue in my code if there's a
> problem. Is there someone that can confirm that the mpi_wait is
> "absolutely" necessary, or am I somehow covered by the steps I've
> taken?

This is perfectly acceptable (doing an MPI_Request_free immediately after
a non-blocking call); see MPI-1:3.7.3. Just note that programs doing this
will not get any indication back from MPI when the non-blocking
communcation has completed, and therefore you must use some other
mechanism (e.g., additional messages as mentioned above) to know when you
can use the buffer again.

Just for completeness in this thread, I should also point out that one
does not have to use MPI_Wait to complete non-blocking communications;
there's also MPI_Test (MPI-1:3.7.3), which is non-blocking. There are
also other forms of MPI_Wait and MPI_Test that take arrays of requests as
arguments (see MPI-1:3.7.5).

{+} Jeff Squyres
{+} jsquyres_at_[hidden]
{+} http://www.lam-mpi.org/

_______________________________________________
This list is archived at http://www.lam-mpi.org/MailArchives/lam/