1 | .\"Copyright 2006-2008 Sun Microsystems, Inc. |
---|
2 | .\" Copyright (c) 1996 Thinking Machines Corporation |
---|
3 | .TH MPI_Comm_join 3 "Dec 08, 2009" "1.4" "Open MPI" |
---|
4 | |
---|
5 | .SH NAME |
---|
6 | \fBMPI_Comm_join\fP \- Establishes communication between MPI jobs |
---|
7 | |
---|
8 | .SH SYNTAX |
---|
9 | .ft R |
---|
10 | |
---|
11 | .SH C Syntax |
---|
12 | .nf |
---|
13 | #include <mpi.h> |
---|
14 | int MPI_Comm_join(int \fIfd\fP, MPI_Comm *\fIintercomm\fP) |
---|
15 | |
---|
16 | .SH Fortran Syntax |
---|
17 | .nf |
---|
18 | INCLUDE 'mpif.h' |
---|
19 | MPI_COMM_JOIN(\fIFD, INTERCOMM, IERROR\fP) |
---|
20 | INTEGER \fIFD, INTERCOMM, IERROR\fP |
---|
21 | |
---|
22 | .SH C++ Syntax |
---|
23 | .nf |
---|
24 | #include <mpi.h> |
---|
25 | MPI::Intercomm MPI::Comm::Join(const int \fIfd\fP) |
---|
26 | |
---|
27 | .SH INPUT PARAMETER |
---|
28 | .ft R |
---|
29 | .TP 1i |
---|
30 | fd |
---|
31 | socket file descriptor (socket). |
---|
32 | |
---|
33 | .SH OUTPUT PARAMETERS |
---|
34 | .ft R |
---|
35 | .TP 1i |
---|
36 | intercomm |
---|
37 | Intercommunicator between processes (handle). |
---|
38 | .TP 1i |
---|
39 | IERROR |
---|
40 | Fortran only: Error status (integer). |
---|
41 | |
---|
42 | .SH DESCRIPTION |
---|
43 | .ft R |
---|
44 | MPI_Comm_join creates an intercommunicator from the union of two MPI |
---|
45 | processes that are connected by a socket. \fIfd\fP is a file |
---|
46 | descriptor representing a socket of type SOCK_STREAM (a two-way |
---|
47 | reliable byte-stream connection). Nonblocking I/O and asynchronous |
---|
48 | notification via SIGIO must not be enabled for the socket. The socket |
---|
49 | must be in a connected state, and must be quiescent when MPI_Comm_join |
---|
50 | is called. |
---|
51 | .sp |
---|
52 | MPI_Comm_join must be called by the process at each end of the |
---|
53 | socket. It does not return until both processes have called |
---|
54 | MPI_Comm_join. |
---|
55 | |
---|
56 | .SH NOTES |
---|
57 | .ft R |
---|
58 | There are no MPI library calls for opening and manipulating a socket. |
---|
59 | The socket \fIfd\fP can be opened using standard socket API calls. |
---|
60 | MPI uses the socket to bootstrap creation of the intercommunicator, |
---|
61 | and for nothing else. Upon return, the file descriptor will be open |
---|
62 | and quiescent. |
---|
63 | .sp |
---|
64 | In a multithreaded process, the application must ensure that other |
---|
65 | threads do not access the socket while one is in the midst of |
---|
66 | calling MPI_Comm_join. |
---|
67 | .sp |
---|
68 | The returned communicator will contain the two processes connected by |
---|
69 | the socket, and may be used to establish MPI communication with |
---|
70 | additional processes, through the usual MPI communicator-creation |
---|
71 | mechanisms. |
---|
72 | |
---|
73 | .SH ERRORS |
---|
74 | .ft R |
---|
75 | Almost all MPI routines return an error value; C routines as |
---|
76 | the value of the function and Fortran routines in the last argument. C++ |
---|
77 | functions do not return errors. If the default error handler is set to |
---|
78 | MPI::ERRORS_THROW_EXCEPTIONS, then on error the C++ exception mechanism |
---|
79 | will be used to throw an MPI:Exception object. |
---|
80 | .sp |
---|
81 | Before the error value is returned, the current MPI error handler is |
---|
82 | called. By default, this error handler aborts the MPI job, except for |
---|
83 | I/O function errors. The error handler may be changed with |
---|
84 | MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN |
---|
85 | may be used to cause error values to be returned. Note that MPI does not |
---|
86 | guarantee that an MPI program can continue past an error. |
---|
87 | .sp |
---|
88 | See the MPI man page for a full list of MPI error codes. |
---|
89 | |
---|
90 | .SH SEE ALSO |
---|
91 | .ft R |
---|
92 | .nf |
---|
93 | socket(3SOCKET) |
---|
94 | MPI_Comm_create |
---|
95 | MPI_Comm_group |
---|
96 | |
---|