Purpose
Creates an intercommunicator from two intracommunicators.
C synopsis
#include <mpi.h>
int MPI_Intercomm_create(MPI_Comm local_comm,int local_leader,
MPI_Comm peer_comm,int remote_leader,int tag,MPI_Comm *newintercom);
C++ synopsis
#include mpi.h MPI::Intercomm MPI::Intracomm::Create_intercomm(int local_leader, const MPI::Comm& peer_comm, int remote_leader, int tag) const;
FORTRAN synopsis
include 'mpif.h' or use mpi
MPI_INTERCOMM_CREATE(INTEGER LOCAL_COMM,INTEGER LOCAL_LEADER,
INTEGER PEER_COMM,INTEGER REMOTE_LEADER,INTEGER TAG,
INTEGER NEWINTERCOM,INTEGER IERROR)
Parameters
Description
This subroutine creates an intercommunicator from two intracommunicators and is collective over the union of the local and the remote groups. Tasks should provide identical local_comm and local_leader arguments within each group. Wildcards are not permitted for remote_leader, local_leader, and tag.
MPI_INTERCOMM_CREATE uses point-to-point communication with communicator peer_comm and tag tag between the leaders. Make sure that there are no pending communications on peer_comm that could interfere with this communication. It is recommended that you use a dedicated peer communicator, such as a duplicate of MPI_COMM_WORLD, to avoid trouble with peer communicators.
Errors
Related information