[Mpi-22] Datatype questions

Thomas Anderson t.dt.aanderson at [hidden]
Thu Nov 10 07:01:42 CST 2011



I read the mpi document
(http://www.mpi-forum.org/docs/mpi-2.2/mpi22-report.pdf) where it
states that a filetype is either a single etype or a derived MPI
datatype constructed from multiple instances of the same etype. This
looks like the definition only allow one datatype as elementary type.
However, when looking some examples such as struct
(http://www.osc.edu/supercomputing/training/mpi/Feb_05_2008/mpi_0802_mod_datatypes.pdf),
it allows several datatypes passed in to construct a new datatype. In
this example (struct), how can a user determine which datatype is the
elementary type? Or in fact a filetype can contains multiple
elementary types.

In addition, is derived datatype can only constructed by routines
(mpi_type_contiguous, mpi_type_vector, etc.)? Can a programmer compose
derived datatype from predefined mpi datatype (such as mpi_int +
mpi_float)?

Thanks.



More information about the Mpi-22 mailing list