Newsgroups: comp.parallel.mpi
From: James Cownie <jcownie@bbn.com>
Subject: Re: MPI_Type_Indexed: different der datatypes allowed at send and recv?
Organization: BBN
Date: 23 Oct 1995 11:03:18 GMT
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Message-ID: <46fspm$70d@newsgate.dircon.co.uk>

Rob Neely <rneely@llnl.gov> wrote:
>Is it legal in MPI to have differing derived datatypes for the
>send and recv sides of a message, as long as the "shape" of the
>message is identical?  What if they are indexed types?
>
>
>1) Is it legal in MPI to send and receive with different
>  derived datatypes?
>2) What assumptions can't I make about how the indexed data is going
>  to be packed?  What if my index lists are monotonically
>  increasing?  ie - sendIndexList in the above example went
>  from 0..9 instead of 9..0?

The answer is YES. Type matching in MPI is performed based on the "type
signature" of the message, which is the sequence of fundamental types
at the lowest level of the message. No consideration is given to how
these are laid out in store at all. (Precisely because you must be able
to send a column of an array and receive a row, for instance).

The order in which data is serialised (I won't say packed, because this implies
a movement into a buffer in store, which may never actually happen) is
precisely
defined by the standard, and you need to understand it to know what the
type signature of a datatype is. (It's fairly obvious and intuitive, but 
I'm sure there's a nice mathematical description in the standard).

Enjoy

-- Jim

James Cownie
BBN UK Ltd


