[Mpi3-rma] A very modest proposal (Datatypes/Ops in RMA)
Jesper Larsson Traeff
traff at it.neclab.eu
Wed Apr 23 04:39:50 CDT 2008
here is a proposal for registration of datatypes/ops for one-sided
communication with the aim of making implementations easier (in some
cases) and providing more flexibility (user-defined operations in
accumulate). It's for discussion and not a finished proposal
-------------- next part --------------
To make possible to avoid the overhead (and complexity in implementations)
of having to transfer a data type description from origin to target in
MPI_PUT, MPI_GET, MPI_ACCUMULATE, functionality to make sure that the *same*
datatype (and binary reduction operation) exists on origin and target
processes is proposed. This is done by (sparse) collective "register"
calls. For types (and operations) that have been registered, the MPI
implementation can safely assume that the same type (operations) exists
on origin and target.
It could be considered to restrict the use of datatypes in one-sided
communication calls to registered types only? This could save some
The mechanism also makes it possible to extend MPI_ACCUMULATE to
user-defined operations. Only registered op's can be used in MPI_ACCUMULATE.
It is the users responsibility that the same function has been registered
at both origin and target.
All basic datatypes and predefined operators are considered to be
preregistered, and also do not have to be deregistered.
A collective and a "sparse" variant are proposed. The latter is in analogy
with the START-POST synchronization model, and provided for the case
where only few processes have to (or do) know the type.
The functions operate on a communicator instead of a window, since
multiple windows may have been defined over the same communicator (or
END OF MOTIVATION
Registers a type over all processes in the communicator. This is a
collective operation. All processes provide the *same* datatype
(that is, types with the *same* type map - different processes may have
different handles). The operation (implicitly) provides a mapping from
local type handle to the handles on all other processes in comm. In
subsequent RMA operations on windows created over (subcommunicators of)
comm, datatype can be used as target type on all processes.
Registers a type over a group of processes. The operation is
collective over the processes in group AND the calling process which
do not necessarily have to be in group. If process i calls
MPI_Type_register_sparse then all other processes in group must
eventually call MPI_Type_register_sparse and i must be in to their
group argument. After the call the datatype is registered by all
processes in group, and can be used as a target type in one-sided
This local operation deregisters datatype. Registered datatypes must be
deregistered before they can be freed.
The same mechanism can be used to extend MPI_ACCUMULATE to user-defined
operations. The same user defined function (handle) can be registered at
More information about the mpiwg-rma