1 | .\"Copyright 2006-2008 Sun Microsystems, Inc. |
---|
2 | .\" Copyright (c) 1996 Thinking Machines Corporation |
---|
3 | .TH MPI_Comm_create 3 "Dec 08, 2009" "1.4" "Open MPI" |
---|
4 | .SH NAME |
---|
5 | \fBMPI_Comm_create\fP \- Creates a new communicator. |
---|
6 | |
---|
7 | .SH SYNTAX |
---|
8 | .ft R |
---|
9 | .SH C Syntax |
---|
10 | .nf |
---|
11 | #include <mpi.h> |
---|
12 | int MPI_Comm_create(MPI_Comm \fIcomm\fP, MPI_Group\fI group\fP, MPI_Comm\fI *newcomm\fP) |
---|
13 | |
---|
14 | .SH Fortran Syntax |
---|
15 | .nf |
---|
16 | INCLUDE 'mpif.h' |
---|
17 | MPI_COMM_CREATE(\fICOMM, GROUP, NEWCOMM, IERROR\fP) |
---|
18 | INTEGER \fICOMM, GROUP, NEW, IERROR\fP |
---|
19 | |
---|
20 | .SH C++ Syntax |
---|
21 | .nf |
---|
22 | #include <mpi.h> |
---|
23 | MPI::Intercomm MPI::Intercomm::Create(const Group& \fIgroup\fP) const |
---|
24 | |
---|
25 | MPI::Intracomm MPI::Intracomm::Create(const Group& \fIgroup\fP) const |
---|
26 | |
---|
27 | .SH INPUT PARAMETER |
---|
28 | .ft R |
---|
29 | .TP 1i |
---|
30 | comm |
---|
31 | Communicator (handle). |
---|
32 | .TP 1i |
---|
33 | group |
---|
34 | Group, which is a subset of the group of comm (handle). |
---|
35 | |
---|
36 | .SH OUTPUT PARAMETERS |
---|
37 | .ft R |
---|
38 | .TP 1i |
---|
39 | newcomm |
---|
40 | New communicator (handle). |
---|
41 | .ft R |
---|
42 | .TP 1i |
---|
43 | IERROR |
---|
44 | Fortran only: Error status (integer). |
---|
45 | |
---|
46 | .SH DESCRIPTION |
---|
47 | .ft R |
---|
48 | This function creates a new communicator newcomm with communication group |
---|
49 | defined by group and a new context. The function sets \fInewcomm\fR to a new communicator that spans all the processes that are in the group. It sets \fInewcomm\fR to MPI_COMM_NULL for processes that are not in the group. The call is erroneous if not all group arguments have the same value, or if group is not a subset of the group associated with comm. Note that the call must be executed by all processes in comm, even if they do not belong to the new group. |
---|
50 | .sp |
---|
51 | .LP |
---|
52 | |
---|
53 | .SH NOTES |
---|
54 | MPI_Comm_create provides a means of making a subset of processes for the purpose of separate MIMD computation, with separate communication space. \fInewcomm\fR, which is created by MPI_Comm_create, can be used in subsequent calls to MPI_Comm_create (or other communicator constructors) to further subdivide a computation into parallel sub-computations. A more general service is provided by MPI_Comm_split. |
---|
55 | |
---|
56 | .SH ERRORS |
---|
57 | Almost all MPI routines return an error value; C routines as the value of the function and Fortran routines in the last argument. C++ functions do not return errors. If the default error handler is set to MPI::ERRORS_THROW_EXCEPTIONS, then on error the C++ exception mechanism will be used to throw an MPI:Exception object. |
---|
58 | .sp |
---|
59 | Before the error value is returned, the current MPI error handler is |
---|
60 | called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. |
---|
61 | |
---|
62 | .SH SEE ALSO |
---|
63 | .ft R |
---|
64 | .sp |
---|
65 | MPI_Comm_split |
---|
66 | .sp |
---|
67 | MPI_Intercomm_create |
---|
68 | |
---|