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

NAME

6       MPI_Intercomm_create  -  Creates an intercommuncator from two intracom‐
7       municators
8

SYNOPSIS

10       #include <mpi.h>
11       int MPI_Intercomm_create(MPI_Comm lcomm, int lleader,
12                              MPI_Comm pcomm, int pleader, int tag,
13                              MPI_Comm *newcomm)
14

INPUT PARAMTERS

16       lcomm  - Local (intra)communicator
17       lleader
18              - Rank in local_comm of leader (often 0)
19       pcomm  - Remote communicator
20       pleader
21              - Rank in peer_comm of remote leader (often 0)
22       tag    - Message tag to use in constructing intercommunicator; if  mul‐
23              tiple MPI_Intercomm_creates are being made, they should use dif‐
24              ferent tags (more precisely, ensure that the  local  and  remote
25              leaders  are  using different tags for each MPI_intercomm_create
26              ).
27
28

OUTPUT PARAMETER

30       newcomm
31              - Created intercommunicator
32
33

NOTES

35       The MPI 1.1 Standard contains two mutually exclusive  comments  on  the
36       input intracommunicators.  One says that their repective groups must be
37       disjoint; the other that the leaders can be the  same  process.   After
38       some  discussion  by the MPI Forum, it has been decided that the groups
39       must be disjoint.  Note that the reason given for this in the  standard
40       is  not  the  reason  for  this choice; rather, the other operations on
41       intercommunicators (like MPI_Intercomm_merge ) do not make sense if the
42       groups are not disjoint.
43
44

NOTES FOR FORTRAN

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

ERRORS

57       If an error occurs in an MPI function, the current MPI error handler is
58       called  to  handle  it.   By default, this error handler aborts the MPI
59       job.  The error handler may be changed with  MPI_Errhandler_set  ;  the
60       predefined  error  handler MPI_ERRORS_RETURN may be used to cause error
61       values to be returned (in C and Fortran; this  error  handler  is  less
62       useful  in  with  the  C++  MPI bindings.  The predefined error handler
63       MPI::ERRORS_THROW_EXCEPTIONS should be used in C++ if the  error  value
64       needs  to  be recovered).  Note that MPI does not guarantee that an MPI
65       program can continue past an error.
66
67       All MPI routines (except MPI_Wtime and  MPI_Wtick  )  return  an  error
68       value;  C routines as the value of the function and Fortran routines in
69       the last argument.  The C++ bindings for MPI do not return  error  val‐
70       ues;  instead,  error values are communicated by throwing exceptions of
71       type MPI::Exception (but not by default).  Exceptions are  only  thrown
72       if the error value is not MPI::SUCCESS .
73
74
75       Note  that  if  the MPI::ERRORS_RETURN handler is set in C++, while MPI
76       functions will return upon an error, there will be no  way  to  recover
77       what the actual error value was.
78       MPI_SUCCESS
79              - No error; MPI routine completed successfully.
80       MPI_ERR_COMM
81              -  Invalid communicator.  A common error is to use a null commu‐
82              nicator in a call (not even allowed in MPI_Comm_rank ).
83       MPI_ERR_TAG
84              - Invalid tag argument.  Tags must be non-negative;  tags  in  a
85              receive  ( MPI_Recv , MPI_Irecv , MPI_Sendrecv , etc.)  may also
86              be MPI_ANY_TAG .  The largest tag value is available through the
87              the attribute MPI_TAG_UB .
88
89       MPI_ERR_ARG
90              - Invalid argument.  Some argument is invalid and is not identi‐
91              fied by a specific  error  class.   This  is  typically  a  NULL
92              pointer or other such error.
93       MPI_ERR_OTHER
94              - This error is returned when some part of the LAM/MPI implemen‐
95              tation is unable to acquire memory.
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
103

SEE ALSO

105       MPI_Intercomm_merge, MPI_Comm_free, MPI_Comm_remote_group,
106       MPI_Comm_remote_size
107
108

MORE INFORMATION

110       For more information, please see the official MPI Forum web site, which
111       contains the text of both the MPI-1 and MPI-2 standards.   These  docu‐
112       ments  contain  detailed  information  about each MPI function (most of
113       which is not duplicated in these man pages).
114
115       http://www.mpi-forum.org/
116
117
118

ACKNOWLEDGEMENTS

120       The LAM Team would like the thank the MPICH Team for the handy  program
121       to  generate  man  pages ("doctext" from ftp://ftp.mcs.anl.gov/pub/sow‐
122       ing/sowing.tar.gz ), the initial formatting, and some initial text  for
123       most of the MPI-1 man pages.
124

LOCATION

126       iccreate.c
127
128
129
130LAM/MPI 7.1.2                      2/23/2006           MPI_Intercomm_create(3)
Impressum