Class CartComm
-
Field Summary
Fields inherited from class mpi.Comm
handle, SELF, TYPE_SHARED, WORLD
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionclone()
Duplicates this communicator.static void
createDims
(int nnodes, int[] dims) Select a balanced distribution of processes per coordinate direction.dup()
Duplicates this communicator.dupWithInfo
(Info info) Duplicates this communicator with the info object used in the call.int[]
getCoords
(int rank) Translate process rank to logical process coordinates.int
getRank
(int[] coords) Translate logical process coordinates to process rank.getTopo()
Returns cartesian topology information.iDup()
Duplicates this communicator.int
map
(int[] dims, boolean[] periods) Compute an optimal placement.shift
(int direction, int disp) Compute source and destination ranks for "shift" communication.sub
(boolean[] remainDims) Partition cartesian communicator into subgroups of lower dimension.Methods inherited from class mpi.Intracomm
accept, accept, closePort, connect, connect, create, createCart, createDistGraph, createDistGraph, createDistGraphAdjacent, createDistGraphAdjacent, createGraph, createGroup, exScan, exScan, iExScan, iExScan, iScan, iScan, lookupName, lookupName, openPort, openPort, publishName, publishName, scan, scan, spawn, spawnMultiple, split, splitType, unpublishName, unpublishName
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
-
Constructor Details
-
CartComm
- Throws:
MPIException
-
CartComm
protected CartComm(long[] commRequest)
-
-
Method Details
-
clone
Duplicates this communicator.Java binding of
MPI_COMM_DUP
.It is recommended to use
dup()
instead ofclone()
because the last can't throw anMPIException
. -
dup
Duplicates this communicator.Java binding of
MPI_COMM_DUP
.- Overrides:
dup
in classIntracomm
- Returns:
- copy of this communicator
- Throws:
MPIException
- Signals that an MPI exception of some sort has occurred.
-
iDup
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 classIntracomm
- Returns:
- copy of this communicator
- Throws:
MPIException
- Signals that an MPI exception of some sort has occurred. Signals that an MPI exception of some sort has occurred.
-
dupWithInfo
Duplicates this communicator with the info object used in the call.Java binding of
MPI_COMM_DUP_WITH_INFO
.- Overrides:
dupWithInfo
in classIntracomm
- 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.
-
getTopo
Returns cartesian topology information.Java binding of the MPI operations
MPI_CARTDIM_GET
andMPI_CART_GET
.The number of dimensions can be obtained from the size of (eg)
dims
field of the returned object.- Returns:
- object containing dimensions, periods and local coordinates
- Throws:
MPIException
- Signals that an MPI exception of some sort has occurred.
-
getRank
Translate logical process coordinates to process rank.Java binding of the MPI operation
MPI_CART_RANK
.- Parameters:
coords
- Cartesian coordinates of a process- Returns:
- rank of the specified process
- Throws:
MPIException
- Signals that an MPI exception of some sort has occurred.
-
getCoords
Translate process rank to logical process coordinates.Java binding of the MPI operation
MPI_CART_COORDS
.- Parameters:
rank
- rank of a process- Returns:
- Cartesian coordinates of the specified process
- Throws:
MPIException
- Signals that an MPI exception of some sort has occurred.
-
shift
Compute source and destination ranks for "shift" communication.Java binding of the MPI operation
MPI_CART_SHIFT
.- Parameters:
direction
- coordinate dimension of shiftdisp
- displacement- Returns:
- object containing ranks of source and destination processes
- Throws:
MPIException
- Signals that an MPI exception of some sort has occurred.
-
sub
Partition cartesian communicator into subgroups of lower dimension.Java binding of the MPI operation
MPI_CART_SUB
.- Parameters:
remainDims
- by dimension,true
if dimension is to be kept,false
otherwise- Returns:
- communicator containing subgrid including this process
- Throws:
MPIException
- Signals that an MPI exception of some sort has occurred.
-
map
Compute an optimal placement.Java binding of the MPI operation
MPI_CART_MAP
.The number of dimensions is taken to be size of the
dims
argument.- Parameters:
dims
- the number of processes in each dimensionperiods
-true
if grid is periodic,false
if not, in each dimension- Returns:
- reordered rank of calling process
- Throws:
MPIException
- Signals that an MPI exception of some sort has occurred.
-
createDims
Select a balanced distribution of processes per coordinate direction.Java binding of the MPI operation
MPI_DIMS_CREATE
.- Parameters:
nnodes
- number of nodes in a griddims
- array specifying the number of nodes in each dimension- Throws:
MPIException
- Signals that an MPI exception of some sort has occurred.
-