Package mpi

# Class Intercomm

java.lang.Object
mpi.Comm
mpi.Intercomm

All Implemented Interfaces:
  `Cloneable`, `Freeable`

public final class Intercomm extends Comm
This class represents intercommunicators.

## Field Summary

### Fields inherited from class mpi.Comm

`handle, SELF, TYPE_SHARED, WORLD`

## Constructor Summary

Constructors
Modifier
Constructor
Description
`protected`
`Intercomm(long handle)`
`protected`
`Intercomm(long[] commRequest)`

## Method Summary

Modifier and Type
Method
Description
`Intercomm`
`clone()`
Duplicates this communicator.
`Intercomm`
`dup()`
Duplicates this communicator.
`Intercomm`
`dupWithInfo(Info info)`
Duplicates this communicator with the info object used in the call.
`static Intercomm`
`getParent()`
Java binding of `MPI_COMM_GET_PARENT`.
`Group`
`getRemoteGroup()`
Return the remote group.
`int`
`getRemoteSize()`
Size of remote group.
`Intercomm`
`iDup()`
Duplicates this communicator.
`Intracomm`
`merge(boolean high)`
Creates an intracommuncator from an intercommunicator

### Methods inherited from class mpi.Comm

`abort, allGather, allGather, allGatherv, allGatherv, allReduce, allReduce, allToAll, allToAllv, allToAllw, barrier, bcast, bSend, bSendInit, callErrhandler, compare, createIntercomm, createKeyval, deleteAttr, disconnect, dup, dupWithInfo, free, freeKeyval, gather, gather, gatherv, gatherv, gatherv, getAttr, getErrhandler, getGroup, getInfo, getName, getRank, getRequest, getSize, getTopology, iAllGather, iAllGather, iAllGatherv, iAllGatherv, iAllReduce, iAllReduce, iAllToAll, iAllToAllv, iAllToAllw, iBarrier, iBcast, ibSend, iDup, iGather, iGather, iGatherv, iGatherv, iGatherv, iNeighborAllGather, iNeighborAllGatherv, iNeighborAllToAll, iNeighborAllToAllv, iProbe, iRecv, iReduce, iReduce, iReduceScatter, iReduceScatter, iReduceScatterBlock, iReduceScatterBlock, irSend, iScatter, iScatter, iScatterv, iScatterv, iScatterv, iSend, isInter, isNull, isSend, neighborAllGather, neighborAllGatherv, neighborAllToAll, neighborAllToAllv, pack, packSize, probe, recv, recvInit, reduce, reduce, reduceLocal, reduceScatter, reduceScatter, reduceScatterBlock, reduceScatterBlock, rSend, rSendInit, scatter, scatter, scatterv, scatterv, scatterv, send, sendInit, sendRecv, sendRecvReplace, setAttr, setErrhandler, setInfo, setName, setType, sSend, sSendInit, unpack`

### Methods inherited from class java.lang.Object

`equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Constructor Details

### Intercomm

protected Intercomm(long handle)

### Intercomm

protected Intercomm(long[] commRequest)

## Method Details

### clone

public Intercomm clone()
Duplicates this communicator.

Java binding of `MPI_COMM_DUP`.

It is recommended to use `dup()` instead of `clone()` because the last can't throw an `MPIException`.

Overrides:
  `clone` in class `Comm`
Returns:
  copy of this communicator

### dup

public Intercomm dup() throws MPIException
Duplicates this communicator.

Java binding of `MPI_COMM_DUP`.

Overrides:
  `dup` in class `Comm`
Returns:
  copy of this communicator
Throws:
  `MPIException` - Signals that an MPI exception of some sort has occurred.

### iDup

public Intercomm iDup() throws MPIException
Duplicates this communicator.

Java binding of `MPI_COMM_IDUP`.

The new communicator can't be used before the operation completes. The request object must be obtained calling `Comm.getRequest()`.

Overrides:
  `iDup` in class `Comm`
Returns:
  copy of this communicator
Throws:
  `MPIException` - Signals that an MPI exception of some sort has occurred.

### dupWithInfo

public Intercomm dupWithInfo(Info info) throws MPIException
Duplicates this communicator with the info object used in the call.

Java binding of `MPI_COMM_DUP_WITH_INFO`.

Overrides:
  `dupWithInfo` in class `Comm`
Parameters:
  `info` - info object to associate with the new communicator
Returns:
  copy of this communicator
Throws:
  `MPIException` - Signals that an MPI exception of some sort has occurred.

### getRemoteSize

public int getRemoteSize() throws MPIException
Size of remote group.

Java binding of the MPI operation `MPI_COMM_REMOTE_SIZE`.

Returns:
  number of process in remote group of this communicator
Throws:
  `MPIException` - Signals that an MPI exception of some sort has occurred.

### getRemoteGroup

public Group getRemoteGroup() throws MPIException
Return the remote group.

Java binding of the MPI operation `MPI_COMM_REMOTE_GROUP`.

Returns:
  remote group of this communicator
Throws:
  `MPIException` - Signals that an MPI exception of some sort has occurred.

### merge

public Intracomm merge(boolean high) throws MPIException
Creates an intracommuncator from an intercommunicator

Java binding of the MPI operation `MPI_INTERCOMM_MERGE`.

Parameters:
  `high` - true if the local group has higher ranks in combined group
Returns:
  new intra-communicator
Throws:
  `MPIException` - Signals that an MPI exception of some sort has occurred.

### getParent

public static Intercomm getParent() throws MPIException
Java binding of `MPI_COMM_GET_PARENT`.

Returns:
  the parent communicator
Throws:
  `MPIException` - Signals that an MPI exception of some sort has occurred.