IBM Books

MPI Subroutine Reference

MPI_COMM_COMPARE, MPI_Comm_compare

Purpose

Compares the groups and context of two communicators.

C synopsis

#include <mpi.h>
int MPI_Comm_compare(MPI_Comm comm1,MPI_Comm comm2,int *result);

C++ synopsis

#include mpi.h
int MPI::Comm::Compare(const MPI::Comm& comm1, const MPI::Comm& comm2);

FORTRAN synopsis

include 'mpif.h' or use mpi
MPI_COMM_COMPARE(INTEGER COMM1,INTEGER COMM2,INTEGER RESULT,INTEGER IERROR)

Parameters

comm1
is the first communicator (handle) (IN)

comm2
is the second communicator (handle) (IN)

result
is an integer specifying the result. The defined values are: MPI_IDENT, MPI_CONGRUENT, MPI_SIMILAR, and MPI_UNEQUAL. (OUT)

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

Description

This subroutine compares the groups and contexts of two communicators. The following is an explanation of each MPI_COMM_COMPARE defined value:

MPI_IDENT
comm1 and comm2 are handles for the identical object

MPI_CONGRUENT
the underlying groups are identical in constituents and rank order (both local and remote groups for intercommunications), but are different in context

MPI_SIMILAR
the group members of both communicators are the same, but are different in rank order (both local and remote groups for intercommunication),

MPI_UNEQUAL
if none of the above.

Errors

Invalid communicator(s)

MPI not initialized

MPI already finalized

Related information

MPI_GROUP_COMPARE


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