1MPI_Comm_accept(3) LAM/MPI MPI_Comm_accept(3)
2
3
4
6 MPI_Comm_accept - Accept a connection from another MPI process
7
9 #include <mpi.h>
10 int
11 MPI_Comm_accept(char *port_name, MPI_Info info, int root, MPI_Comm comm,
12 MPI_Comm *newcomm)
13
15 port_name
16 - port name (only used at root)
17 info - extra information handle (only used at root)
18 root - rank in comm of root node
19 comm - intracommunicator over which the call is collective
20
21
23 newcomm
24 - intercommunicator with client as remote group
25
26
28 The MPI_Comm_accept and MPI_Comm_connect calls simulate the well-under‐
29 stood accept() / connect() semantics of standard socket programming --
30 a client "connects" to a server.
31
32 LAM/MPI allows for previously-unrelated MPI programs to join into a MPI
33 program with these calls. Both MPI programs must be running by the
34 same user in the same LAM universe (i.e., in the scope of a single lam‐
35 boot).
36
37
39 All MPI routines in Fortran (except for MPI_WTIME and MPI_WTICK ) have
40 an additional argument ierr at the end of the argument list. ierr is
41 an integer and has the same meaning as the return value of the routine
42 in C. In Fortran, MPI routines are subroutines, and are invoked with
43 the call statement.
44
45 All MPI objects (e.g., MPI_Datatype , MPI_Comm ) are of type INTEGER in
46 Fortran.
47
48
50 The IMPI standard only supports MPI-1 functions. Hence, this function
51 is currently not designed to operate within an IMPI job.
52
53
55 If an error occurs in an MPI function, the current MPI error handler is
56 called to handle it. By default, this error handler aborts the MPI
57 job. The error handler may be changed with MPI_Errhandler_set ; the
58 predefined error handler MPI_ERRORS_RETURN may be used to cause error
59 values to be returned (in C and Fortran; this error handler is less
60 useful in with the C++ MPI bindings. The predefined error handler
61 MPI::ERRORS_THROW_EXCEPTIONS should be used in C++ if the error value
62 needs to be recovered). Note that MPI does not guarantee that an MPI
63 program can continue past an error.
64
65 All MPI routines (except MPI_Wtime and MPI_Wtick ) return an error
66 value; C routines as the value of the function and Fortran routines in
67 the last argument. The C++ bindings for MPI do not return error val‐
68 ues; instead, error values are communicated by throwing exceptions of
69 type MPI::Exception (but not by default). Exceptions are only thrown
70 if the error value is not MPI::SUCCESS .
71
72
73 Note that if the MPI::ERRORS_RETURN handler is set in C++, while MPI
74 functions will return upon an error, there will be no way to recover
75 what the actual error value was.
76 MPI_SUCCESS
77 - No error; MPI routine completed successfully.
78 MPI_ERR_COMM
79 - Invalid communicator. A common error is to use a null commu‐
80 nicator in a call (not even allowed in MPI_Comm_rank ).
81 MPI_ERR_ROOT
82 - Invalid root. The root must be specified as a rank in the
83 communicator. Ranks must be between zero and the size of the
84 communicator minus one.
85 MPI_ERR_ARG
86 - Invalid argument. Some argument is invalid and is not identi‐
87 fied by a specific error class. This is typically a NULL
88 pointer or other such error.
89 MPI_ERR_INTERN
90 - An internal error has been detected. This is fatal. Please
91 send a bug report to the LAM mailing list (see http://www.lam-
92 mpi.org/contact.php ).
93 MPI_ERR_OTHER
94 - Other error; use MPI_Error_string to get more information
95 about this error code.
96 MPI_ERR_FLAGS
97 - Mismatch of run-time flags. For example, an MPI process that
98 is running in lamd mode cannot spawn or be connected to a
99 process that is running in c2c mode.
100
101
103 MPI_Close_port(3), MPI_Comm_connect(3), MPI_Comm_disconnect(3),
104 MPI_Open_port(3)
105
106
108 For more information, please see the official MPI Forum web site, which
109 contains the text of both the MPI-1 and MPI-2 standards. These docu‐
110 ments contain detailed information about each MPI function (most of
111 which is not duplicated in these man pages).
112
113 http://www.mpi-forum.org/
114
116 accept.c
117
118
119
120LAM/MPI 7.1.2 2/23/2006 MPI_Comm_accept(3)