Newsgroups: comp.parallel.mpi
From: gropp@godzilla.mcs.anl.gov (William Gropp)
Subject: Re: Broadcasting and ordering
Organization: Math and Computer Science, Argonne National Laboratory
Date: Sat, 29 Apr 1995 22:59:24 GMT
Message-ID: <79919636418384@godzilla.mcs.anl.gov>

The most troublesome is the pair (a) preserve order and (b) implement 
efficiently.  The ordering rule basically says that if I do

MPI_Isend( ... , tag = 1, count = 20, dest = 37, ... )
MPI_Imcast( ..., tag = 1, count = 30, ... )

from processor 0, then the message with count = 20 must arrive before the 
message with count = 30 (messages arive in the order in which they are 
sent).  This may not look too bad, but consider

MPI_Imcast( ..., tag = 1, count = 30, ... )
MPI_Isend( ... , tag = 1, count = 20, dest = 37, ... )

In this case, the message with count = 30 (the multicast) must arrive first.
Now, if I really DO use a single, non-scalable loop, I can achieve this. 
If I try to use a more scalable approach, such as a tree of some kind, 
it becomes quite tricky.  In particular, if the multicast uses any kind of
subdivision so that process zero does not send directly to process 37, but 
instead depends on other processes to do so (in the usual tree fashion), 
it becomes very, very difficult to efficiently preserve ordering.

Note that I've used nonblocking calls here to correspond to what you said
you needed in your note.

There are some examples where message ORDERING is unimportant; this is
exactly the discussion that the MPI2 Forum is having: since, in general, you
can't provide everything (i.e., ordering and efficiency), which DO you provide?

Bill


