Re: 3rd party datatype instantiation

James Cownie (jcownie@felix.dircon.co.uk)
Thu, 09 Nov 1995 14:25:49 +0000

I've been thinking about this a bit, and I don't actually see where
the problem is any longer. The issue of structure layout seems to me
to be a complete red herring.

Think of it like this :-

1) An MPI datatype provides two separate sets of information
1) The type signature : i.e. the vector of basic types which go to
make up the message.
2) The type layout : i.e. the vector of offsets/addresses at which
the data is transferred.

2) A conforming MPI program only ever transfers messages with matching
type signatures. (Give or take MPI_type_packed). There is
explicitly no requirement on type layout matching, since this is a
local concern.

The current proposal gives you a way of extracting *all* of the
information in an MPI type, (i.e. both the signature, and the layout).

To be able to generate a conforming receive you only need the
signature information (indeed the layout information can be
destructivem which is where we were getting confused, I believe).

So, assuming that you know the layout you want on the machine you are
running on, (which you have to for the data to be useful to you), then
all you need do is :-

1) Receive the flattened (printable ?) type description.
2) Throw away all of the layout information.
3) Use the type information to construct a suitable datatype
(and allocate space for it, I assume),
4) Receive the data using your new, locally constructed datatype.

All done, no problem. You now have the data layed out as you want in
your local store, and know the types of it.

- -- Jim

James Cownie
BBN UK Ltd
Phone : +44 117 9071438
E-Mail: jcownie@bbn.com