[Mpi-22] determine if running in a heterogenous environment

Dries Kimpe Dries.Kimpe at [hidden]
Sun Mar 2 06:01:16 CST 2008


Below: proposal for MPI-2.2 that adds support for querying if a
communicator is heterogenous. 

----------------------------------------------------------------------------
Proposal:
----------------------------------------------------------------------------

Provide some method to determine if a communicator is heterogenous.

There are a number of different possibilities to provide this capability:

1) Provide a predefined integer valued attribute which can be used to query a 
communicator.  (for example MPI_HETEROGENOUS)

-- or --

2) Create a seperate function: MPI_Comm_is_heterogenous (MPI_Comm comm,
int * flag); 

----------------------------------------------------------------------------
Rationale:
----------------------------------------------------------------------------

Currently, MPI-2.0 does not provide a portable way for an application to
determine if it is running in a heterogenous environment.

Some applications are not written with heterogenous environments in mind;
They do not (always) use correct datatype descriptions when sending or
receiving data, but instead treat the data as an array of bytes,
relying on all datatypes having the same memory representation on both
sender and receiver. Most often, this is done to avoid the added complexity
of creating the correct datatypes. 

Although the pack/unpack functions provide an alternative, the do not have
the same memory requirements (need an extra buffer to receive the data) or
performance characteristics (need an extra copy).

Adding a way for an application to test if it is currently running in a
heterogenous environment enables it take appropriate action (aborting,
switching to type-safe functions, ...)

The MPI implementation -- if it supports heterogenous environments --
already needs to determine this information because it is responsible for
performing type conversions in heterogenous communicators. 

Providing this information on a per-communicator base instead of returning
it for the whole MPI_UNIVERSE / MPI_COMM_WORLD enables both the MPI
implementation and the user application to avoid overhead 
in case of a homogenous communicator that is a subset of an inhomogenous
MPI_COMM_WORLD.

----------------------------------------------------------------------------
Alternative ways to get the same information without modifying the standard:
----------------------------------------------------------------------------

* Store information about the architecture when compiling the application;
Compare this information at runtime with all other members of the
communicator.

* (not 100% correct): calculate at run time the size of a number of
 elementary datatypes, compare information with the other ranks in the
 communicator. 







* 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 01-part
Type: application/pgp-signature
Size: 190 bytes
Desc: not available
URL: <http://lists.mpi-forum.org/pipermail/mpi-22/attachments/20080302/a9020fd9/attachment.pgp>


More information about the Mpi-22 mailing list