|
SSP Project Summary: MPI Datatypes Toolset |
|
|
|
One of the major areas of difficulty in using MPI is in defining MPI derived datatypes that match application data structures. Since MPI is a library it has no knowledge of the layout of program data determined by the compiler. Thus, layout information has to be acquired explicitly and fed into the MPI datatype constructors. This can be laborious and error-prone. These problems can be alleviated by development of an MPI datatypes toolset. Two ways in which assistance can be provided are:
#pragma MPIDT_STRUCT begin
struct MsgObj
{ unsigned char dest;
char data[MSG_LEN];
int crc;
};
#pragma MPIDT_STRUCT end
int MPIDT_create_struct_MsgObj(MPI_Datatype *newtype);
It is possible to provide a portable library of calls that create
datatypes for regular structures, such as the representation of a
column in an array that can be composed as though a basic type. (It
is relatively easy to define an MPI derived datatype with a stride
covering the correct distance in an array, but to compose this
datatype the extent must be adjusted. This adjustment is
possible but requires a detailed understanding of MPI datatype
construction.) The library should use only standard MPI datatype
constructors and so will be portable to any MPI implementation on any
platform.
Direction in the library development may benefit from a survey of use of MPI datatypes in various application areas. As an example, the prototype of a datatype constructor analogous to the Process Topologies sub-space partition, for data arrays, is given below.
MPIDT_ARRAY_SUB(eltype, ndims, dims, remain, newtype)
IN eltype basic datatype of element (handle)
IN ndims number of array dimensions (integer)
IN dims integer array of size ndims specifying
the array size in each dimension
IN remain logical array of size ndims specifying
the dimensions covered by newtype
OUT newtype new datatype (handle)
The suggested schedule for this project is as follows:
The extended datatype constructor library could be implemented in either C or Fortran. If this project were to involve a survey of applications use of MPI datatypes, some knowledge of computational science would be useful. This part of the project could be made more suitable for a student from Physical Sciences; it is possible that there would be a shortfall in project effort in restricting this project to the library development part.
Werner Augustin worked on this project.
Compressed PostScript of the project's final report is available here (53 kbytes) .
Webpage maintained by
mario@epcc.ed.ac.uk
|