LAM/MPI logo

LAM/MPI General User's Mailing List Archives

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

From: Manish Chablani (mchablan_at_[hidden])
Date: 2002-09-29 20:27:43


Hi again,

I would like to add more to my yesterdays reply.

In LAM/MPI user can set the buffer size to anything (default is 64K). So
if data size is < buffer size, MPI_Send *may* return immediately, however
it *might not* if whole of that buffer is not available. 64k (or whatever
size the user sets) is a *total* size for that socket pair. So if we've
already done an MPI_Send of 32k worth of information and then do another
MPI_Send immediately afterwards of 48K, it may actually block for a while
until enough bytes drain from the first send that the total pending bytes
are < 64k.

Now to come back to your question.
Actually, there is no real reason not to do a bunch of non-blocking
receives and then a MPI_Waitall to wait for them all to complete. Doing
so may allow non-root processes to complete a little faster (particularly
in the case where some non-root processes delay entering the gather[v])
Granted, the speedup is probably usually not very much (the most common
case is probably when the non-root processes are more-or-less
synchronized, and all enter gather[v] are more-or-less the same time), but
it is a small thing that can be done, and it would de-serialize the
process on the root process.

hope this helps,
Manish Chablani
------------------------------------------------------
Graduate Student, CS Department,
Indiana University.

Make today a LAM/MPI day !!!
http://www.lam-mpi.org/
------------------------------------------------------

On Sat, 28 Sep 2002, Manish Chablani wrote:

>
> On Sat, 28 Sep 2002, [ISO-8859-1] Håvard Berland wrote:
>
> > On Sat, 28 Sep 2002, Manish Chablani wrote:
> > | Here is what LAM: MPI_Gatherv does.
> > |
> > | If rank != root then it does a MPI_Send and returns.
> > | If rank == root, it does a MPI_Recv from each rank !=root serially.
> >
> > Is there any special reason not to do a non-blocking receive?
> > Intuitively it should speed up the gathering process, but the speedup
> > gained may be negligible?
>
> MPI_Send and MPI_Recv are blocking, however for messages of size < buffer
> size (64K for LAM/MPI) MPI_Send returns immediately without waiting for
> corresponding MPI_Recv to be called. This is because of buffering. Check
> out more about it in MPI documents at
> http://www.mpi-forum.org/docs/mpi-11-html/node40.html#Node40
>
> hope this helps,
> Manish Chablani
> ------------------------------------------------------
> Graduate Student, CS Department,
> Indiana University.
>
> Make today a LAM/MPI day !!!
> http://www.lam-mpi.org/
> ------------------------------------------------------
>
> >
> > --
> > Håvard Berland
> > berland_at_[hidden]
> > http://www.math.ntnu.no/~berland
> >
> >
> >
>
> _______________________________________________
> This list is archived at http://www.lam-mpi.org/MailArchives/lam/
>

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