-- Nathan Doss doss@ERC.MsState.Edu
Subject -------
Proposal for the addition of a new communicator id attribute for communicators.
Problem -------
MPI does not provide a simple method for profiling and debugging libraries to distinguish communicators. Already, one public domain implementation (LAM) has added a new "MPI" function to allow users to obtain this information. Access to a communicator id will probably be a common value libraries want to get at for purposes such as data filtering. It is possible for a profiling library to generate an id in a portable fashion, but not without additional communication overhead.
Solutions ---------
MPI could provide access to the communicator ID by one of the following methods:
1. Add a new function to MPI MPI_COMM_ID ( comm, id ) IN comm a communicator OUT id a communicator id
2. Add a predefined attribute to every communicator:
MPI_COMM_ID Integer ID for a communicator
The semantics of the id would be one of the following:
A. The value is process-unique. No two communicators in the same process will have the same id. The same communicator in two separate processes may or may not have the same id. Two different communicators in separate processes may or may not have the same id.
B. The value is globally unique for each communicator. The same communicator in two separate processes will have the same id. Different communicators will never have the same id.
C. The value is process-unique and consistent throughout a communicator. No two communicators in the same process will have the same id. The id for a communicator will be the same for all processes belonging to the communicator. Two non-overlapping communicators may have the same communicator id.
Suggested solution ------------------
[1 or 2].C
Solution A would not be all that useful. Solution B can be obtained by combining the C communicator id with the world rank of the first process in the communicator. Solution C fits how contexts are currently allocated in MPICH and LAM.
Whether or not this is a new function or an attribute or something else should be consistent with how other internal information is made available.