IBM Books

MPI Subroutine Reference

MPI_INTERCOMM_CREATE, MPI_Intercomm_create

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

local_comm
is the local intracommunicator (handle) (IN)

local_leader
is an integer specifying the rank of local group leader in local_comm (IN)

peer_comm
is the "peer" intracommunicator (significant only at the local_leader) (handle) (IN)

remote_leader
is the rank of the remote group leader in peer_comm (significant only at the local_leader) (integer) (IN)

tag
"safe" tag (integer) (IN)

newintercom
is the new intercommunicator (handle) (OUT)

IERROR
is the FORTRAN return code. It is always the last argument.

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

Conflicting collective operations on communicator

Invalid communicator(s)

Invalid communicator type(s)
must be intracommunicator(s)

Invalid rank(s)
rank < 0 or rank > = groupsize

Invalid tag
tag < 0

MPI not initialized

MPI already finalized

Related information

MPI_COMM_DUP
MPI_INTERCOMM_MERGE


[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]