程序包 mpi

类 CartComm

所有已实现的接口:
Cloneable, Freeable

public final class CartComm extends Intracomm
Communicator with cartesian structure.
  • 构造器详细资料

    • CartComm

      protected CartComm(long handle) throws MPIException
      抛出:
      MPIException
    • CartComm

      protected CartComm(long[] commRequest)
  • 方法详细资料

    • clone

      public CartComm 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.

      覆盖:
      clone 在类中 Intracomm
      返回:
      copy of this communicator
    • dup

      public CartComm dup() throws MPIException
      Duplicates this communicator.

      Java binding of MPI_COMM_DUP.

      覆盖:
      dup 在类中 Intracomm
      返回:
      copy of this communicator
      抛出:
      MPIException - Signals that an MPI exception of some sort has occurred.
    • iDup

      public CartComm 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().

      覆盖:
      iDup 在类中 Intracomm
      返回:
      copy of this communicator
      抛出:
      MPIException - Signals that an MPI exception of some sort has occurred. Signals that an MPI exception of some sort has occurred.
    • dupWithInfo

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

      Java binding of MPI_COMM_DUP_WITH_INFO.

      覆盖:
      dupWithInfo 在类中 Intracomm
      参数:
      info - info object to associate with the new communicator
      返回:
      copy of this communicator
      抛出:
      MPIException - Signals that an MPI exception of some sort has occurred.
    • getTopo

      public CartParms getTopo() throws MPIException
      Returns cartesian topology information.

      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.

      返回:
      object containing dimensions, periods and local coordinates
      抛出:
      MPIException - Signals that an MPI exception of some sort has occurred.
    • getRank

      public int getRank(int[] coords) throws MPIException
      Translate logical process coordinates to process rank.

      Java binding of the MPI operation MPI_CART_RANK.

      参数:
      coords - Cartesian coordinates of a process
      返回:
      rank of the specified process
      抛出:
      MPIException - Signals that an MPI exception of some sort has occurred.
    • getCoords

      public int[] getCoords(int rank) throws MPIException
      Translate process rank to logical process coordinates.

      Java binding of the MPI operation MPI_CART_COORDS.

      参数:
      rank - rank of a process
      返回:
      Cartesian coordinates of the specified process
      抛出:
      MPIException - Signals that an MPI exception of some sort has occurred.
    • shift

      public ShiftParms shift(int direction, int disp) throws MPIException
      Compute source and destination ranks for "shift" communication.

      Java binding of the MPI operation MPI_CART_SHIFT.

      参数:
      direction - coordinate dimension of shift
      disp - displacement
      返回:
      object containing ranks of source and destination processes
      抛出:
      MPIException - Signals that an MPI exception of some sort has occurred.
    • sub

      public CartComm sub(boolean[] remainDims) throws MPIException
      Partition cartesian communicator into subgroups of lower dimension.

      Java binding of the MPI operation MPI_CART_SUB.

      参数:
      remainDims - by dimension, true if dimension is to be kept, false otherwise
      返回:
      communicator containing subgrid including this process
      抛出:
      MPIException - Signals that an MPI exception of some sort has occurred.
    • map

      public int map(int[] dims, boolean[] periods) throws MPIException
      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.

      参数:
      dims - the number of processes in each dimension
      periods - true if grid is periodic, false if not, in each dimension
      返回:
      reordered rank of calling process
      抛出:
      MPIException - Signals that an MPI exception of some sort has occurred.
    • createDims

      public static void createDims(int nnodes, int[] dims) throws MPIException
      Select a balanced distribution of processes per coordinate direction.

      Java binding of the MPI operation MPI_DIMS_CREATE.

      参数:
      nnodes - number of nodes in a grid
      dims - array specifying the number of nodes in each dimension
      抛出:
      MPIException - Signals that an MPI exception of some sort has occurred.