MPIL_COMM_ID(2)

NAME
MPIL_Comm_id, MPIL_Comm_gps, MPIL_Type_id - Get useful LAM information from opaque MPI objects.

C SYNOPSIS
#include <mpi.h>
int MPIL_Comm_id (MPI_Comm comm, int *id);
int MPIL_Comm_gps (MPI_Comm comm, int rank, int *node, int *pid);
int MPIL_Type_id (MPI_Datatype dtype, int *id);

FORTRAN SYNOPSIS
subroutine MPIL_COMM_ID (comm, id, ierr)
subroutine MPIL_COMM_GPS (comm, rank, node, pid, ierr)
subroutine MPIL_TYPE_ID (dtype, id, ierr)
integer comm, dtype, id, rank, node, pid, ierr

DESCRIPTION
In the LAM implementation of MPI, each communicator has an integer context ID associated with it for synchronizing on different contexts. This ID is global to all the processes in the communicator's group, and uniquely identifies that communicator for each process. These properties allow the processes to safely exchange messages without interference from operations on other communicators.

The MPI standard does not provide a way to access/view this implementation-dependent synchronization since communicators are opaque objects. Users do not need such access for normal MPI operations. On the other hand, when debugging MPI applications, the opaque nature of communicators hinders the user's efforts. This is especially true on fully observable systems such as LAM, where users can monitor the full state of the processes and message queues, which includes the context ID (see mpitask(1) and mpimsg(1)).

Likewise, datatypes are opaque objects and the user needs to cross-reference the datatypes displayed by the LAM development tools with the objects within the application program.

The context ID is obtained from a communicator with MPIL_Comm_id(). The datatype ID is obtained from a datatype with MPIL_Type_id().

LAM supplementary functions do not operate with communicators and ranks but with nodes and process identifiers. MPIL_Comm_gps() accepts the MPI values and returns the LAM values. In the case of an intercommunicator the values returned are those of the process with the given rank in the remote group.

SEE ALSO
mpimsg(1), mpitask(1)