IBM Books

MPI Subroutine Reference

MPI_INTERCOMM_MERGE, MPI_Intercomm_merge

Purpose

Creates an intracommunicator by merging the local and remote groups of an intercommunicator.

C synopsis

#include <mpi.h>
int MPI_Intercomm_merge(MPI_Comm intercomm,int high,
			MPI_Comm *newintracomm);

C++ synopsis

#include mpi.h
MPI::Intracomm MPI::Intercomm::Merge(bool high);

FORTRAN synopsis

include 'mpif.h' or use mpi
MPI_INTERCOMM_MERGE(INTEGER INTERCOMM,INTEGER HIGH,
		    INTEGER NEWINTRACOMM,INTEGER IERROR)

Parameters

intercomm
is the intercommunicator (handle) (IN)

high
(logical) (IN)

newintracomm
is the new intracommunicator (handle) (OUT)

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

Description

This subroutine creates an intracommunicator from the union of two groups associated with intercomm. Tasks should provide the same high value within each of the two groups. If tasks in one group provide the value high = false and tasks in the other group provide the value high = true, the union orders the "low" group before the "high" group. If all tasks provided the same high argument, the order of the union is arbitrary. MPI_INTERCOMM_MERGE is blocking and collective within the union of the two groups.

Errors

Invalid communicator

Invalid communicator type
must be intercommunicator

Inconsistent high within group

MPI not initialized

MPI already finalized

Related information
MPI_INTERCOMM_CREATE


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