Subject: RE: Order semantics, yet again

From: [email-masked]
Date: Tue, 28 Sep 93 22:38:32 PDT

Marc Snir asks:

> Anybody feeling strongly that we should not weaken the order
> requirement (in the sense provided by the alternative definition)?
> Any other implementor feeling a weaker requirement would make its
> life simpler (or faster)?  Anybody cares?

and Paul Pierce writes:

> We (Intel) have an implementation that will work better with the relaxed
> ordering requirement, and proposed implementations that would be even more
> sensitive. I support making the rules such that order is guaranteed only for
> exactly matching destination, tag, and communicator parameters.

I care, and I urge us to be very cautious here.  

Consider:

   process 0
 
   MPI_isend(a,1, MPI_REAL, 1, 0, MPI_WORLD)
   MPI_isend(b,1, MPI_REAL, 1, 0, MPI_WORLD)
 
   process 1: scenario A

   MPI_irecv(a,1, MPI_REAL, 0, MPI_ANYTAG, MPI_WORLD)
   MPI_irecv(b,1, MPI_REAL, 0, MPI_ANYTAG, MPI_WORLD)

   process 1: scenario B

   MPI_irecv(a,1, MPI_REAL, 0, 0, MPI_WORLD)
   MPI_irecv(b,1, MPI_REAL, 0, 0, MPI_WORLD)

By the weaker ordering spec, scenario B would have guaranteed order,
while scenario A would not.  Note that both scenarios are simple
point-to-point.

I personally find this counterintuitive and suspect that it would
be the source of some portability Heisenbugs that would be very
hard to find.

I also am not convinced that the penalty for forced ordering is
large enough to worry about.  

I think it should be a matter of one test for the receive handler
to find out whether there are wildcard receives posted.  Zero
tests, in fact, if you go to the trouble to install one handler
for the general case and another for when there are no wildcards
posted.

Why is this not correct?  (I.e., can the vendors convince me that
the extra cost is significant, and cannot be eliminated in the
common case by being a bit more clever?)

Thanks,
--Rik
----------------------------------------------------------------------
[email-masked] (alias 'd39135')   Rik Littlefield
Tel: 509-375-3927                         Pacific Northwest Lab, MS K1-87
Fax: 509-375-6631                         P.O.Box 999, Richland, WA  99352

---

From: Tony Skjellum <[email-masked]>
Date: Wed, 29 Sep 93 02:11:36 CDT

I concur with Paul.  I was in fact expecting these semantics, but
it is good that this issue comes up now, and we make that decision.
-Tony

---

From: Tony Skjellum <[email-masked]>
Date: Wed, 29 Sep 93 03:21:14 CDT

Let me moderate my comment to say that, at least I am convinced that
weakening to be within a context, pairwise ordering is preserved.  I
have not seen any reason to also allow the relaxation to include TAG.

Rik makes good points which I summarize to mean that TAG is not a
field over which we relax pairwise ordering, BUT I do want to see it
relaxed to be pairwise within a communicator only.

- Tony

---

From: [email-masked] (Al Geist)
Date: Wed, 29 Sep 93 11:34:48 EDT

>requirement (in the sense provided by the alternative definition)?

I feel strongly that we should not weaken the message order requirement.
The weaker requirement would mean that any program that uses
wildcard would be nondetermanistic from run to run.
I feel this is a bigger penalty than the potential speed gain.

Al Geist