Package mpi

Class Comm

All Implemented Interfaces:
Cloneable, Freeable
Direct Known Subclasses:
Intercomm, Intracomm

public class Comm extends Object implements Freeable, Cloneable
The Comm class represents communicators.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected long
     
    protected static final int
     
    static final int
     
    protected static final int
     
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
     
    protected
    Comm(long handle)
     
    protected
    Comm(long[] commRequest)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    final void
    abort(int errorcode)
    Abort MPI.
    final void
    allGather(Object buf, int count, Datatype type)
    Similar to gather, but all processes receive the result.
    final void
    allGather(Object sendbuf, int sendcount, Datatype sendtype, Object recvbuf, int recvcount, Datatype recvtype)
    Similar to gather, but all processes receive the result.
    final void
    allGatherv(Object recvbuf, int[] recvcount, int[] displs, Datatype recvtype)
    Similar to gatherv, but all processes receive the result.
    final void
    allGatherv(Object sendbuf, int sendcount, Datatype sendtype, Object recvbuf, int[] recvcount, int[] displs, Datatype recvtype)
    Similar to gatherv, but all processes receive the result.
    final void
    allReduce(Object buf, int count, Datatype type, Op op)
    Same as reduce except that the result appears in receive buffer of all process in the group.
    final void
    allReduce(Object sendbuf, Object recvbuf, int count, Datatype type, Op op)
    Same as reduce except that the result appears in receive buffer of all process in the group.
    final void
    allToAll(Object sendbuf, int sendcount, Datatype sendtype, Object recvbuf, int recvcount, Datatype recvtype)
    Extension of allGather to the case where each process sends distinct data to each of the receivers.
    final void
    allToAllv(Object sendbuf, int[] sendcount, int[] sdispls, Datatype sendtype, Object recvbuf, int[] recvcount, int[] rdispls, Datatype recvtype)
    Adds flexibility to allToAll: location of data for send is specified by sdispls and location to place data on receive side is specified by rdispls.
    final void
    allToAllw(Buffer sendBuf, int[] sendCount, int[] sDispls, Datatype[] sendTypes, Buffer recvBuf, int[] recvCount, int[] rDispls, Datatype[] recvTypes)
    Adds more flexibility to allToAllv: datatypes for send are specified by sendTypes and datatypes for receive are specified by recvTypes per process.
    final void
    A call to barrier blocks the caller until all process in the group have called it.
    final void
    bcast(Object buf, int count, Datatype type, int root)
    Broadcast a message from the process with rank root to all processes of the group.
    final void
    bSend(Object buf, int count, Datatype type, int dest, int tag)
    Send in buffered mode.
    final Prequest
    bSendInit(Buffer buf, int count, Datatype type, int dest, int tag)
    Creates a persistent communication request for a buffered mode send.
    void
    callErrhandler(int errorCode)
    Calls the error handler currently associated with the communicator.
    Duplicates this communicator.
    static int
    compare(Comm comm1, Comm comm2)
    Compare two communicators.
    final Intercomm
    createIntercomm(Comm localComm, int localLeader, int remoteLeader, int tag)
    Create an inter-communicator.
    static int
    Create a new attribute key.
    final void
    deleteAttr(int keyval)
    Deletes an attribute value associated with a key on a communicator.
    final void
    Java binding of the MPI operation MPI_COMM_DISCONNECT.
    dup()
    Duplicates this communicator.
    protected final long
    dup(long comm)
     
    protected final long
    dupWithInfo(long comm, long info)
     
    Duplicates this communicator with the info object used in the call.
    final void
    Java binding of the MPI operation MPI_COMM_FREE.
    static void
    freeKeyval(int keyval)
    Frees an attribute key for communicators.
    final void
    gather(Object buf, int count, Datatype type, int root)
    Each process sends the contents of its send buffer to the root process.
    final void
    gather(Object sendbuf, int sendcount, Datatype sendtype, Object recvbuf, int recvcount, Datatype recvtype, int root)
    Each process sends the contents of its send buffer to the root process.
    final void
    gatherv(Object recvbuf, int[] recvcount, int[] displs, Datatype recvtype, int root)
    Extends functionality of gather by allowing varying counts of data from each process.
    final void
    gatherv(Object sendbuf, int sendcount, Datatype sendtype, int root)
    Extends functionality of gather by allowing varying counts of data from each process.
    final void
    gatherv(Object sendbuf, int sendcount, Datatype sendtype, Object recvbuf, int[] recvcount, int[] displs, Datatype recvtype, int root)
    Extends functionality of gather by allowing varying counts of data from each process.
    final Object
    getAttr(int keyval)
    Retrieves attribute value by key.
    Returns the error handler currently associated with the communicator.
    final Group
    Return group associated with a communicator.
    final Info
    Java binding of MPI_COMM_GET_INFO.
    final String
    Return the print name from the communicator.
    final int
    Rank of this process in group of this communicator.
    final Request
    Returns the associated request to this communicator if it was created using iDup().
    final int
    Size of group of this communicator.
    final int
    Returns the type of topology associated with the communicator.
    final Request
    iAllGather(Buffer buf, int count, Datatype type)
    Similar to gather, but all processes receive the result.
    final Request
    iAllGather(Buffer sendbuf, int sendcount, Datatype sendtype, Buffer recvbuf, int recvcount, Datatype recvtype)
    Similar to gather, but all processes receive the result.
    final Request
    iAllGatherv(Buffer buf, int[] count, int[] displs, Datatype type)
    Similar to gatherv, but all processes receive the result.
    final Request
    iAllGatherv(Buffer sendbuf, int sendcount, Datatype sendtype, Buffer recvbuf, int[] recvcount, int[] displs, Datatype recvtype)
    Similar to gatherv, but all processes receive the result.
    final Request
    iAllReduce(Buffer buf, int count, Datatype type, Op op)
    Same as reduce except that the result appears in receive buffer of all process in the group.
    final Request
    iAllReduce(Buffer sendbuf, Buffer recvbuf, int count, Datatype type, Op op)
    Same as reduce except that the result appears in receive buffer of all process in the group.
    final Request
    iAllToAll(Buffer sendbuf, int sendcount, Datatype sendtype, Buffer recvbuf, int recvcount, Datatype recvtype)
    Extension of allGather to the case where each process sends distinct data to each of the receivers.
    final Request
    iAllToAllv(Buffer sendbuf, int[] sendcount, int[] sdispls, Datatype sendtype, Buffer recvbuf, int[] recvcount, int[] rdispls, Datatype recvtype)
    Adds flexibility to allToAll: location of data for send is specified by sdispls and location to place data on receive side is specified by rdispls.
    final Request
    iAllToAllw(Buffer sendBuf, int[] sendCount, int[] sDispls, Datatype[] sendTypes, Buffer recvBuf, int[] recvCount, int[] rDispls, Datatype[] recvTypes)
    Adds more flexibility to iAllToAllv: datatypes for send are specified by sendTypes and datatypes for receive are specified by recvTypes per process.
    final Request
    Nonblocking barrier sinchronization.
    final Request
    iBcast(Buffer buf, int count, Datatype type, int root)
    Broadcast a message from the process with rank root to all processes of the group.
    final Request
    ibSend(Buffer buf, int count, Datatype type, int dest, int tag)
    Start a buffered mode, nonblocking send.
    Duplicates this communicator.
    protected final long[]
    iDup(long comm)
     
    final Request
    iGather(Buffer buf, int count, Datatype type, int root)
    Each process sends the contents of its send buffer to the root process.
    final Request
    iGather(Buffer sendbuf, int sendcount, Datatype sendtype, Buffer recvbuf, int recvcount, Datatype recvtype, int root)
    Each process sends the contents of its send buffer to the root process.
    final Request
    iGatherv(Buffer recvbuf, int[] recvcount, int[] displs, Datatype recvtype, int root)
    Extends functionality of gather by allowing varying counts of data from each process.
    final Request
    iGatherv(Buffer sendbuf, int sendcount, Datatype sendtype, int root)
    Extends functionality of gather by allowing varying counts of data from each process.
    final Request
    iGatherv(Buffer sendbuf, int sendcount, Datatype sendtype, Buffer recvbuf, int[] recvcount, int[] displs, Datatype recvtype, int root)
    Extends functionality of gather by allowing varying counts of data from each process.
    final Request
    iNeighborAllGather(Buffer sendbuf, int sendcount, Datatype sendtype, Buffer recvbuf, int recvcount, Datatype recvtype)
    Java binding of MPI_INEIGHBOR_ALLGATHER.
    final Request
    iNeighborAllGatherv(Buffer sendbuf, int sendcount, Datatype sendtype, Buffer recvbuf, int[] recvcount, int[] displs, Datatype recvtype)
    Java binding of MPI_INEIGHBOR_ALLGATHERV.
    final Request
    iNeighborAllToAll(Buffer sendbuf, int sendcount, Datatype sendtype, Buffer recvbuf, int recvcount, Datatype recvtype)
    Java binding of MPI_INEIGHBOR_ALLTOALL.
    final Request
    iNeighborAllToAllv(Buffer sendbuf, int[] sendcount, int[] sdispls, Datatype sendtype, Buffer recvbuf, int[] recvcount, int[] rdispls, Datatype recvtype)
    Java binding of MPI_INEIGHBOR_ALLTOALLV.
    final Status
    iProbe(int source, int tag)
    Check if there is an incoming message matching the pattern specified.
    final Request
    iRecv(Buffer buf, int count, Datatype type, int source, int tag)
    Start a nonblocking receive.
    final Request
    iReduce(Buffer buf, int count, Datatype type, Op op, int root)
    Combine elements in input buffer of each process using the reduce operation, and return the combined value in the output buffer of the root process.
    final Request
    iReduce(Buffer sendbuf, Buffer recvbuf, int count, Datatype type, Op op, int root)
    Combine elements in input buffer of each process using the reduce operation, and return the combined value in the output buffer of the root process.
    final Request
    iReduceScatter(Buffer buf, int[] counts, Datatype type, Op op)
    Combine elements in input buffer of each process using the reduce operation, and scatter the combined values over the output buffers of the processes.
    final Request
    iReduceScatter(Buffer sendbuf, Buffer recvbuf, int[] recvcounts, Datatype type, Op op)
    Combine elements in input buffer of each process using the reduce operation, and scatter the combined values over the output buffers of the processes.
    final Request
    iReduceScatterBlock(Buffer buf, int count, Datatype type, Op op)
    Combine values and scatter the results.
    final Request
    iReduceScatterBlock(Buffer sendbuf, Buffer recvbuf, int recvcount, Datatype type, Op op)
    Combine values and scatter the results.
    final Request
    irSend(Buffer buf, int count, Datatype type, int dest, int tag)
    Start a ready mode, nonblocking send.
    final Request
    iScatter(Buffer buf, int count, Datatype type, int root)
    Inverse of the operation gather.
    final Request
    iScatter(Buffer sendbuf, int sendcount, Datatype sendtype, Buffer recvbuf, int recvcount, Datatype recvtype, int root)
    Inverse of the operation gather.
    final Request
    iScatterv(Buffer sendbuf, int[] sendcount, int[] displs, Datatype sendtype, int root)
    Inverse of the operation gatherv.
    final Request
    iScatterv(Buffer sendbuf, int[] sendcount, int[] displs, Datatype sendtype, Buffer recvbuf, int recvcount, Datatype recvtype, int root)
    Inverse of the operation gatherv.
    final Request
    iScatterv(Buffer recvbuf, int recvcount, Datatype recvtype, int root)
    Inverse of the operation gatherv.
    final Request
    iSend(Buffer buf, int count, Datatype type, int dest, int tag)
    Start a standard mode, nonblocking send.
    final boolean
    Test if this communicator is an inter-communicator.
    final boolean
    Test if communicator object is null (has been freed).
    final Request
    isSend(Buffer buf, int count, Datatype type, int dest, int tag)
    Start a synchronous mode, nonblocking send.
    final void
    neighborAllGather(Object sendbuf, int sendcount, Datatype sendtype, Object recvbuf, int recvcount, Datatype recvtype)
    Java binding of MPI_NEIGHBOR_ALLGATHER.
    final void
    neighborAllGatherv(Object sendbuf, int sendcount, Datatype sendtype, Object recvbuf, int[] recvcount, int[] displs, Datatype recvtype)
    Java binding of MPI_NEIGHBOR_ALLGATHERV.
    final void
    neighborAllToAll(Object sendbuf, int sendcount, Datatype sendtype, Object recvbuf, int recvcount, Datatype recvtype)
    Java binding of MPI_NEIGHBOR_ALLTOALL.
    final void
    neighborAllToAllv(Object sendbuf, int[] sendcount, int[] sdispls, Datatype sendtype, Object recvbuf, int[] recvcount, int[] rdispls, Datatype recvtype)
    Java binding of MPI_NEIGHBOR_ALLTOALLV.
    final int
    pack(Object inbuf, int incount, Datatype type, byte[] outbuf, int position)
    Packs message in send buffer inbuf into space specified in outbuf.
    final int
    packSize(int incount, Datatype type)
    Returns an upper bound on the increment of position effected by pack.
    final Status
    probe(int source, int tag)
    Wait until there is an incoming message matching the pattern specified.
    final Status
    recv(Object buf, int count, Datatype type, int source, int tag)
    Blocking receive operation.
    final Prequest
    recvInit(Buffer buf, int count, Datatype type, int source, int tag)
    Creates a persistent communication request for a receive operation.
    final void
    reduce(Object buf, int count, Datatype type, Op op, int root)
    Combine elements in input buffer of each process using the reduce operation, and return the combined value in the output buffer of the root process.
    final void
    reduce(Object sendbuf, Object recvbuf, int count, Datatype type, Op op, int root)
    Combine elements in input buffer of each process using the reduce operation, and return the combined value in the output buffer of the root process.
    static void
    reduceLocal(Object inBuf, Object inOutBuf, int count, Datatype type, Op op)
    Apply the operation given by op element-wise to the elements of inBuf and inOutBuf with the result stored element-wise in inOutBuf.
    final void
    reduceScatter(Object buf, int[] counts, Datatype type, Op op)
    Combine elements in input buffer of each process using the reduce operation, and scatter the combined values over the output buffers of the processes.
    final void
    reduceScatter(Object sendbuf, Object recvbuf, int[] recvcounts, Datatype type, Op op)
    Combine elements in input buffer of each process using the reduce operation, and scatter the combined values over the output buffers of the processes.
    final void
    reduceScatterBlock(Object buf, int count, Datatype type, Op op)
    Combine values and scatter the results.
    final void
    reduceScatterBlock(Object sendbuf, Object recvbuf, int recvcount, Datatype type, Op op)
    Combine values and scatter the results.
    final void
    rSend(Object buf, int count, Datatype type, int dest, int tag)
    Send in ready mode.
    final Prequest
    rSendInit(Buffer buf, int count, Datatype type, int dest, int tag)
    Creates a persistent communication request for a ready mode send.
    final void
    scatter(Object buf, int count, Datatype type, int root)
    Inverse of the operation gather.
    final void
    scatter(Object sendbuf, int sendcount, Datatype sendtype, Object recvbuf, int recvcount, Datatype recvtype, int root)
    Inverse of the operation gather.
    final void
    scatterv(Object sendbuf, int[] sendcount, int[] displs, Datatype sendtype, int root)
    Inverse of the operation gatherv.
    final void
    scatterv(Object sendbuf, int[] sendcount, int[] displs, Datatype sendtype, Object recvbuf, int recvcount, Datatype recvtype, int root)
    Inverse of the operation gatherv.
    final void
    scatterv(Object recvbuf, int recvcount, Datatype recvtype, int root)
    Inverse of the operation gatherv.
    final void
    send(Object buf, int count, Datatype type, int dest, int tag)
    Blocking send operation.
    final Prequest
    sendInit(Buffer buf, int count, Datatype type, int dest, int tag)
    Creates a persistent communication request for a standard mode send.
    final Status
    sendRecv(Object sendbuf, int sendcount, Datatype sendtype, int dest, int sendtag, Object recvbuf, int recvcount, Datatype recvtype, int source, int recvtag)
    Execute a blocking send and receive operation.
    final Status
    sendRecvReplace(Object buf, int count, Datatype type, int dest, int sendtag, int source, int recvtag)
    Execute a blocking send and receive operation, receiving message into send buffer.
    final void
    setAttr(int keyval, Object value)
    Stores attribute value associated with a key.
    final void
    Associates a new error handler with communicator at the calling process.
    final void
    setInfo(Info info)
    Java binding of MPI_COMM_SET_INFO.
    final void
    Sets the print name for the communicator.
    protected final void
    setType(int type)
     
    final void
    sSend(Object buf, int count, Datatype type, int dest, int tag)
    Send in synchronous mode.
    final Prequest
    sSendInit(Buffer buf, int count, Datatype type, int dest, int tag)
    Creates a persistent communication request for a synchronous mode send.
    final int
    unpack(byte[] inbuf, int position, Object outbuf, int outcount, Datatype type)
    Unpacks message in receive buffer outbuf into space specified in inbuf.

    Methods inherited from class java.lang.Object

    equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

  • Constructor Details

    • Comm

      protected Comm()
    • Comm

      protected Comm(long handle)
    • Comm

      protected Comm(long[] commRequest)
  • Method Details

    • setType

      protected final void setType(int type)
    • clone

      public Comm 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 Object
      Returns:
      copy of this communicator
    • dup

      public Comm dup() throws MPIException
      Duplicates this communicator.

      Java binding of MPI_COMM_DUP.

      Returns:
      copy of this communicator
      Throws:
      MPIException - Signals that an MPI exception of some sort has occurred.
    • dup

      protected final long dup(long comm) throws MPIException
      Throws:
      MPIException
    • iDup

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

      Returns:
      copy of this communicator
      Throws:
      MPIException - Signals that an MPI exception of some sort has occurred.
    • iDup

      protected final long[] iDup(long comm) throws MPIException
      Throws:
      MPIException
    • dupWithInfo

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

      Java binding of MPI_COMM_DUP_WITH_INFO.

      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.
    • dupWithInfo

      protected final long dupWithInfo(long comm, long info) throws MPIException
      Throws:
      MPIException
    • getRequest

      public final Request getRequest()
      Returns the associated request to this communicator if it was created using iDup().
      Returns:
      associated request if this communicator was created using iDup(), or null otherwise.
    • getSize

      public final int getSize() throws MPIException
      Size of group of this communicator.

      Java binding of the MPI operation MPI_COMM_SIZE.

      Returns:
      number of processors in the group of this communicator
      Throws:
      MPIException - Signals that an MPI exception of some sort has occurred.
    • getRank

      public final int getRank() throws MPIException
      Rank of this process in group of this communicator.

      Java binding of the MPI operation MPI_COMM_RANK.

      Returns:
      rank of the calling process in the group of this communicator
      Throws:
      MPIException - Signals that an MPI exception of some sort has occurred.
    • compare

      public static int compare(Comm comm1, Comm comm2) throws MPIException
      Compare two communicators.

      Java binding of the MPI operation MPI_COMM_COMPARE.

      Parameters:
      comm1 - first communicator
      comm2 - second communicator
      Returns:
      MPI.IDENT results if the comm1 and comm2 are references to the same object (ie, if comm1 == comm2).
      MPI.CONGRUENT results if the underlying groups are identical but the communicators differ by context.
      MPI.SIMILAR results if the underlying groups are similar but the communicators differ by context.
      MPI.UNEQUAL results otherwise.
      Throws:
      MPIException - Signals that an MPI exception of some sort has occurred.
    • free

      public final void free() throws MPIException
      Java binding of the MPI operation MPI_COMM_FREE.
      Specified by:
      free in interface Freeable
      Throws:
      MPIException - Signals that an MPI exception of some sort has occurred.
    • isNull

      public final boolean isNull()
      Test if communicator object is null (has been freed). Java binding of MPI_COMM_NULL.
      Returns:
      true if the comm object is null, false otherwise
    • setInfo

      public final void setInfo(Info info) throws MPIException
      Java binding of MPI_COMM_SET_INFO.
      Parameters:
      info - info object
      Throws:
      MPIException - Signals that an MPI exception of some sort has occurred.
    • getInfo

      public final Info getInfo() throws MPIException
      Java binding of MPI_COMM_GET_INFO.
      Returns:
      new info object
      Throws:
      MPIException - Signals that an MPI exception of some sort has occurred.
    • disconnect

      public final void disconnect() throws MPIException
      Java binding of the MPI operation MPI_COMM_DISCONNECT.
      Throws:
      MPIException - Signals that an MPI exception of some sort has occurred.
    • getGroup

      public final Group getGroup() throws MPIException
      Return group associated with a communicator.

      Java binding of the MPI operation MPI_COMM_GROUP.

      Returns:
      group corresponding to this communicator group
      Throws:
      MPIException - Signals that an MPI exception of some sort has occurred.
    • isInter

      public final boolean isInter() throws MPIException
      Test if this communicator is an inter-communicator.

      Java binding of the MPI operation MPI_COMM_TEST_INTER.

      Returns:
      true if this is an inter-communicator, false otherwise
      Throws:
      MPIException - Signals that an MPI exception of some sort has occurred.
    • createIntercomm

      public final Intercomm createIntercomm(Comm localComm, int localLeader, int remoteLeader, int tag) throws MPIException
      Create an inter-communicator.

      Java binding of the MPI operation MPI_INTERCOMM_CREATE.

      This operation is defined as a method on the "peer communicator", making it analogous to a send or recv communication with the remote group leader.

      Parameters:
      localComm - local intra-communicator
      localLeader - rank of local group leader in localComm
      remoteLeader - rank of remote group leader in this communicator
      tag - "safe" tag
      Returns:
      new inter-communicator
      Throws:
      MPIException - Signals that an MPI exception of some sort has occurred.
    • send

      public final void send(Object buf, int count, Datatype type, int dest, int tag) throws MPIException
      Blocking send operation.

      Java binding of the MPI operation MPI_SEND.

      Parameters:
      buf - send buffer
      count - number of items to send
      type - datatype of each item in send buffer
      dest - rank of destination
      tag - message tag
      Throws:
      MPIException - Signals that an MPI exception of some sort has occurred.
    • recv

      public final Status recv(Object buf, int count, Datatype type, int source, int tag) throws MPIException
      Blocking receive operation.

      Java binding of the MPI operation MPI_RECV.

      Parameters:
      buf - receive buffer
      count - number of items in receive buffer
      type - datatype of each item in receive buffer
      source - rank of source
      tag - message tag
      Returns:
      status object
      Throws:
      MPIException - Signals that an MPI exception of some sort has occurred.
    • sendRecv

      public final Status sendRecv(Object sendbuf, int sendcount, Datatype sendtype, int dest, int sendtag, Object recvbuf, int recvcount, Datatype recvtype, int source, int recvtag) throws MPIException
      Execute a blocking send and receive operation.

      Java binding of the MPI operation MPI_SENDRECV.

      Parameters:
      sendbuf - send buffer
      sendcount - number of items to send
      sendtype - datatype of each item in send buffer
      dest - rank of destination
      sendtag - send tag
      recvbuf - receive buffer
      recvcount - number of items in receive buffer
      recvtype - datatype of each item in receive buffer
      source - rank of source
      recvtag - receive tag
      Returns:
      status object
      Throws:
      MPIException - Signals that an MPI exception of some sort has occurred.
      See Also:
    • sendRecvReplace

      public final Status sendRecvReplace(Object buf, int count, Datatype type, int dest, int sendtag, int source, int recvtag) throws MPIException
      Execute a blocking send and receive operation, receiving message into send buffer.

      Java binding of the MPI operation MPI_SENDRECV_REPLACE.

      Parameters:
      buf - buffer
      count - number of items to send
      type - datatype of each item in buffer
      dest - rank of destination
      sendtag - send tag
      source - rank of source
      recvtag - receive tag
      Returns:
      status object
      Throws:
      MPIException - Signals that an MPI exception of some sort has occurred.
      See Also:
    • bSend

      public final void bSend(Object buf, int count, Datatype type, int dest, int tag) throws MPIException
      Send in buffered mode.

      Java binding of the MPI operation MPI_BSEND.

      Parameters:
      buf - send buffer
      count - number of items to send
      type - datatype of each item in send buffer
      dest - rank of destination
      tag - message tag
      Throws:
      MPIException - Signals that an MPI exception of some sort has occurred.
      See Also:
    • sSend

      public final void sSend(Object buf, int count, Datatype type, int dest, int tag) throws MPIException
      Send in synchronous mode.

      Java binding of the MPI operation MPI_SSEND.

      Parameters:
      buf - send buffer
      count - number of items to send
      type - datatype of each item in send buffer
      dest - rank of destination
      tag - message tag
      Throws:
      MPIException - Signals that an MPI exception of some sort has occurred.
      See Also:
    • rSend

      public final void rSend(Object buf, int count, Datatype type, int dest, int tag) throws MPIException
      Send in ready mode.

      Java binding of the MPI operation MPI_RSEND.

      Parameters:
      buf - send buffer
      count - number of items to send
      type - datatype of each item in send buffer
      dest - rank of destination
      tag - message tag
      Throws:
      MPIException - Signals that an MPI exception of some sort has occurred.
      See Also:
    • iSend

      public final Request iSend(Buffer buf, int count, Datatype type, int dest, int tag) throws MPIException
      Start a standard mode, nonblocking send.

      Java binding of the MPI operation MPI_ISEND.

      Parameters:
      buf - send buffer
      count - number of items to send
      type - datatype of each item in send buffer
      dest - rank of destination
      tag - message tag
      Returns:
      communication request
      Throws:
      MPIException - Signals that an MPI exception of some sort has occurred.
      See Also:
    • ibSend

      public final Request ibSend(Buffer buf, int count, Datatype type, int dest, int tag) throws MPIException
      Start a buffered mode, nonblocking send.

      Java binding of the MPI operation MPI_IBSEND.

      Parameters:
      buf - send buffer
      count - number of items to send
      type - datatype of each item in send buffer
      dest - rank of destination
      tag - message tag
      Returns:
      communication request
      Throws:
      MPIException - Signals that an MPI exception of some sort has occurred.
      See Also:
    • isSend

      public final Request isSend(Buffer buf, int count, Datatype type, int dest, int tag) throws MPIException
      Start a synchronous mode, nonblocking send.

      Java binding of the MPI operation MPI_ISSEND.

      Parameters:
      buf - send buffer
      count - number of items to send
      type - datatype of each item in send buffer
      dest - rank of destination
      tag - message tag
      Returns:
      communication request
      Throws:
      MPIException - Signals that an MPI exception of some sort has occurred.
      See Also:
    • irSend

      public final Request irSend(Buffer buf, int count, Datatype type, int dest, int tag) throws MPIException
      Start a ready mode, nonblocking send.

      Java binding of the MPI operation MPI_IRSEND.

      Parameters:
      buf - send buffer
      count - number of items to send
      type - datatype of each item in send buffer
      dest - rank of destination
      tag - message tag
      Returns:
      communication request
      Throws:
      MPIException - Signals that an MPI exception of some sort has occurred.
      See Also:
    • iRecv

      public final Request iRecv(Buffer buf, int count, Datatype type, int source, int tag) throws MPIException
      Start a nonblocking receive.

      Java binding of the MPI operation MPI_IRECV.

      Parameters:
      buf - receive buffer
      count - number of items in receive buffer
      type - datatype of each item in receive buffer
      source - rank of source
      tag - message tag
      Returns:
      communication request
      Throws:
      MPIException - Signals that an MPI exception of some sort has occurred.
      See Also:
    • sendInit

      public final Prequest sendInit(Buffer buf, int count, Datatype type, int dest, int tag) throws MPIException
      Creates a persistent communication request for a standard mode send.

      Java binding of the MPI operation MPI_SEND_INIT.

      Parameters:
      buf - send buffer
      count - number of items to send
      type - datatype of each item in send buffer
      dest - rank of destination
      tag - message tag
      Returns:
      persistent communication request
      Throws:
      MPIException - Signals that an MPI exception of some sort has occurred.
      See Also:
    • bSendInit

      public final Prequest bSendInit(Buffer buf, int count, Datatype type, int dest, int tag) throws MPIException
      Creates a persistent communication request for a buffered mode send.

      Java binding of the MPI operation MPI_BSEND_INIT.

      Parameters:
      buf - send buffer
      count - number of items to send
      type - datatype of each item in send buffer
      dest - rank of destination
      tag - message tag
      Returns:
      persistent communication request
      Throws:
      MPIException - Signals that an MPI exception of some sort has occurred.
      See Also:
    • sSendInit

      public final Prequest sSendInit(Buffer buf, int count, Datatype type, int dest, int tag) throws MPIException
      Creates a persistent communication request for a synchronous mode send.

      Java binding of the MPI operation MPI_SSEND_INIT.

      Parameters:
      buf - send buffer
      count - number of items to send
      type - datatype of each item in send buffer
      dest - rank of destination
      tag - message tag
      Returns:
      persistent communication request
      Throws:
      MPIException - Signals that an MPI exception of some sort has occurred.
      See Also:
    • rSendInit

      public final Prequest rSendInit(Buffer buf, int count, Datatype type, int dest, int tag) throws MPIException
      Creates a persistent communication request for a ready mode send.

      Java binding of the MPI operation MPI_RSEND_INIT.

      Parameters:
      buf - send buffer
      count - number of items to send
      type - datatype of each item in send buffer
      dest - rank of destination
      tag - message tag
      Returns:
      persistent communication request
      Throws:
      MPIException - Signals that an MPI exception of some sort has occurred.
      See Also:
    • recvInit

      public final Prequest recvInit(Buffer buf, int count, Datatype type, int source, int tag) throws MPIException
      Creates a persistent communication request for a receive operation.

      Java binding of the MPI operation MPI_RECV_INIT.

      Parameters:
      buf - receive buffer
      count - number of items in receive buffer
      type - datatype of each item in receive buffer
      source - rank of source
      tag - message tag
      Returns:
      communication request
      Throws:
      MPIException - Signals that an MPI exception of some sort has occurred.
      See Also:
    • pack

      public final int pack(Object inbuf, int incount, Datatype type, byte[] outbuf, int position) throws MPIException
      Packs message in send buffer inbuf into space specified in outbuf.

      Java binding of the MPI operation MPI_PACK.

      The return value is the output value of position - the inital value incremented by the number of bytes written.

      Parameters:
      inbuf - input buffer
      incount - number of items in input buffer
      type - datatype of each item in input buffer
      outbuf - output buffer
      position - initial position in output buffer
      Returns:
      final position in output buffer
      Throws:
      MPIException - Signals that an MPI exception of some sort has occurred.
    • unpack

      public final int unpack(byte[] inbuf, int position, Object outbuf, int outcount, Datatype type) throws MPIException
      Unpacks message in receive buffer outbuf into space specified in inbuf.

      Java binding of the MPI operation MPI_UNPACK.

      The return value is the output value of position - the inital value incremented by the number of bytes read.

      Parameters:
      inbuf - input buffer
      position - initial position in input buffer
      outbuf - output buffer
      outcount - number of items in output buffer
      type - datatype of each item in output buffer
      Returns:
      final position in input buffer
      Throws:
      MPIException - Signals that an MPI exception of some sort has occurred.
    • packSize

      public final int packSize(int incount, Datatype type) throws MPIException
      Returns an upper bound on the increment of position effected by pack.

      Java binding of the MPI operation MPI_PACK_SIZE.

      Parameters:
      incount - number of items in input buffer
      type - datatype of each item in input buffer
      Returns:
      upper bound on size of packed message
      Throws:
      MPIException - Signals that an MPI exception of some sort has occurred.
    • iProbe

      public final Status iProbe(int source, int tag) throws MPIException
      Check if there is an incoming message matching the pattern specified.

      Java binding of the MPI operation MPI_IPROBE.

      If such a message is currently available, a status object similar to the return value of a matching recv operation is returned.

      Parameters:
      source - rank of source
      tag - message tag
      Returns:
      status object if such a message is currently available, null otherwise.
      Throws:
      MPIException - Signals that an MPI exception of some sort has occurred.
    • probe

      public final Status probe(int source, int tag) throws MPIException
      Wait until there is an incoming message matching the pattern specified.

      Java binding of the MPI operation MPI_PROBE.

      Returns a status object similar to the return value of a matching recv operation.

      Parameters:
      source - rank of source
      tag - message tag
      Returns:
      status object
      Throws:
      MPIException - Signals that an MPI exception of some sort has occurred.
    • createKeyval

      public static int createKeyval() throws MPIException
      Create a new attribute key.

      Java binding of the MPI operation MPI_COMM_CREATE_KEYVAL.

      Returns:
      attribute key for future access
      Throws:
      MPIException - Signals that an MPI exception of some sort has occurred.
    • freeKeyval

      public static void freeKeyval(int keyval) throws MPIException
      Frees an attribute key for communicators.

      Java binding of the MPI operation MPI_COMM_FREE_KEYVAL.

      Parameters:
      keyval - attribute key
      Throws:
      MPIException - Signals that an MPI exception of some sort has occurred.
    • setAttr

      public final void setAttr(int keyval, Object value) throws MPIException
      Stores attribute value associated with a key.

      Java binding of the MPI operation MPI_COMM_SET_ATTR.

      Parameters:
      keyval - attribute key
      value - attribute value
      Throws:
      MPIException - Signals that an MPI exception of some sort has occurred.
    • getAttr

      public final Object getAttr(int keyval) throws MPIException
      Retrieves attribute value by key.

      Java binding of the MPI operation MPI_COMM_GET_ATTR.

      Parameters:
      keyval - attribute key
      Returns:
      attribute value or null if no attribute is associated with the key.
      Throws:
      MPIException - Signals that an MPI exception of some sort has occurred.
    • deleteAttr

      public final void deleteAttr(int keyval) throws MPIException
      Deletes an attribute value associated with a key on a communicator.

      Java binding of the MPI operation MPI_COMM_DELETE_ATTR.

      Parameters:
      keyval - attribute key
      Throws:
      MPIException - Signals that an MPI exception of some sort has occurred.
    • getTopology

      public final int getTopology() throws MPIException
      Returns the type of topology associated with the communicator.

      Java binding of the MPI operation MPI_TOPO_TEST.

      The return value will be one of MPI.GRAPH, MPI.CART, MPI.DIST_GRAPH or MPI.UNDEFINED.

      Returns:
      topology type of communicator
      Throws:
      MPIException - Signals that an MPI exception of some sort has occurred.
    • abort

      public final void abort(int errorcode) throws MPIException
      Abort MPI.

      Java binding of the MPI operation MPI_ABORT.

      Parameters:
      errorcode - error code for Unix or POSIX environments
      Throws:
      MPIException - Signals that an MPI exception of some sort has occurred.
    • setErrhandler

      public final void setErrhandler(Errhandler errhandler) throws MPIException
      Associates a new error handler with communicator at the calling process.

      Java binding of the MPI operation MPI_COMM_SET_ERRHANDLER.

      Parameters:
      errhandler - new MPI error handler for communicator
      Throws:
      MPIException - Signals that an MPI exception of some sort has occurred.
    • getErrhandler

      public final Errhandler getErrhandler() throws MPIException
      Returns the error handler currently associated with the communicator.

      Java binding of the MPI operation MPI_COMM_GET_ERRHANDLER.

      Returns:
      MPI error handler currently associated with communicator
      Throws:
      MPIException - Signals that an MPI exception of some sort has occurred.
    • callErrhandler

      public void callErrhandler(int errorCode) throws MPIException
      Calls the error handler currently associated with the communicator.

      Java binding of the MPI operation MPI_COMM_CALL_ERRHANDLER.

      Parameters:
      errorCode - error code
      Throws:
      MPIException - Signals that an MPI exception of some sort has occurred.
    • barrier

      public final void barrier() throws MPIException
      A call to barrier blocks the caller until all process in the group have called it.

      Java binding of the MPI operation MPI_BARRIER.

      Throws:
      MPIException - Signals that an MPI exception of some sort has occurred.
    • iBarrier

      public final Request iBarrier() throws MPIException
      Nonblocking barrier sinchronization.

      Java binding of the MPI operation MPI_IBARRIER.

      Returns:
      communication request
      Throws:
      MPIException - Signals that an MPI exception of some sort has occurred.
    • bcast

      public final void bcast(Object buf, int count, Datatype type, int root) throws MPIException
      Broadcast a message from the process with rank root to all processes of the group.

      Java binding of the MPI operation MPI_BCAST.

      Parameters:
      buf - buffer
      count - number of items in buffer
      type - datatype of each item in buffer
      root - rank of broadcast root
      Throws:
      MPIException - Signals that an MPI exception of some sort has occurred.
    • iBcast

      public final Request iBcast(Buffer buf, int count, Datatype type, int root) throws MPIException
      Broadcast a message from the process with rank root to all processes of the group.

      Java binding of the MPI operation MPI_IBCAST.

      Parameters:
      buf - buffer
      count - number of items in buffer
      type - datatype of each item in buffer
      root - rank of broadcast root
      Returns:
      communication request
      Throws:
      MPIException - Signals that an MPI exception of some sort has occurred.
    • gather

      public final void gather(Object sendbuf, int sendcount, Datatype sendtype, Object recvbuf, int recvcount, Datatype recvtype, int root) throws MPIException
      Each process sends the contents of its send buffer to the root process.

      Java binding of the MPI operation MPI_GATHER.

      Parameters:
      sendbuf - send buffer
      sendcount - number of items to send
      sendtype - datatype of each item in send buffer
      recvbuf - receive buffer
      recvcount - number of items to receive
      recvtype - datatype of each item in receive buffer
      root - rank of receiving process
      Throws:
      MPIException - Signals that an MPI exception of some sort has occurred.
    • gather

      public final void gather(Object buf, int count, Datatype type, int root) throws MPIException
      Each process sends the contents of its send buffer to the root process.

      Java binding of the MPI operation MPI_GATHER using MPI_IN_PLACE instead of the send buffer. The buffer is used by the root process to receive data, and it is used by the non-root processes to send data.

      Parameters:
      buf - buffer
      count - number of items to send/receive
      type - datatype of each item in buffer
      root - rank of receiving process
      Throws:
      MPIException - Signals that an MPI exception of some sort has occurred.
    • iGather

      public final Request iGather(Buffer sendbuf, int sendcount, Datatype sendtype, Buffer recvbuf, int recvcount, Datatype recvtype, int root) throws MPIException
      Each process sends the contents of its send buffer to the root process.

      Java binding of the MPI operation MPI_IGATHER.

      Parameters:
      sendbuf - send buffer
      sendcount - number of items to send
      sendtype - datatype of each item in send buffer
      recvbuf - receive buffer
      recvcount - number of items to receive
      recvtype - datatype of each item in receive buffer
      root - rank of receiving process
      Returns:
      communication request
      Throws:
      MPIException - Signals that an MPI exception of some sort has occurred.
    • iGather

      public final Request iGather(Buffer buf, int count, Datatype type, int root) throws MPIException
      Each process sends the contents of its send buffer to the root process.

      Java binding of the MPI operation MPI_IGATHER using MPI_IN_PLACE instead of the send buffer. The buffer is used by the root process to receive data, and it is used by the non-root processes to send data.

      Parameters:
      buf - buffer
      count - number of items to send/receive
      type - datatype of each item in buffer
      root - rank of receiving process
      Returns:
      communication request
      Throws:
      MPIException - Signals that an MPI exception of some sort has occurred.
    • gatherv

      public final void gatherv(Object sendbuf, int sendcount, Datatype sendtype, Object recvbuf, int[] recvcount, int[] displs, Datatype recvtype, int root) throws MPIException
      Extends functionality of gather by allowing varying counts of data from each process.

      Java binding of the MPI operation MPI_GATHERV.

      Parameters:
      sendbuf - send buffer
      sendcount - number of items to send
      sendtype - datatype of each item in send buffer
      recvbuf - receive buffer
      recvcount - number of elements received from each process
      displs - displacements at which to place incoming data
      recvtype - datatype of each item in receive buffer
      root - rank of receiving process
      Throws:
      MPIException - Signals that an MPI exception of some sort has occurred.
    • gatherv

      public final void gatherv(Object recvbuf, int[] recvcount, int[] displs, Datatype recvtype, int root) throws MPIException
      Extends functionality of gather by allowing varying counts of data from each process.

      Java binding of the MPI operation MPI_GATHERV using MPI_IN_PLACE instead of the send buffer in the root process. This method must be used in the root process.

      Parameters:
      recvbuf - receive buffer
      recvcount - number of elements received from each process
      displs - displacements at which to place incoming data
      recvtype - datatype of each item in receive buffer
      root - rank of receiving process
      Throws:
      MPIException - Signals that an MPI exception of some sort has occurred.
    • gatherv

      public final void gatherv(Object sendbuf, int sendcount, Datatype sendtype, int root) throws MPIException
      Extends functionality of gather by allowing varying counts of data from each process.

      Java binding of the MPI operation MPI_GATHERV using MPI_IN_PLACE instead of the send buffer in the root process. This method must be used in the non-root processes.

      Parameters:
      sendbuf - send buffer
      sendcount - number of items to send
      sendtype - datatype of each item in send buffer
      root - rank of receiving process
      Throws:
      MPIException - Signals that an MPI exception of some sort has occurred.
    • iGatherv

      public final Request iGatherv(Buffer sendbuf, int sendcount, Datatype sendtype, Buffer recvbuf, int[] recvcount, int[] displs, Datatype recvtype, int root) throws MPIException
      Extends functionality of gather by allowing varying counts of data from each process.

      Java binding of the MPI operation MPI_IGATHERV.

      Parameters:
      sendbuf - send buffer
      sendcount - number of items to send
      sendtype - datatype of each item in send buffer
      recvbuf - receive buffer
      recvcount - number of elements received from each process
      displs - displacements at which to place incoming data
      recvtype - datatype of each item in receive buffer
      root - rank of receiving process
      Returns:
      communication request
      Throws:
      MPIException - Signals that an MPI exception of some sort has occurred.
    • iGatherv

      public final Request iGatherv(Buffer recvbuf, int[] recvcount, int[] displs, Datatype recvtype, int root) throws MPIException
      Extends functionality of gather by allowing varying counts of data from each process.

      Java binding of the MPI operation MPI_IGATHERV using MPI_IN_PLACE instead of the send buffer in the root process. This method must be used in the root process.

      Parameters:
      recvbuf - receive buffer
      recvcount - number of elements received from each process
      displs - displacements at which to place incoming data
      recvtype - datatype of each item in receive buffer
      root - rank of receiving process
      Returns:
      communication request
      Throws:
      MPIException - Signals that an MPI exception of some sort has occurred.
    • iGatherv

      public final Request iGatherv(Buffer sendbuf, int sendcount, Datatype sendtype, int root) throws MPIException
      Extends functionality of gather by allowing varying counts of data from each process.

      Java binding of the MPI operation MPI_IGATHERV using MPI_IN_PLACE instead of the send buffer in the root process. This method must be used in the non-root processes.

      Parameters:
      sendbuf - send buffer
      sendcount - number of items to send
      sendtype - datatype of each item in send buffer
      root - rank of receiving process
      Returns:
      communication request
      Throws:
      MPIException - Signals that an MPI exception of some sort has occurred.
    • scatter

      public final void scatter(Object sendbuf, int sendcount, Datatype sendtype, Object recvbuf, int recvcount, Datatype recvtype, int root) throws MPIException
      Inverse of the operation gather.

      Java binding of the MPI operation MPI_SCATTER.

      Parameters:
      sendbuf - send buffer
      sendcount - number of items to send
      sendtype - datatype of each item in send buffer
      recvbuf - receive buffer
      recvcount - number of items to receive
      recvtype - datatype of each item in receive buffer
      root - rank of sending process
      Throws:
      MPIException - Signals that an MPI exception of some sort has occurred.
    • scatter

      public final void scatter(Object buf, int count, Datatype type, int root) throws MPIException
      Inverse of the operation gather.

      Java binding of the MPI operation MPI_SCATTER using MPI_IN_PLACE instead of the receive buffer. The buffer is used by the root process to send data, and it is used by the non-root processes to receive data.

      Parameters:
      buf - send/receive buffer
      count - number of items to send/receive
      type - datatype of each item in buffer
      root - rank of sending process
      Throws:
      MPIException - Signals that an MPI exception of some sort has occurred.
    • iScatter

      public final Request iScatter(Buffer sendbuf, int sendcount, Datatype sendtype, Buffer recvbuf, int recvcount, Datatype recvtype, int root) throws MPIException
      Inverse of the operation gather.

      Java binding of the MPI operation MPI_ISCATTER.

      Parameters:
      sendbuf - send buffer
      sendcount - number of items to send
      sendtype - datatype of each item in send buffer
      recvbuf - receive buffer
      recvcount - number of items to receive
      recvtype - datatype of each item in receive buffer
      root - rank of sending process
      Returns:
      communication request
      Throws:
      MPIException - Signals that an MPI exception of some sort has occurred.
    • iScatter

      public final Request iScatter(Buffer buf, int count, Datatype type, int root) throws MPIException
      Inverse of the operation gather.

      Java binding of the MPI operation MPI_ISCATTER using MPI_IN_PLACE instead of the receive buffer. The buffer is used by the root process to send data, and it is used by the non-root processes to receive data.

      Parameters:
      buf - send/receive buffer
      count - number of items to send/receive
      type - datatype of each item in buffer
      root - rank of sending process
      Returns:
      communication request
      Throws:
      MPIException - Signals that an MPI exception of some sort has occurred.
    • scatterv

      public final void scatterv(Object sendbuf, int[] sendcount, int[] displs, Datatype sendtype, Object recvbuf, int recvcount, Datatype recvtype, int root) throws MPIException
      Inverse of the operation gatherv.

      Java binding of the MPI operation MPI_SCATTERV.

      Parameters:
      sendbuf - send buffer
      sendcount - number of items sent to each process
      displs - displacements from which to take outgoing data
      sendtype - datatype of each item in send buffer
      recvbuf - receive buffer
      recvcount - number of items to receive
      recvtype - datatype of each item in receive buffer
      root - rank of sending process
      Throws:
      MPIException - Signals that an MPI exception of some sort has occurred.
    • scatterv

      public final void scatterv(Object sendbuf, int[] sendcount, int[] displs, Datatype sendtype, int root) throws MPIException
      Inverse of the operation gatherv.

      Java binding of the MPI operation MPI_SCATTERV using MPI_IN_PLACE instead of the receive buffer in the root process. This method must be used in the root process.

      Parameters:
      sendbuf - send buffer
      sendcount - number of items sent to each process
      displs - displacements from which to take outgoing data
      sendtype - datatype of each item in send buffer
      root - rank of sending process
      Throws:
      MPIException - Signals that an MPI exception of some sort has occurred.
    • scatterv

      public final void scatterv(Object recvbuf, int recvcount, Datatype recvtype, int root) throws MPIException
      Inverse of the operation gatherv.

      Java binding of the MPI operation MPI_SCATTERV using MPI_IN_PLACE instead of the receive buffer in the root process. This method must be used in the non-root processes.

      Parameters:
      recvbuf - receive buffer
      recvcount - number of items to receive
      recvtype - datatype of each item in receive buffer
      root - rank of sending process
      Throws:
      MPIException - Signals that an MPI exception of some sort has occurred.
    • iScatterv

      public final Request iScatterv(Buffer sendbuf, int[] sendcount, int[] displs, Datatype sendtype, Buffer recvbuf, int recvcount, Datatype recvtype, int root) throws MPIException
      Inverse of the operation gatherv.

      Java binding of the MPI operation MPI_ISCATTERV.

      Parameters:
      sendbuf - send buffer
      sendcount - number of items sent to each process
      displs - displacements from which to take outgoing data
      sendtype - datatype of each item in send buffer
      recvbuf - receive buffer
      recvcount - number of items to receive
      recvtype - datatype of each item in receive buffer
      root - rank of sending process
      Returns:
      communication request
      Throws:
      MPIException - Signals that an MPI exception of some sort has occurred.
    • iScatterv

      public final Request iScatterv(Buffer sendbuf, int[] sendcount, int[] displs, Datatype sendtype, int root) throws MPIException
      Inverse of the operation gatherv.

      Java binding of the MPI operation MPI_ISCATTERV using MPI_IN_PLACE instead of the receive buffer in the root process. This method must be used in the root process.

      Parameters:
      sendbuf - send buffer
      sendcount - number of items sent to each process
      displs - displacements from which to take outgoing data
      sendtype - datatype of each item in send buffer
      root - rank of sending process
      Returns:
      communication request
      Throws:
      MPIException - Signals that an MPI exception of some sort has occurred.
    • iScatterv

      public final Request iScatterv(Buffer recvbuf, int recvcount, Datatype recvtype, int root) throws MPIException
      Inverse of the operation gatherv.

      Java binding of the MPI operation MPI_ISCATTERV using MPI_IN_PLACE instead of the receive buffer in the root process. This method must be used in the non-root processes.

      Parameters:
      recvbuf - receive buffer
      recvcount - number of items to receive
      recvtype - datatype of each item in receive buffer
      root - rank of sending process
      Returns:
      communication request
      Throws:
      MPIException - Signals that an MPI exception of some sort has occurred.
    • allGather

      public final void allGather(Object sendbuf, int sendcount, Datatype sendtype, Object recvbuf, int recvcount, Datatype recvtype) throws MPIException
      Similar to gather, but all processes receive the result.

      Java binding of the MPI operation MPI_ALLGATHER.

      Parameters:
      sendbuf - send buffer
      sendcount - number of items to send
      sendtype - datatype of each item in send buffer
      recvbuf - receive buffer
      recvcount - number of items to receive
      recvtype - datatype of each item in receive buffer
      Throws:
      MPIException - Signals that an MPI exception of some sort has occurred.
    • allGather

      public final void allGather(Object buf, int count, Datatype type) throws MPIException
      Similar to gather, but all processes receive the result.

      Java binding of the MPI operation MPI_ALLGATHER using MPI_IN_PLACE instead of the send buffer.

      Parameters:
      buf - receive buffer
      count - number of items to receive
      type - datatype of each item in receive buffer
      Throws:
      MPIException - Signals that an MPI exception of some sort has occurred.
    • iAllGather

      public final Request iAllGather(Buffer sendbuf, int sendcount, Datatype sendtype, Buffer recvbuf, int recvcount, Datatype recvtype) throws MPIException
      Similar to gather, but all processes receive the result.

      Java binding of the MPI operation MPI_IALLGATHER.

      Parameters:
      sendbuf - send buffer
      sendcount - number of items to send
      sendtype - datatype of each item in send buffer
      recvbuf - receive buffer
      recvcount - number of items to receive
      recvtype - datatype of each item in receive buffer
      Returns:
      communication request
      Throws:
      MPIException - Signals that an MPI exception of some sort has occurred.
    • iAllGather

      public final Request iAllGather(Buffer buf, int count, Datatype type) throws MPIException
      Similar to gather, but all processes receive the result.

      Java binding of the MPI operation MPI_IALLGATHER using MPI_IN_PLACE instead of the send buffer.

      Parameters:
      buf - receive buffer
      count - number of items to receive
      type - datatype of each item in receive buffer
      Returns:
      communication request
      Throws:
      MPIException - Signals that an MPI exception of some sort has occurred.
    • allGatherv

      public final void allGatherv(Object sendbuf, int sendcount, Datatype sendtype, Object recvbuf, int[] recvcount, int[] displs, Datatype recvtype) throws MPIException
      Similar to gatherv, but all processes receive the result.

      Java binding of the MPI operation MPI_ALLGATHERV.

      Parameters:
      sendbuf - send buffer
      sendcount - number of items to send
      sendtype - datatype of each item in send buffer
      recvbuf - receive buffer
      recvcount - number of elements received from each process
      displs - displacements at which to place incoming data
      recvtype - datatype of each item in receive buffer
      Throws:
      MPIException - Signals that an MPI exception of some sort has occurred.
    • allGatherv

      public final void allGatherv(Object recvbuf, int[] recvcount, int[] displs, Datatype recvtype) throws MPIException
      Similar to gatherv, but all processes receive the result.

      Java binding of the MPI operation MPI_ALLGATHERV using MPI_IN_PLACE instead of the send buffer.

      Parameters:
      recvbuf - receive buffer
      recvcount - number of elements received from each process
      displs - displacements at which to place incoming data
      recvtype - datatype of each item in receive buffer
      Throws:
      MPIException - Signals that an MPI exception of some sort has occurred.
    • iAllGatherv

      public final Request iAllGatherv(Buffer sendbuf, int sendcount, Datatype sendtype, Buffer recvbuf, int[] recvcount, int[] displs, Datatype recvtype) throws MPIException
      Similar to gatherv, but all processes receive the result.

      Java binding of the MPI operation MPI_IALLGATHERV.

      Parameters:
      sendbuf - send buffer
      sendcount - number of items to send
      sendtype - datatype of each item in send buffer
      recvbuf - receive buffer
      recvcount - number of elements received from each process
      displs - displacements at which to place incoming data
      recvtype - datatype of each item in receive buffer
      Returns:
      communication request
      Throws:
      MPIException - Signals that an MPI exception of some sort has occurred.
    • iAllGatherv

      public final Request iAllGatherv(Buffer buf, int[] count, int[] displs, Datatype type) throws MPIException
      Similar to gatherv, but all processes receive the result.

      Java binding of the MPI operation MPI_IALLGATHERV using MPI_IN_PLACE instead of the send buffer.

      Parameters:
      buf - receive buffer
      count - number of elements received from each process
      displs - displacements at which to place incoming data
      type - datatype of each item in receive buffer
      Returns:
      communication request
      Throws:
      MPIException - Signals that an MPI exception of some sort has occurred.
    • allToAll

      public final void allToAll(Object sendbuf, int sendcount, Datatype sendtype, Object recvbuf, int recvcount, Datatype recvtype) throws MPIException
      Extension of allGather to the case where each process sends distinct data to each of the receivers.

      Java binding of the MPI operation MPI_ALLTOALL.

      Parameters:
      sendbuf - send buffer
      sendcount - number of items sent to each process
      sendtype - datatype send buffer items
      recvbuf - receive buffer
      recvcount - number of items received from any process
      recvtype - datatype of receive buffer items
      Throws:
      MPIException - Signals that an MPI exception of some sort has occurred.
    • iAllToAll

      public final Request iAllToAll(Buffer sendbuf, int sendcount, Datatype sendtype, Buffer recvbuf, int recvcount, Datatype recvtype) throws MPIException
      Extension of allGather to the case where each process sends distinct data to each of the receivers.

      Java binding of the MPI operation MPI_IALLTOALL.

      Parameters:
      sendbuf - send buffer
      sendcount - number of items sent to each process
      sendtype - datatype send buffer items
      recvbuf - receive buffer
      recvcount - number of items received from any process
      recvtype - datatype of receive buffer items
      Returns:
      communication request
      Throws:
      MPIException - Signals that an MPI exception of some sort has occurred.
    • allToAllv

      public final void allToAllv(Object sendbuf, int[] sendcount, int[] sdispls, Datatype sendtype, Object recvbuf, int[] recvcount, int[] rdispls, Datatype recvtype) throws MPIException
      Adds flexibility to allToAll: location of data for send is specified by sdispls and location to place data on receive side is specified by rdispls.

      Java binding of the MPI operation MPI_ALLTOALLV.

      Parameters:
      sendbuf - send buffer
      sendcount - number of items sent to each buffer
      sdispls - displacements from which to take outgoing data
      sendtype - datatype send buffer items
      recvbuf - receive buffer
      recvcount - number of elements received from each process
      rdispls - displacements at which to place incoming data
      recvtype - datatype of each item in receive buffer
      Throws:
      MPIException - Signals that an MPI exception of some sort has occurred.
    • iAllToAllv

      public final Request iAllToAllv(Buffer sendbuf, int[] sendcount, int[] sdispls, Datatype sendtype, Buffer recvbuf, int[] recvcount, int[] rdispls, Datatype recvtype) throws MPIException
      Adds flexibility to allToAll: location of data for send is specified by sdispls and location to place data on receive side is specified by rdispls.

      Java binding of the MPI operation MPI_IALLTOALLV.

      Parameters:
      sendbuf - send buffer
      sendcount - number of items sent to each buffer
      sdispls - displacements from which to take outgoing data
      sendtype - datatype send buffer items
      recvbuf - receive buffer
      recvcount - number of elements received from each process
      rdispls - displacements at which to place incoming data
      recvtype - datatype of each item in receive buffer
      Returns:
      communication request
      Throws:
      MPIException - Signals that an MPI exception of some sort has occurred.
    • allToAllw

      public final void allToAllw(Buffer sendBuf, int[] sendCount, int[] sDispls, Datatype[] sendTypes, Buffer recvBuf, int[] recvCount, int[] rDispls, Datatype[] recvTypes) throws MPIException
      Adds more flexibility to allToAllv: datatypes for send are specified by sendTypes and datatypes for receive are specified by recvTypes per process.

      Java binding of the MPI operation MPI_ALLTOALLW.

      Parameters:
      sendBuf - send buffer
      sendCount - number of items sent to each buffer
      sDispls - displacements from which to take outgoing data
      sendTypes - datatypes of send buffer items
      recvBuf - receive buffer
      recvCount - number of elements received from each process
      rDispls - displacements at which to place incoming data
      recvTypes - datatype of each item in receive buffer
      Throws:
      MPIException - Signals that an MPI exception of some sort has occurred.
    • iAllToAllw

      public final Request iAllToAllw(Buffer sendBuf, int[] sendCount, int[] sDispls, Datatype[] sendTypes, Buffer recvBuf, int[] recvCount, int[] rDispls, Datatype[] recvTypes) throws MPIException
      Adds more flexibility to iAllToAllv: datatypes for send are specified by sendTypes and datatypes for receive are specified by recvTypes per process.

      Java binding of the MPI operation MPI_IALLTOALLW.

      Parameters:
      sendBuf - send buffer
      sendCount - number of items sent to each buffer
      sDispls - displacements from which to take outgoing data
      sendTypes - datatype send buffer items
      recvBuf - receive buffer
      recvCount - number of elements received from each process
      rDispls - displacements at which to place incoming data
      recvTypes - datatype of each item in receive buffer
      Returns:
      communication request
      Throws:
      MPIException - Signals that an MPI exception of some sort has occurred.
    • neighborAllGather

      public final void neighborAllGather(Object sendbuf, int sendcount, Datatype sendtype, Object recvbuf, int recvcount, Datatype recvtype) throws MPIException
      Java binding of MPI_NEIGHBOR_ALLGATHER.
      Parameters:
      sendbuf - send buffer
      sendcount - number of items to send
      sendtype - datatype of each item in send buffer
      recvbuf - receive buffer
      recvcount - number of items to receive
      recvtype - datatype of each item in receive buffer
      Throws:
      MPIException - Signals that an MPI exception of some sort has occurred.
    • iNeighborAllGather

      public final Request iNeighborAllGather(Buffer sendbuf, int sendcount, Datatype sendtype, Buffer recvbuf, int recvcount, Datatype recvtype) throws MPIException
      Java binding of MPI_INEIGHBOR_ALLGATHER.
      Parameters:
      sendbuf - send buffer
      sendcount - number of items to send
      sendtype - datatype of each item in send buffer
      recvbuf - receive buffer
      recvcount - number of items to receive
      recvtype - datatype of each item in receive buffer
      Returns:
      communication request
      Throws:
      MPIException - Signals that an MPI exception of some sort has occurred.
    • neighborAllGatherv

      public final void neighborAllGatherv(Object sendbuf, int sendcount, Datatype sendtype, Object recvbuf, int[] recvcount, int[] displs, Datatype recvtype) throws MPIException
      Java binding of MPI_NEIGHBOR_ALLGATHERV.
      Parameters:
      sendbuf - send buffer
      sendcount - number of items to send
      sendtype - datatype of each item in send buffer
      recvbuf - receive buffer
      recvcount - number of elements that are received from each neighbor
      displs - displacements at which to place incoming data
      recvtype - datatype of receive buffer elements
      Throws:
      MPIException - Signals that an MPI exception of some sort has occurred.
    • iNeighborAllGatherv

      public final Request iNeighborAllGatherv(Buffer sendbuf, int sendcount, Datatype sendtype, Buffer recvbuf, int[] recvcount, int[] displs, Datatype recvtype) throws MPIException
      Java binding of MPI_INEIGHBOR_ALLGATHERV.
      Parameters:
      sendbuf - send buffer
      sendcount - number of items to send
      sendtype - datatype of each item in send buffer
      recvbuf - receive buffer
      recvcount - number of elements that are received from each neighbor
      displs - displacements at which to place incoming data
      recvtype - datatype of receive buffer elements
      Returns:
      communication request
      Throws:
      MPIException - Signals that an MPI exception of some sort has occurred.
    • neighborAllToAll

      public final void neighborAllToAll(Object sendbuf, int sendcount, Datatype sendtype, Object recvbuf, int recvcount, Datatype recvtype) throws MPIException
      Java binding of MPI_NEIGHBOR_ALLTOALL.
      Parameters:
      sendbuf - send buffer
      sendcount - number of items to send
      sendtype - datatype of each item in send buffer
      recvbuf - receive buffer
      recvcount - number of items to receive
      recvtype - datatype of each item in receive buffer
      Throws:
      MPIException - Signals that an MPI exception of some sort has occurred.
    • iNeighborAllToAll

      public final Request iNeighborAllToAll(Buffer sendbuf, int sendcount, Datatype sendtype, Buffer recvbuf, int recvcount, Datatype recvtype) throws MPIException
      Java binding of MPI_INEIGHBOR_ALLTOALL.
      Parameters:
      sendbuf - send buffer
      sendcount - number of items to send
      sendtype - datatype of each item in send buffer
      recvbuf - receive buffer
      recvcount - number of items to receive
      recvtype - datatype of each item in receive buffer
      Returns:
      communication request
      Throws:
      MPIException - Signals that an MPI exception of some sort has occurred.
    • neighborAllToAllv

      public final void neighborAllToAllv(Object sendbuf, int[] sendcount, int[] sdispls, Datatype sendtype, Object recvbuf, int[] recvcount, int[] rdispls, Datatype recvtype) throws MPIException
      Java binding of MPI_NEIGHBOR_ALLTOALLV.
      Parameters:
      sendbuf - send buffer
      sendcount - number of items sent to each buffer
      sdispls - displacements from which to take outgoing data
      sendtype - datatype send buffer items
      recvbuf - receive buffer
      recvcount - number of elements received from each process
      rdispls - displacements at which to place incoming data
      recvtype - datatype of each item in receive buffer
      Throws:
      MPIException - Signals that an MPI exception of some sort has occurred.
    • iNeighborAllToAllv

      public final Request iNeighborAllToAllv(Buffer sendbuf, int[] sendcount, int[] sdispls, Datatype sendtype, Buffer recvbuf, int[] recvcount, int[] rdispls, Datatype recvtype) throws MPIException
      Java binding of MPI_INEIGHBOR_ALLTOALLV.
      Parameters:
      sendbuf - send buffer
      sendcount - number of items sent to each buffer
      sdispls - displacements from which to take outgoing data
      sendtype - datatype send buffer items
      recvbuf - receive buffer
      recvcount - number of elements received from each process
      rdispls - displacements at which to place incoming data
      recvtype - datatype of each item in receive buffer
      Returns:
      communication request
      Throws:
      MPIException - Signals that an MPI exception of some sort has occurred.
    • reduce

      public final void reduce(Object sendbuf, Object recvbuf, int count, Datatype type, Op op, int root) throws MPIException
      Combine elements in input buffer of each process using the reduce operation, and return the combined value in the output buffer of the root process.

      Java binding of the MPI operation MPI_REDUCE.

      The predefined operations are available in Java as MPI.MAX, MPI.MIN, MPI.SUM, MPI.PROD, MPI.LAND, MPI.BAND, MPI.LOR, MPI.BOR, MPI.LXOR, MPI.BXOR, MPI.MINLOC and MPI.MAXLOC.

      Parameters:
      sendbuf - send buffer
      recvbuf - receive buffer
      count - number of items in send buffer
      type - data type of each item in send buffer
      op - reduce operation
      root - rank of root process
      Throws:
      MPIException - Signals that an MPI exception of some sort has occurred.
    • reduce

      public final void reduce(Object buf, int count, Datatype type, Op op, int root) throws MPIException
      Combine elements in input buffer of each process using the reduce operation, and return the combined value in the output buffer of the root process.

      Java binding of the MPI operation MPI_REDUCE using MPI_IN_PLACE instead of the send buffer.

      Parameters:
      buf - send/receive buffer
      count - number of items in buffer
      type - data type of each item in buffer
      op - reduce operation
      root - rank of root process
      Throws:
      MPIException - Signals that an MPI exception of some sort has occurred.
    • iReduce

      public final Request iReduce(Buffer sendbuf, Buffer recvbuf, int count, Datatype type, Op op, int root) throws MPIException
      Combine elements in input buffer of each process using the reduce operation, and return the combined value in the output buffer of the root process.

      Java binding of the MPI operation MPI_IREDUCE.

      Parameters:
      sendbuf - send buffer
      recvbuf - receive buffer
      count - number of items in send buffer
      type - data type of each item in send buffer
      op - reduce operation
      root - rank of root process
      Returns:
      communication request
      Throws:
      MPIException - Signals that an MPI exception of some sort has occurred.
    • iReduce

      public final Request iReduce(Buffer buf, int count, Datatype type, Op op, int root) throws MPIException
      Combine elements in input buffer of each process using the reduce operation, and return the combined value in the output buffer of the root process.

      Java binding of the MPI operation MPI_IREDUCE using MPI_IN_PLACE instead of the send buffer.

      Parameters:
      buf - send/receive buffer
      count - number of items in buffer
      type - data type of each item in buffer
      op - reduce operation
      root - rank of root process
      Returns:
      communication request
      Throws:
      MPIException - Signals that an MPI exception of some sort has occurred.
    • allReduce

      public final void allReduce(Object sendbuf, Object recvbuf, int count, Datatype type, Op op) throws MPIException
      Same as reduce except that the result appears in receive buffer of all process in the group.

      Java binding of the MPI operation MPI_ALLREDUCE.

      Parameters:
      sendbuf - send buffer
      recvbuf - receive buffer
      count - number of items in send buffer
      type - data type of each item in send buffer
      op - reduce operation
      Throws:
      MPIException - Signals that an MPI exception of some sort has occurred.
    • allReduce

      public final void allReduce(Object buf, int count, Datatype type, Op op) throws MPIException
      Same as reduce except that the result appears in receive buffer of all process in the group.

      Java binding of the MPI operation MPI_ALLREDUCE using MPI_IN_PLACE instead of the send buffer.

      Parameters:
      buf - receive buffer
      count - number of items in send buffer
      type - data type of each item in send buffer
      op - reduce operation
      Throws:
      MPIException - Signals that an MPI exception of some sort has occurred.
    • iAllReduce

      public final Request iAllReduce(Buffer sendbuf, Buffer recvbuf, int count, Datatype type, Op op) throws MPIException
      Same as reduce except that the result appears in receive buffer of all process in the group.

      Java binding of the MPI operation MPI_IALLREDUCE.

      Parameters:
      sendbuf - send buffer
      recvbuf - receive buffer
      count - number of items in send buffer
      type - data type of each item in send buffer
      op - reduce operation
      Returns:
      communication request
      Throws:
      MPIException - Signals that an MPI exception of some sort has occurred.
    • iAllReduce

      public final Request iAllReduce(Buffer buf, int count, Datatype type, Op op) throws MPIException
      Same as reduce except that the result appears in receive buffer of all process in the group.

      Java binding of the MPI operation MPI_IALLREDUCE using MPI_IN_PLACE instead of the send buffer.

      Parameters:
      buf - receive buffer
      count - number of items in send buffer
      type - data type of each item in send buffer
      op - reduce operation
      Returns:
      communication request
      Throws:
      MPIException - Signals that an MPI exception of some sort has occurred.
    • reduceScatter

      public final void reduceScatter(Object sendbuf, Object recvbuf, int[] recvcounts, Datatype type, Op op) throws MPIException
      Combine elements in input buffer of each process using the reduce operation, and scatter the combined values over the output buffers of the processes.

      Java binding of the MPI operation MPI_REDUCE_SCATTER.

      Parameters:
      sendbuf - send buffer
      recvbuf - receive buffer
      recvcounts - numbers of result elements distributed to each process
      type - data type of each item in send buffer
      op - reduce operation
      Throws:
      MPIException - Signals that an MPI exception of some sort has occurred.
    • reduceScatter

      public final void reduceScatter(Object buf, int[] counts, Datatype type, Op op) throws MPIException
      Combine elements in input buffer of each process using the reduce operation, and scatter the combined values over the output buffers of the processes.

      Java binding of the MPI operation MPI_REDUCE_SCATTER using MPI_IN_PLACE instead of the send buffer.

      Parameters:
      buf - receive buffer
      counts - numbers of result elements distributed to each process
      type - data type of each item in send buffer
      op - reduce operation
      Throws:
      MPIException - Signals that an MPI exception of some sort has occurred.
    • iReduceScatter

      public final Request iReduceScatter(Buffer sendbuf, Buffer recvbuf, int[] recvcounts, Datatype type, Op op) throws MPIException
      Combine elements in input buffer of each process using the reduce operation, and scatter the combined values over the output buffers of the processes.

      Java binding of the MPI operation MPI_IREDUCE_SCATTER.

      Parameters:
      sendbuf - send buffer
      recvbuf - receive buffer
      recvcounts - numbers of result elements distributed to each process
      type - data type of each item in send buffer
      op - reduce operation
      Returns:
      communication request
      Throws:
      MPIException - Signals that an MPI exception of some sort has occurred.
    • iReduceScatter

      public final Request iReduceScatter(Buffer buf, int[] counts, Datatype type, Op op) throws MPIException
      Combine elements in input buffer of each process using the reduce operation, and scatter the combined values over the output buffers of the processes.

      Java binding of the MPI operation MPI_IREDUCE_SCATTER using MPI_IN_PLACE instead of the send buffer.

      Parameters:
      buf - receive buffer
      counts - numbers of result elements distributed to each process
      type - data type of each item in send buffer
      op - reduce operation
      Returns:
      communication request
      Throws:
      MPIException - Signals that an MPI exception of some sort has occurred.
    • reduceScatterBlock

      public final void reduceScatterBlock(Object sendbuf, Object recvbuf, int recvcount, Datatype type, Op op) throws MPIException
      Combine values and scatter the results.

      Java binding of the MPI operation MPI_REDUCE_SCATTER_BLOCK.

      Parameters:
      sendbuf - send buffer
      recvbuf - receive buffer
      recvcount - element count per block
      type - data type of each item in send buffer
      op - reduce operation
      Throws:
      MPIException - Signals that an MPI exception of some sort has occurred.
    • reduceScatterBlock

      public final void reduceScatterBlock(Object buf, int count, Datatype type, Op op) throws MPIException
      Combine values and scatter the results.

      Java binding of the MPI operation MPI_REDUCE_SCATTER_BLOCK using MPI_IN_PLACE instead of the send buffer.

      Parameters:
      buf - receive buffer
      count - element count per block
      type - data type of each item in send buffer
      op - reduce operation
      Throws:
      MPIException - Signals that an MPI exception of some sort has occurred.
    • iReduceScatterBlock

      public final Request iReduceScatterBlock(Buffer sendbuf, Buffer recvbuf, int recvcount, Datatype type, Op op) throws MPIException
      Combine values and scatter the results.

      Java binding of the MPI operation MPI_IREDUCE_SCATTER_BLOCK.

      Parameters:
      sendbuf - send buffer
      recvbuf - receive buffer
      recvcount - element count per block
      type - data type of each item in send buffer
      op - reduce operation
      Returns:
      communication request
      Throws:
      MPIException - Signals that an MPI exception of some sort has occurred.
    • iReduceScatterBlock

      public final Request iReduceScatterBlock(Buffer buf, int count, Datatype type, Op op) throws MPIException
      Combine values and scatter the results.

      Java binding of the MPI operation MPI_IREDUCE_SCATTER_BLOCK using MPI_IN_PLACE instead of the send buffer.

      Parameters:
      buf - receive buffer
      count - element count per block
      type - data type of each item in send buffer
      op - reduce operation
      Returns:
      communication request
      Throws:
      MPIException - Signals that an MPI exception of some sort has occurred.
    • reduceLocal

      public static void reduceLocal(Object inBuf, Object inOutBuf, int count, Datatype type, Op op) throws MPIException
      Apply the operation given by op element-wise to the elements of inBuf and inOutBuf with the result stored element-wise in inOutBuf.

      Java binding of the MPI operation MPI_REDUCE_LOCAL.

      Parameters:
      inBuf - input buffer
      inOutBuf - input buffer, will contain combined output
      count - number of elements
      type - data type of each item
      op - reduce operation
      Throws:
      MPIException - Signals that an MPI exception of some sort has occurred.
    • setName

      public final void setName(String name) throws MPIException
      Sets the print name for the communicator.
      Parameters:
      name - name for the communicator
      Throws:
      MPIException - Signals that an MPI exception of some sort has occurred.
    • getName

      public final String getName() throws MPIException
      Return the print name from the communicator.
      Returns:
      name of the communicator
      Throws:
      MPIException - Signals that an MPI exception of some sort has occurred.