Home

MPIDatatype

MPIDatatype is an internal representation of MPI datatypes used by MPI implementations, such as MPICH and Open MPI, to describe the layout of data in communications. It provides the concrete object behind the MPI_Datatype handle and encompasses both built-in types and user-defined derived types.

The main purpose of MPIDatatype is to support the communication subsystem in determining how many elements

While the exact fields are implementation-specific, a MPIDatatype generally stores information such as the datatype’s size,

Lifecycle and usage follow the MPI datatype workflow. Derived MPIDatatypes are created by MPI_Type_* constructors and

Notes and scope: MPIDatatype is an abstraction whose exact layout is implementation-dependent. Nevertheless, the concept across

See also: MPI datatype, MPI_Type_commit, MPICH, Open MPI.

to
send,
how
much
memory
to
read,
where
to
start
packing,
and
how
datatype
information
should
be
interpreted
across
processes.
It
captures
the
memory
layout
requirements
of
a
datatype,
supporting
heterogeneous
architectures
and
enabling
correct
and
efficient
data
transfer.
extent,
and
true
extent,
and
whether
the
type
is
contiguous.
For
derived
types,
it
maintains
references
to
constituent
types
and
describes
the
layout
(for
example,
strides,
block
lengths,
and
displacement
arrays
for
vector
and
indexed
types,
or
field
entries
for
struct
types).
This
internal
description
allows
the
runtime
to
perform
packing,
unpacking,
and
type
matching
during
communication.
finalized
with
MPI_Type_commit;
built-in
types
have
a
corresponding
internal
representation.
MPIDatatype
objects
are
typically
reference-counted
and
are
freed
when
MPI_Type_free
releases
the
last
reference.
Implementations
may
cache
or
reuse
internal
representations
to
optimize
performance.
MPI
implementations
is
consistent:
map
a
datatype
handle
to
an
internal
description
that
supports
correct
data
transfer,
type
matching,
and
efficient
packing/unpacking
across
processes.