Newsgroups: comp.parallel.mpi
From: rdaoud@magnus.acs.ohio-state.edu (Raja B Daoud)
Subject: Re: Clarifications on Ready/Sync modes
Organization: Ohio Supercomputer Center
Date: 12 Aug 1995 01:50:07 GMT
Message-ID: <40h1cf$nbt@charm.magnus.acs.ohio-state.edu>

Vivek Gupta <guptavi1@cps.msu.edu> wrote:
>a) For the synchronous mode, can the send complete as soon as a matching 
>   receive is posted OR is it necessary that the matching receive should have 
>   "got/received some data" ? I believe the former is true since for a non-
>   blocking sync-send can be matched by a non-blocking receive call.

A sync. send can complete when a matching receive is posted and the
the send buffer can be reused, whichever happens last.  It depends on
how the implementation handles message buffering.

>b) For the ready mode, shouldn't the send be started only when the matching
>   receive gets posted. That implies that the receiver will need to send

It's not MPI that guarantees the ordering, it's the user that does.
This is just a way for the user to tell the implementation that he/she
guarantees the matching receive has been posted before ready send was
called.  If the implementation can use this knowledge to optimize the
transfer, good.  Otherwise it can treat it as a regular send.
If the user calls ready send without having somehow made sure that the
matching receive has been posted, then the program is erroneous.  So no
need for extra protocol messages to handle ready send (but an impl. may
choose to do so and detect the error).

--Raja

-=-
Raja Daoud				raja@tbag.osc.edu
Ohio Supercomputer Center		http://www.osc.edu/lam.html

