1MPIL_Comm_gps(3) LAM/MPI MPIL_Comm_gps(3)
2
3
4
6 MPIL_Comm_gps - LAM/MPI-specific function to return the GPS informa‐
7 tion of a given rank from a communicator
8
10 #include <mpi.h>
11 int MPIL_Comm_gps(MPI_Comm comm, int rank, int *pnid,
12 int *ppid)
13
15 comm - communicator (handle)
16 rank - rank of process to query (integer)
17
18
20 pnid - LAM node ID
21 ppid - LAM process ID
22
23
25 In the LAM implementation of MPI, each communicator has an integer con‐
26 text ID associated with it for synchronizing on different contexts.
27 This ID is global to all the processes in the communicator's group, and
28 uniquely identifies that communicator for each process. These proper‐
29 ties allow the processes to safely exchange messages without interfer‐
30 ence from operations on other communicators.
31
32 The MPI standard does not provide a way to access/view this implementa‐
33 tion-dependent synchronization since communicators are opaque objects.
34 Users do not need such access for normal MPI operations. On the other
35 hand, when debugging MPI applications, the opaque nature of communica‐
36 tors hinders the user's efforts. This is especially true on fully
37 observable systems such as LAM, where users can monitor the full state
38 of the processes and message queues, which includes the context ID (see
39 mpitask (1) and mpimsg (1)).
40
41 LAM supplementary functions do not operate with communicators and ranks
42 but with nodes and process identifiers. MPIL_Comm_gps accepts the MPI
43 values and returns the LAM values. In the case of an intercommunicator
44 the values returned are those of the process with the given rank in the
45 remote group.
46
47 This is a LAM/MPI-specific function and is intended mainly for debug‐
48 ging. If this function is used, it should be used in conjunction with
49 the LAM_MPI C preprocessor macro
50
51 #if LAM_MPI
52 int nid, pid;
53 MPIL_Comm_gps(MPI_COMM_WORLD, 0, &nid, &pid);
54 #endif
55
56
57
59 All MPI routines in Fortran (except for MPI_WTIME and MPI_WTICK ) have
60 an additional argument ierr at the end of the argument list. ierr is
61 an integer and has the same meaning as the return value of the routine
62 in C. In Fortran, MPI routines are subroutines, and are invoked with
63 the call statement.
64
65 All MPI objects (e.g., MPI_Datatype , MPI_Comm ) are of type INTEGER in
66 Fortran.
67
68
70 If an error occurs in an MPI function, the current MPI error handler is
71 called to handle it. By default, this error handler aborts the MPI
72 job. The error handler may be changed with MPI_Errhandler_set ; the
73 predefined error handler MPI_ERRORS_RETURN may be used to cause error
74 values to be returned (in C and Fortran; this error handler is less
75 useful in with the C++ MPI bindings. The predefined error handler
76 MPI::ERRORS_THROW_EXCEPTIONS should be used in C++ if the error value
77 needs to be recovered). Note that MPI does not guarantee that an MPI
78 program can continue past an error.
79
80 All MPI routines (except MPI_Wtime and MPI_Wtick ) return an error
81 value; C routines as the value of the function and Fortran routines in
82 the last argument. The C++ bindings for MPI do not return error val‐
83 ues; instead, error values are communicated by throwing exceptions of
84 type MPI::Exception (but not by default). Exceptions are only thrown
85 if the error value is not MPI::SUCCESS .
86
87
88 Note that if the MPI::ERRORS_RETURN handler is set in C++, while MPI
89 functions will return upon an error, there will be no way to recover
90 what the actual error value was.
91 MPI_SUCCESS
92 - No error; MPI routine completed successfully.
93 MPI_ERR_COMM
94 - Invalid communicator. A common error is to use a null commu‐
95 nicator in a call (not even allowed in MPI_Comm_rank ).
96 MPI_ERR_RANK
97 - Invalid source or destination rank. Ranks must be between
98 zero and the size of the communicator minus one; ranks in a
99 receive ( MPI_Recv , MPI_Irecv , MPI_Sendrecv , etc.) may also
100 be MPI_ANY_SOURCE .
101
102 MPI_ERR_ARG
103 - Invalid argument. Some argument is invalid and is not identi‐
104 fied by a specific error class. This is typically a NULL
105 pointer or other such error.
106
107
109 MPIL_Comm_id, MPIL_Type_id
110
112 mpil_id.c
113
114
115
116LAM/MPI 7.1.2 2/23/2006 MPIL_Comm_gps(3)