1MPIL_Comm_id(3)                     LAM/MPI                    MPIL_Comm_id(3)
2
3
4

NAME

6       MPIL_Comm_id  -   LAM/MPI-specific function to return the context ID of
7       the communicator
8

SYNOPSIS

10       #include <mpi.h>
11       int
12       MPIL_Comm_id(MPI_Comm comm, int *pcid)
13

INPUT PARAMETER

15       comm   - communicator (handle)
16
17

OUTPUT PARAMETER

19       pcid   - communicator context id (integer)
20
21

NOTES

23       In the LAM implementation of MPI, each communicator has an integer con‐
24       text  ID  associated  with  it for synchronizing on different contexts.
25       This ID is global to all the processes in the communicator's group, and
26       uniquely  identifies that communicator for each process.  These proper‐
27       ties allow the processes to safely exchange messages without  interfer‐
28       ence from operations on other communicators.
29
30       The MPI standard does not provide a way to access/view this implementa‐
31       tion-dependent synchronization since communicators are opaque  objects.
32       Users  do not need such access for normal MPI operations.  On the other
33       hand, when debugging MPI applications, the opaque nature of  communica‐
34       tors  hinders  the  user's  efforts.   This is especially true on fully
35       observable systems such as LAM, where users can monitor the full  state
36       of the processes and message queues, which includes the context ID (see
37       mpitask (1) and mpimsg (1)).
38
39       This is a LAM/MPI-specific function and is intended mainly  for  debug‐
40       ging.   If this function is used, it should be used in conjunction with
41       the LAM_MPI C preprocessor macro
42
43       #if LAM_MPI
44       int cid;
45       MPIL_Comm_id(MPI_COMM_WORLD, &cid);
46       #endif
47
48
49

NOTES FOR FORTRAN

51       All MPI routines in Fortran (except for MPI_WTIME and MPI_WTICK )  have
52       an  additional  argument ierr at the end of the argument list.  ierr is
53       an integer and has the same meaning as the return value of the  routine
54       in  C.   In Fortran, MPI routines are subroutines, and are invoked with
55       the call statement.
56
57       All MPI objects (e.g., MPI_Datatype , MPI_Comm ) are of type INTEGER in
58       Fortran.
59
60

ERRORS

62       If an error occurs in an MPI function, the current MPI error handler is
63       called to handle it.  By default, this error  handler  aborts  the  MPI
64       job.   The  error  handler may be changed with MPI_Errhandler_set ; the
65       predefined error handler MPI_ERRORS_RETURN may be used to  cause  error
66       values  to  be  returned  (in C and Fortran; this error handler is less
67       useful in with the C++ MPI  bindings.   The  predefined  error  handler
68       MPI::ERRORS_THROW_EXCEPTIONS  should  be used in C++ if the error value
69       needs to be recovered).  Note that MPI does not guarantee that  an  MPI
70       program can continue past an error.
71
72       All  MPI  routines  (except  MPI_Wtime  and MPI_Wtick ) return an error
73       value; C routines as the value of the function and Fortran routines  in
74       the  last  argument.  The C++ bindings for MPI do not return error val‐
75       ues; instead, error values are communicated by throwing  exceptions  of
76       type  MPI::Exception  (but not by default).  Exceptions are only thrown
77       if the error value is not MPI::SUCCESS .
78
79
80       Note that if the MPI::ERRORS_RETURN handler is set in  C++,  while  MPI
81       functions  will  return  upon an error, there will be no way to recover
82       what the actual error value was.
83       MPI_SUCCESS
84              - No error; MPI routine completed successfully.
85       MPI_ERR_COMM
86              - Invalid communicator.  A common error is to use a null  commu‐
87              nicator in a call (not even allowed in MPI_Comm_rank ).
88       MPI_ERR_ARG
89              - Invalid argument.  Some argument is invalid and is not identi‐
90              fied by a specific  error  class.   This  is  typically  a  NULL
91              pointer or other such error.
92
93

SEE ALSO

95       MPIL_Comm_gps, MPIL_Type_id
96

LOCATION

98       mpil_id.c
99
100
101
102LAM/MPI 7.1.2                      2/23/2006                   MPIL_Comm_id(3)
Impressum