public class Cartcomm extends Intracomm
handle, MPI_COMM_NULL_VAL
Modifier and Type | Method and Description |
---|---|
Cartcomm |
clone()
Clones this communicator.
|
int[] |
Coords(int rank)
Translate process rank to logical process coordinates.
|
static void |
createDims(int nnodes,
int[] dims)
Select a balanced distribution of processes per coordinate direction.
|
int |
getRank(int[] coords)
Translate logical process coordinates to process rank.
|
CartParms |
getTopo()
Returns Cartesian topology information.
|
int |
getTopology()
Returns the type of topology associated with the communicator.
|
int |
map(int[] dims,
boolean[] periods)
Compute an optimal placement.
|
ShiftParms |
shift(int direction,
int disp)
Compute source and destination ranks for ``shift'' communication.
|
Cartcomm |
sub(boolean[] remain_dims)
Partition Cartesian communicator into subgroups of lower dimension.
|
allGather, allGatherv, allReduce, allToAll, allToAllv, barrier, bcast, create, createCart, createGraph, createGroup, gather, gatherv, nativeGatherv, reduce, reduceScatter, scan, scatter, scatterv, split
Abort, bSend, bSendInit, compare, create, createIntercomm, deleteAttr, free, getAttr, getGroup, getRank, getSize, ibSend, iProbe, iRecv, irSend, iSend, isInter, isNull, isSend, pack, packSize, probe, recv, recvInit, rSend, rSendInit, send, sendInit, sendRecv, sendRecvReplace, spawn, spawnMultiple, sSend, sSendInit, unpack
public static void createDims(int nnodes, int[] dims) throws MPIException
nnodes
- number of nodes in a grid.dims
- array specifying number of nodes in each dimension.
Java binding of the MPI operation MPI_DIMS_CREATE
.
Note that dims
is an inout parameter.MPIException
- Points out that an MPI exception has occured.public Cartcomm clone() throws MPIException
Java binding of MPI operation MPI_COMM_DUP
.
Not Implemented in the current release
.clone
in class Intracomm
MPI_COMM_DUP
.
The new communicator is ``congruent'' to the old one, but has a different context.MPIException
- Points out that an MPI exception has occured.public int getRank(int[] coords) throws MPIException
coords
- Cartesian coordinates of a process.Java binding of the MPI operation MPI_CART_RANK
.
MPIException
- Points out that an MPI exception has occured.public int[] Coords(int rank) throws MPIException
rank
- rank of a process.Java binding of the MPI operation MPI_CART_COORDS
.
MPIException
- Points out that an MPI exception has occured.public ShiftParms shift(int direction, int disp) throws MPIException
direction
- coordinate dimension of shift.disp
- displacement.Java binding of the MPI operation MPI_CART_SHIFT
.
MPIException
- Points out that an MPI exception has occured.public Cartcomm sub(boolean[] remain_dims) throws MPIException
remain_dims
- by dimension, true
if dimension is to be kept,
false
otherwise.Java binding of the MPI operation MPI_CART_SUB
.
MPIException
- Points out that an MPI exception has occured.public int map(int[] dims, boolean[] periods) throws MPIException
dims
- the number of processes in each dimnesion.periods
- true
if grid is periodic in each dimension,
otherwise false
.Java binding of the MPI operation MPI_CART_MAP
.
The number of dimensions is taken to be size of the dims
argument.
MPIException
- Points out that an MPI exception has occured.public CartParms getTopo() throws MPIException
Java binding of the MPI operations MPI_CARTDIM_GET
and MPI_CART_GET
.
The number of dimensions can be obtained from the size of (eg) dims
field of the
returned object.
MPIException
- Points out that an MPI exception has occured.public int getTopology() throws MPIException
Not Implemented in the current release
.getTopology
in class Comm
Java binding of the MPI operation MPI_TOPO_TEST
.
The return value will be one of MPI.GRAPH
, MPI.CART
or
MPI.UNDEFINED
.
MPIException
- Points out that an MPI exception has occured.