Subject: Re: MPI_EXCHANGE?

From: [email-masked] (Tom Henderson)
Date: Fri, 23 Apr 93 09:05:52 MDT

David writes:  

> Was there ever a vote on whether there should be a routine mpi_exchange
> for exchanging data between two processes? I think it would be a useful
> addition to the point-to-point routines. It would look something like this:
> 	
> 	mpi_exchange ( send_bdo_handle,
> 		       recv_bdo_handle,
> 		       other_proc_handle,
> 		       tag,
> 		       context )
> 
> where "bdo"="buffer descriptor object". I think a blocking version would be 
> sufficient, though a nonblocking version is conceivable in which the exchange
> is initiated and we later check if its completed, or block until completion.
> 
> mpi_exchange will help users avoid writing unsafe programs.
> 
> David
> 

I also like "exchange()".  I buy the argument that exchange() helps users 
avoid writing unsafe programs.  Whenever I use Express, I use exchange() at 
every opportunity.  

/* Begin REHASH of old arguments */
When we last discussed this in point-to-point, we got mired in details.  Can 
send and receive buffers be the same?  Should there be a version with both 
"source" and "destination" processes in the parameter list to support a more 
general "shift" (like Express' exchange()).  If we allow one or more of these 
features, can exchange() be "fast"?  If we can't make exchange() "fast", 
should it be left to users to build it out of the low-level MPI point-to-point 
routines?  
/* End REHASH of old arguments */

On January 6, the point-to-point subcomittee decided to dump this problem on 
the collective communication subcommittee.  In the current collective 
communication, there are a whole bunch of group-based "shift()" routines.  

Maybe we need to answer the following questions:  

  Are the collective-communication "shift()" routines general enough?  
  (Examples?  Counter-examples?)  

  We COULD do "exchange()" by making a group of two and using one of the 
  "cshift()" routines.  Is this acceptable?  

  If we had point-to-point versions of both "exchange()" and "shift()", could 
  we avoid "ready-receive"?  (This is a really odd thought... :-)  

I'll stop rambling for now...

Tom Henderson