Newsgroups: comp.parallel.pvm
From: mapdjb@bath.ac.uk (D J Batey)
Subject: Re: pvm_send and pvm_mcast
Organization: School of Mathematical Sciences, University of Bath, UK
Date: Mon, 8 Jan 1996 11:32:54 GMT
Message-ID: <DKv1Et.L7J.B.mary@bath.ac.uk>

In the referenced article, rcs@parcom.ernet.in (Ramesh Chandrashekar) writes:
>Andreas Dilger (adilger@enel.ucalgary.ca) wrote:
>
>: In my program, I use pvm_send() to transmit various different items to a
>: several machines, and then afterwards, I transmit common information
>: to all the systems with pvm_mcast().  The problem I'm having is that
>: the messages sent by pvm_mcast() are arriving before those sent by
>: pvm_send(), even though they were sent later.  I thought PVM was guaranteed
>: to preserve message order?  I'm using pvm 3.3.10 on both hosts.  
>
>You could use tags instead, to differentiate the 'send' and 'mcast' messages.
>Use the same tag on the recv. end to differentiate the two. PVM does not     
                                                             ^^^^^^^^^^^^
>guarantee any order of arrival of messages. What it lets you do is tag
 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>messages so that you recv in a specific order irrespective of the order of
>arrival of messages. Refer PVM manual for tagging.
>

PVM does very much guarantee the order of arrival of messages, in both
unicast and multicast sends, but not with a mixture, as the ordering
is guaranteed by the protocol, and unicast and multicast use different
protocols. So with 

send tid a
send tid b

a and b will be received by tid in that order. With

mcast tids c
mcast tids d

then c and d will be received in order by all tids.
BUT with

send tid a
mcast tids b
send tid c
mcast tids d

where tid is one of the tids, the messages will not necessarily arrive
at tid in the order a b c d. a will certainly be received before c,
and b before d, but there's no guarantee that a will be received
before b, or even before d, and so on.

Tagging would get around this, though.

Duncan Batey,
School of Mathematics,
University of Bath, UK.










