Class Comm
Comm
class represents communicators.-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected long
protected static final int
static final int
protected static final int
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal void
abort
(int errorcode) Abort MPI.final void
Similar togather
, but all processes receive the result.final void
allGather
(Object sendbuf, int sendcount, Datatype sendtype, Object recvbuf, int recvcount, Datatype recvtype) Similar togather
, but all processes receive the result.final void
allGatherv
(Object recvbuf, int[] recvcount, int[] displs, Datatype recvtype) Similar togatherv
, but all processes receive the result.final void
allGatherv
(Object sendbuf, int sendcount, Datatype sendtype, Object recvbuf, int[] recvcount, int[] displs, Datatype recvtype) Similar togatherv
, but all processes receive the result.final void
Same asreduce
except that the result appears in receive buffer of all process in the group.final void
Same asreduce
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 ofallGather
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 toallToAll
: location of data for send is specified bysdispls
and location to place data on receive side is specified byrdispls
.final void
allToAllw
(Buffer sendBuf, int[] sendCount, int[] sDispls, Datatype[] sendTypes, Buffer recvBuf, int[] recvCount, int[] rDispls, Datatype[] recvTypes) Adds more flexibility toallToAllv
: datatypes for send are specified bysendTypes
and datatypes for receive are specified byrecvTypes
per process.final void
barrier()
A call tobarrier
blocks the caller until all process in the group have called it.final void
Broadcast a message from the process with rankroot
to all processes of the group.final void
Send in buffered mode.final Prequest
Creates a persistent communication request for a buffered mode send.void
callErrhandler
(int errorCode) Calls the error handler currently associated with the communicator.clone()
Duplicates this communicator.static int
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 operationMPI_COMM_DISCONNECT
.dup()
Duplicates this communicator.protected final long
dup
(long comm) protected final long
dupWithInfo
(long comm, long info) dupWithInfo
(Info info) Duplicates this communicator with the info object used in the call.final void
free()
Java binding of the MPI operationMPI_COMM_FREE
.static void
freeKeyval
(int keyval) Frees an attribute key for communicators.final void
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
Extends functionality ofgather
by allowing varying counts of data from each process.final void
Extends functionality ofgather
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 ofgather
by allowing varying counts of data from each process.final Object
getAttr
(int keyval) Retrieves attribute value by key.final Errhandler
Returns the error handler currently associated with the communicator.final Group
getGroup()
Return group associated with a communicator.final Info
getInfo()
Java binding ofMPI_COMM_GET_INFO
.final String
getName()
Return the print name from the communicator.final int
getRank()
Rank of this process in group of this communicator.final Request
Returns the associated request to this communicator if it was created usingiDup()
.final int
getSize()
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 togather
, but all processes receive the result.final Request
iAllGather
(Buffer sendbuf, int sendcount, Datatype sendtype, Buffer recvbuf, int recvcount, Datatype recvtype) Similar togather
, but all processes receive the result.final Request
iAllGatherv
(Buffer buf, int[] count, int[] displs, Datatype type) Similar togatherv
, but all processes receive the result.final Request
iAllGatherv
(Buffer sendbuf, int sendcount, Datatype sendtype, Buffer recvbuf, int[] recvcount, int[] displs, Datatype recvtype) Similar togatherv
, but all processes receive the result.final Request
iAllReduce
(Buffer buf, int count, Datatype type, Op op) Same asreduce
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 asreduce
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 ofallGather
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 toallToAll
: location of data for send is specified bysdispls
and location to place data on receive side is specified byrdispls
.final Request
iAllToAllw
(Buffer sendBuf, int[] sendCount, int[] sDispls, Datatype[] sendTypes, Buffer recvBuf, int[] recvCount, int[] rDispls, Datatype[] recvTypes) Adds more flexibility toiAllToAllv
: datatypes for send are specified bysendTypes
and datatypes for receive are specified byrecvTypes
per process.final Request
iBarrier()
Nonblocking barrier sinchronization.final Request
Broadcast a message from the process with rankroot
to all processes of the group.final Request
Start a buffered mode, nonblocking send.iDup()
Duplicates this communicator.protected final long[]
iDup
(long comm) final Request
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
Extends functionality ofgather
by allowing varying counts of data from each process.final Request
Extends functionality ofgather
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 ofgather
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 ofMPI_INEIGHBOR_ALLGATHER
.final Request
iNeighborAllGatherv
(Buffer sendbuf, int sendcount, Datatype sendtype, Buffer recvbuf, int[] recvcount, int[] displs, Datatype recvtype) Java binding ofMPI_INEIGHBOR_ALLGATHERV
.final Request
iNeighborAllToAll
(Buffer sendbuf, int sendcount, Datatype sendtype, Buffer recvbuf, int recvcount, Datatype recvtype) Java binding ofMPI_INEIGHBOR_ALLTOALL
.final Request
iNeighborAllToAllv
(Buffer sendbuf, int[] sendcount, int[] sdispls, Datatype sendtype, Buffer recvbuf, int[] recvcount, int[] rdispls, Datatype recvtype) Java binding ofMPI_INEIGHBOR_ALLTOALLV
.final Status
iProbe
(int source, int tag) Check if there is an incoming message matching the pattern specified.final Request
Start a nonblocking receive.final Request
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
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
Start a ready mode, nonblocking send.final Request
Inverse of the operationgather
.final Request
iScatter
(Buffer sendbuf, int sendcount, Datatype sendtype, Buffer recvbuf, int recvcount, Datatype recvtype, int root) Inverse of the operationgather
.final Request
Inverse of the operationgatherv
.final Request
iScatterv
(Buffer sendbuf, int[] sendcount, int[] displs, Datatype sendtype, Buffer recvbuf, int recvcount, Datatype recvtype, int root) Inverse of the operationgatherv
.final Request
Inverse of the operationgatherv
.final Request
Start a standard mode, nonblocking send.final boolean
isInter()
Test if this communicator is an inter-communicator.final boolean
isNull()
Test if communicator object is null (has been freed).final Request
Start a synchronous mode, nonblocking send.final void
neighborAllGather
(Object sendbuf, int sendcount, Datatype sendtype, Object recvbuf, int recvcount, Datatype recvtype) Java binding ofMPI_NEIGHBOR_ALLGATHER
.final void
neighborAllGatherv
(Object sendbuf, int sendcount, Datatype sendtype, Object recvbuf, int[] recvcount, int[] displs, Datatype recvtype) Java binding ofMPI_NEIGHBOR_ALLGATHERV
.final void
neighborAllToAll
(Object sendbuf, int sendcount, Datatype sendtype, Object recvbuf, int recvcount, Datatype recvtype) Java binding ofMPI_NEIGHBOR_ALLTOALL
.final void
neighborAllToAllv
(Object sendbuf, int[] sendcount, int[] sdispls, Datatype sendtype, Object recvbuf, int[] recvcount, int[] rdispls, Datatype recvtype) Java binding ofMPI_NEIGHBOR_ALLTOALLV
.final int
Packs message in send bufferinbuf
into space specified inoutbuf
.final int
Returns an upper bound on the increment ofposition
effected bypack
.final Status
probe
(int source, int tag) Wait until there is an incoming message matching the pattern specified.final Status
Blocking receive operation.final Prequest
Creates a persistent communication request for a receive operation.final void
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
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 byop
element-wise to the elements ofinBuf
andinOutBuf
with the result stored element-wise ininOutBuf
.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
Send in ready mode.final Prequest
Creates a persistent communication request for a ready mode send.final void
Inverse of the operationgather
.final void
scatter
(Object sendbuf, int sendcount, Datatype sendtype, Object recvbuf, int recvcount, Datatype recvtype, int root) Inverse of the operationgather
.final void
Inverse of the operationgatherv
.final void
scatterv
(Object sendbuf, int[] sendcount, int[] displs, Datatype sendtype, Object recvbuf, int recvcount, Datatype recvtype, int root) Inverse of the operationgatherv
.final void
Inverse of the operationgatherv
.final void
Blocking send operation.final Prequest
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
Stores attribute value associated with a key.final void
setErrhandler
(Errhandler errhandler) Associates a new error handler with communicator at the calling process.final void
Java binding ofMPI_COMM_SET_INFO
.final void
Sets the print name for the communicator.protected final void
setType
(int type) final void
Send in synchronous mode.final Prequest
Creates a persistent communication request for a synchronous mode send.final int
Unpacks message in receive bufferoutbuf
into space specified ininbuf
.
-
Field Details
-
TYPE_SHARED
public static final int TYPE_SHARED- See Also:
-
SELF
protected static final int SELF- See Also:
-
WORLD
protected static final int WORLD- See Also:
-
handle
protected long handle
-
-
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
Duplicates this communicator.Java binding of
MPI_COMM_DUP
.It is recommended to use
dup()
instead ofclone()
because the last can't throw anMPIException
. -
dup
Duplicates this communicator.Java binding of
MPI_COMM_DUP
.- Returns:
- copy of this communicator
- Throws:
MPIException
- Signals that an MPI exception of some sort has occurred.
-
dup
- Throws:
MPIException
-
iDup
Duplicates this communicator.Java binding of
MPI_COMM_IDUP
.The new communicator can't be used before the operation completes. The request object must be obtained calling
getRequest()
.- Returns:
- copy of this communicator
- Throws:
MPIException
- Signals that an MPI exception of some sort has occurred.
-
iDup
- Throws:
MPIException
-
dupWithInfo
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
- Throws:
MPIException
-
getRequest
Returns the associated request to this communicator if it was created usingiDup()
.- Returns:
- associated request if this communicator was created
using
iDup()
, or null otherwise.
-
getSize
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
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
Compare two communicators.Java binding of the MPI operation
MPI_COMM_COMPARE
.- Parameters:
comm1
- first communicatorcomm2
- second communicator- Returns:
MPI.IDENT
results if thecomm1
andcomm2
are references to the same object (ie, ifcomm1 == 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
Java binding of the MPI operationMPI_COMM_FREE
.- Specified by:
free
in interfaceFreeable
- 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 ofMPI_COMM_NULL
.- Returns:
- true if the comm object is null, false otherwise
-
setInfo
Java binding ofMPI_COMM_SET_INFO
.- Parameters:
info
- info object- Throws:
MPIException
- Signals that an MPI exception of some sort has occurred.
-
getInfo
Java binding ofMPI_COMM_GET_INFO
.- Returns:
- new info object
- Throws:
MPIException
- Signals that an MPI exception of some sort has occurred.
-
disconnect
Java binding of the MPI operationMPI_COMM_DISCONNECT
.- Throws:
MPIException
- Signals that an MPI exception of some sort has occurred.
-
getGroup
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
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
orrecv
communication with the remote group leader.- Parameters:
localComm
- local intra-communicatorlocalLeader
- rank of local group leader inlocalComm
remoteLeader
- rank of remote group leader in this communicatortag
- "safe" tag- Returns:
- new inter-communicator
- Throws:
MPIException
- Signals that an MPI exception of some sort has occurred.
-
send
Blocking send operation.Java binding of the MPI operation
MPI_SEND
.- Parameters:
buf
- send buffercount
- number of items to sendtype
- datatype of each item in send bufferdest
- rank of destinationtag
- 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 buffercount
- number of items in receive buffertype
- datatype of each item in receive buffersource
- rank of sourcetag
- 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 buffersendcount
- number of items to sendsendtype
- datatype of each item in send bufferdest
- rank of destinationsendtag
- send tagrecvbuf
- receive bufferrecvcount
- number of items in receive bufferrecvtype
- datatype of each item in receive buffersource
- rank of sourcerecvtag
- 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
- buffercount
- number of items to sendtype
- datatype of each item in bufferdest
- rank of destinationsendtag
- send tagsource
- rank of sourcerecvtag
- 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 buffercount
- number of items to sendtype
- datatype of each item in send bufferdest
- rank of destinationtag
- 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 buffercount
- number of items to sendtype
- datatype of each item in send bufferdest
- rank of destinationtag
- 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 buffercount
- number of items to sendtype
- datatype of each item in send bufferdest
- rank of destinationtag
- 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 buffercount
- number of items to sendtype
- datatype of each item in send bufferdest
- rank of destinationtag
- 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 buffercount
- number of items to sendtype
- datatype of each item in send bufferdest
- rank of destinationtag
- 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 buffercount
- number of items to sendtype
- datatype of each item in send bufferdest
- rank of destinationtag
- 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 buffercount
- number of items to sendtype
- datatype of each item in send bufferdest
- rank of destinationtag
- 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 buffercount
- number of items in receive buffertype
- datatype of each item in receive buffersource
- rank of sourcetag
- 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 buffercount
- number of items to sendtype
- datatype of each item in send bufferdest
- rank of destinationtag
- 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 buffercount
- number of items to sendtype
- datatype of each item in send bufferdest
- rank of destinationtag
- 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 buffercount
- number of items to sendtype
- datatype of each item in send bufferdest
- rank of destinationtag
- 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 buffercount
- number of items to sendtype
- datatype of each item in send bufferdest
- rank of destinationtag
- 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 buffercount
- number of items in receive buffertype
- datatype of each item in receive buffersource
- rank of sourcetag
- 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 bufferinbuf
into space specified inoutbuf
.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 bufferincount
- number of items in input buffertype
- datatype of each item in input bufferoutbuf
- output bufferposition
- 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 bufferoutbuf
into space specified ininbuf
.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 bufferposition
- initial position in input bufferoutbuf
- output bufferoutcount
- number of items in output buffertype
- 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
Returns an upper bound on the increment ofposition
effected bypack
.Java binding of the MPI operation
MPI_PACK_SIZE
.- Parameters:
incount
- number of items in input buffertype
- 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
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 sourcetag
- 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
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 sourcetag
- message tag- Returns:
- status object
- Throws:
MPIException
- Signals that an MPI exception of some sort has occurred.
-
createKeyval
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
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
Stores attribute value associated with a key.Java binding of the MPI operation
MPI_COMM_SET_ATTR
.- Parameters:
keyval
- attribute keyvalue
- attribute value- Throws:
MPIException
- Signals that an MPI exception of some sort has occurred.
-
getAttr
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
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
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
orMPI.UNDEFINED
.- Returns:
- topology type of communicator
- Throws:
MPIException
- Signals that an MPI exception of some sort has occurred.
-
abort
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
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
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
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
A call tobarrier
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
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
Broadcast a message from the process with rankroot
to all processes of the group.Java binding of the MPI operation
MPI_BCAST
.- Parameters:
buf
- buffercount
- number of items in buffertype
- datatype of each item in bufferroot
- rank of broadcast root- Throws:
MPIException
- Signals that an MPI exception of some sort has occurred.
-
iBcast
Broadcast a message from the process with rankroot
to all processes of the group.Java binding of the MPI operation
MPI_IBCAST
.- Parameters:
buf
- buffercount
- number of items in buffertype
- datatype of each item in bufferroot
- 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 buffersendcount
- number of items to sendsendtype
- datatype of each item in send bufferrecvbuf
- receive bufferrecvcount
- number of items to receiverecvtype
- datatype of each item in receive bufferroot
- rank of receiving process- Throws:
MPIException
- Signals that an MPI exception of some sort has occurred.
-
gather
Each process sends the contents of its send buffer to the root process.Java binding of the MPI operation
MPI_GATHER
usingMPI_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
- buffercount
- number of items to send/receivetype
- datatype of each item in bufferroot
- 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 buffersendcount
- number of items to sendsendtype
- datatype of each item in send bufferrecvbuf
- receive bufferrecvcount
- number of items to receiverecvtype
- datatype of each item in receive bufferroot
- rank of receiving process- Returns:
- communication request
- Throws:
MPIException
- Signals that an MPI exception of some sort has occurred.
-
iGather
Each process sends the contents of its send buffer to the root process.Java binding of the MPI operation
MPI_IGATHER
usingMPI_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
- buffercount
- number of items to send/receivetype
- datatype of each item in bufferroot
- 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 ofgather
by allowing varying counts of data from each process.Java binding of the MPI operation
MPI_GATHERV
.- Parameters:
sendbuf
- send buffersendcount
- number of items to sendsendtype
- datatype of each item in send bufferrecvbuf
- receive bufferrecvcount
- number of elements received from each processdispls
- displacements at which to place incoming datarecvtype
- datatype of each item in receive bufferroot
- 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 ofgather
by allowing varying counts of data from each process.Java binding of the MPI operation
MPI_GATHERV
usingMPI_IN_PLACE
instead of the send buffer in the root process. This method must be used in the root process.- Parameters:
recvbuf
- receive bufferrecvcount
- number of elements received from each processdispls
- displacements at which to place incoming datarecvtype
- datatype of each item in receive bufferroot
- 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 ofgather
by allowing varying counts of data from each process.Java binding of the MPI operation
MPI_GATHERV
usingMPI_IN_PLACE
instead of the send buffer in the root process. This method must be used in the non-root processes.- Parameters:
sendbuf
- send buffersendcount
- number of items to sendsendtype
- datatype of each item in send bufferroot
- 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 ofgather
by allowing varying counts of data from each process.Java binding of the MPI operation
MPI_IGATHERV
.- Parameters:
sendbuf
- send buffersendcount
- number of items to sendsendtype
- datatype of each item in send bufferrecvbuf
- receive bufferrecvcount
- number of elements received from each processdispls
- displacements at which to place incoming datarecvtype
- datatype of each item in receive bufferroot
- 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 ofgather
by allowing varying counts of data from each process.Java binding of the MPI operation
MPI_IGATHERV
usingMPI_IN_PLACE
instead of the send buffer in the root process. This method must be used in the root process.- Parameters:
recvbuf
- receive bufferrecvcount
- number of elements received from each processdispls
- displacements at which to place incoming datarecvtype
- datatype of each item in receive bufferroot
- 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 ofgather
by allowing varying counts of data from each process.Java binding of the MPI operation
MPI_IGATHERV
usingMPI_IN_PLACE
instead of the send buffer in the root process. This method must be used in the non-root processes.- Parameters:
sendbuf
- send buffersendcount
- number of items to sendsendtype
- datatype of each item in send bufferroot
- 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 operationgather
.Java binding of the MPI operation
MPI_SCATTER
.- Parameters:
sendbuf
- send buffersendcount
- number of items to sendsendtype
- datatype of each item in send bufferrecvbuf
- receive bufferrecvcount
- number of items to receiverecvtype
- datatype of each item in receive bufferroot
- rank of sending process- Throws:
MPIException
- Signals that an MPI exception of some sort has occurred.
-
scatter
Inverse of the operationgather
.Java binding of the MPI operation
MPI_SCATTER
usingMPI_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 buffercount
- number of items to send/receivetype
- datatype of each item in bufferroot
- 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 operationgather
.Java binding of the MPI operation
MPI_ISCATTER
.- Parameters:
sendbuf
- send buffersendcount
- number of items to sendsendtype
- datatype of each item in send bufferrecvbuf
- receive bufferrecvcount
- number of items to receiverecvtype
- datatype of each item in receive bufferroot
- rank of sending process- Returns:
- communication request
- Throws:
MPIException
- Signals that an MPI exception of some sort has occurred.
-
iScatter
Inverse of the operationgather
.Java binding of the MPI operation
MPI_ISCATTER
usingMPI_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 buffercount
- number of items to send/receivetype
- datatype of each item in bufferroot
- 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 operationgatherv
.Java binding of the MPI operation
MPI_SCATTERV
.- Parameters:
sendbuf
- send buffersendcount
- number of items sent to each processdispls
- displacements from which to take outgoing datasendtype
- datatype of each item in send bufferrecvbuf
- receive bufferrecvcount
- number of items to receiverecvtype
- datatype of each item in receive bufferroot
- 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 operationgatherv
.Java binding of the MPI operation
MPI_SCATTERV
usingMPI_IN_PLACE
instead of the receive buffer in the root process. This method must be used in the root process.- Parameters:
sendbuf
- send buffersendcount
- number of items sent to each processdispls
- displacements from which to take outgoing datasendtype
- datatype of each item in send bufferroot
- 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 operationgatherv
.Java binding of the MPI operation
MPI_SCATTERV
usingMPI_IN_PLACE
instead of the receive buffer in the root process. This method must be used in the non-root processes.- Parameters:
recvbuf
- receive bufferrecvcount
- number of items to receiverecvtype
- datatype of each item in receive bufferroot
- 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 operationgatherv
.Java binding of the MPI operation
MPI_ISCATTERV
.- Parameters:
sendbuf
- send buffersendcount
- number of items sent to each processdispls
- displacements from which to take outgoing datasendtype
- datatype of each item in send bufferrecvbuf
- receive bufferrecvcount
- number of items to receiverecvtype
- datatype of each item in receive bufferroot
- 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 operationgatherv
.Java binding of the MPI operation
MPI_ISCATTERV
usingMPI_IN_PLACE
instead of the receive buffer in the root process. This method must be used in the root process.- Parameters:
sendbuf
- send buffersendcount
- number of items sent to each processdispls
- displacements from which to take outgoing datasendtype
- datatype of each item in send bufferroot
- 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 operationgatherv
.Java binding of the MPI operation
MPI_ISCATTERV
usingMPI_IN_PLACE
instead of the receive buffer in the root process. This method must be used in the non-root processes.- Parameters:
recvbuf
- receive bufferrecvcount
- number of items to receiverecvtype
- datatype of each item in receive bufferroot
- 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 togather
, but all processes receive the result.Java binding of the MPI operation
MPI_ALLGATHER
.- Parameters:
sendbuf
- send buffersendcount
- number of items to sendsendtype
- datatype of each item in send bufferrecvbuf
- receive bufferrecvcount
- number of items to receiverecvtype
- datatype of each item in receive buffer- Throws:
MPIException
- Signals that an MPI exception of some sort has occurred.
-
allGather
Similar togather
, but all processes receive the result.Java binding of the MPI operation
MPI_ALLGATHER
usingMPI_IN_PLACE
instead of the send buffer.- Parameters:
buf
- receive buffercount
- number of items to receivetype
- 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 togather
, but all processes receive the result.Java binding of the MPI operation
MPI_IALLGATHER
.- Parameters:
sendbuf
- send buffersendcount
- number of items to sendsendtype
- datatype of each item in send bufferrecvbuf
- receive bufferrecvcount
- number of items to receiverecvtype
- datatype of each item in receive buffer- Returns:
- communication request
- Throws:
MPIException
- Signals that an MPI exception of some sort has occurred.
-
iAllGather
Similar togather
, but all processes receive the result.Java binding of the MPI operation
MPI_IALLGATHER
usingMPI_IN_PLACE
instead of the send buffer.- Parameters:
buf
- receive buffercount
- number of items to receivetype
- 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 togatherv
, but all processes receive the result.Java binding of the MPI operation
MPI_ALLGATHERV
.- Parameters:
sendbuf
- send buffersendcount
- number of items to sendsendtype
- datatype of each item in send bufferrecvbuf
- receive bufferrecvcount
- number of elements received from each processdispls
- displacements at which to place incoming datarecvtype
- 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 togatherv
, but all processes receive the result.Java binding of the MPI operation
MPI_ALLGATHERV
usingMPI_IN_PLACE
instead of the send buffer.- Parameters:
recvbuf
- receive bufferrecvcount
- number of elements received from each processdispls
- displacements at which to place incoming datarecvtype
- 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 togatherv
, but all processes receive the result.Java binding of the MPI operation
MPI_IALLGATHERV
.- Parameters:
sendbuf
- send buffersendcount
- number of items to sendsendtype
- datatype of each item in send bufferrecvbuf
- receive bufferrecvcount
- number of elements received from each processdispls
- displacements at which to place incoming datarecvtype
- 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 togatherv
, but all processes receive the result.Java binding of the MPI operation
MPI_IALLGATHERV
usingMPI_IN_PLACE
instead of the send buffer.- Parameters:
buf
- receive buffercount
- number of elements received from each processdispls
- displacements at which to place incoming datatype
- 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 ofallGather
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 buffersendcount
- number of items sent to each processsendtype
- datatype send buffer itemsrecvbuf
- receive bufferrecvcount
- number of items received from any processrecvtype
- 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 ofallGather
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 buffersendcount
- number of items sent to each processsendtype
- datatype send buffer itemsrecvbuf
- receive bufferrecvcount
- number of items received from any processrecvtype
- 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 toallToAll
: location of data for send is specified bysdispls
and location to place data on receive side is specified byrdispls
.Java binding of the MPI operation
MPI_ALLTOALLV
.- Parameters:
sendbuf
- send buffersendcount
- number of items sent to each buffersdispls
- displacements from which to take outgoing datasendtype
- datatype send buffer itemsrecvbuf
- receive bufferrecvcount
- number of elements received from each processrdispls
- displacements at which to place incoming datarecvtype
- 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 toallToAll
: location of data for send is specified bysdispls
and location to place data on receive side is specified byrdispls
.Java binding of the MPI operation
MPI_IALLTOALLV
.- Parameters:
sendbuf
- send buffersendcount
- number of items sent to each buffersdispls
- displacements from which to take outgoing datasendtype
- datatype send buffer itemsrecvbuf
- receive bufferrecvcount
- number of elements received from each processrdispls
- displacements at which to place incoming datarecvtype
- 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 toallToAllv
: datatypes for send are specified bysendTypes
and datatypes for receive are specified byrecvTypes
per process.Java binding of the MPI operation
MPI_ALLTOALLW
.- Parameters:
sendBuf
- send buffersendCount
- number of items sent to each buffersDispls
- displacements from which to take outgoing datasendTypes
- datatypes of send buffer itemsrecvBuf
- receive bufferrecvCount
- number of elements received from each processrDispls
- displacements at which to place incoming datarecvTypes
- 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 toiAllToAllv
: datatypes for send are specified bysendTypes
and datatypes for receive are specified byrecvTypes
per process.Java binding of the MPI operation
MPI_IALLTOALLW
.- Parameters:
sendBuf
- send buffersendCount
- number of items sent to each buffersDispls
- displacements from which to take outgoing datasendTypes
- datatype send buffer itemsrecvBuf
- receive bufferrecvCount
- number of elements received from each processrDispls
- displacements at which to place incoming datarecvTypes
- 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 ofMPI_NEIGHBOR_ALLGATHER
.- Parameters:
sendbuf
- send buffersendcount
- number of items to sendsendtype
- datatype of each item in send bufferrecvbuf
- receive bufferrecvcount
- number of items to receiverecvtype
- 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 ofMPI_INEIGHBOR_ALLGATHER
.- Parameters:
sendbuf
- send buffersendcount
- number of items to sendsendtype
- datatype of each item in send bufferrecvbuf
- receive bufferrecvcount
- number of items to receiverecvtype
- 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 ofMPI_NEIGHBOR_ALLGATHERV
.- Parameters:
sendbuf
- send buffersendcount
- number of items to sendsendtype
- datatype of each item in send bufferrecvbuf
- receive bufferrecvcount
- number of elements that are received from each neighbordispls
- displacements at which to place incoming datarecvtype
- 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 ofMPI_INEIGHBOR_ALLGATHERV
.- Parameters:
sendbuf
- send buffersendcount
- number of items to sendsendtype
- datatype of each item in send bufferrecvbuf
- receive bufferrecvcount
- number of elements that are received from each neighbordispls
- displacements at which to place incoming datarecvtype
- 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 ofMPI_NEIGHBOR_ALLTOALL
.- Parameters:
sendbuf
- send buffersendcount
- number of items to sendsendtype
- datatype of each item in send bufferrecvbuf
- receive bufferrecvcount
- number of items to receiverecvtype
- 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 ofMPI_INEIGHBOR_ALLTOALL
.- Parameters:
sendbuf
- send buffersendcount
- number of items to sendsendtype
- datatype of each item in send bufferrecvbuf
- receive bufferrecvcount
- number of items to receiverecvtype
- 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 ofMPI_NEIGHBOR_ALLTOALLV
.- Parameters:
sendbuf
- send buffersendcount
- number of items sent to each buffersdispls
- displacements from which to take outgoing datasendtype
- datatype send buffer itemsrecvbuf
- receive bufferrecvcount
- number of elements received from each processrdispls
- displacements at which to place incoming datarecvtype
- 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 ofMPI_INEIGHBOR_ALLTOALLV
.- Parameters:
sendbuf
- send buffersendcount
- number of items sent to each buffersdispls
- displacements from which to take outgoing datasendtype
- datatype send buffer itemsrecvbuf
- receive bufferrecvcount
- number of elements received from each processrdispls
- displacements at which to place incoming datarecvtype
- 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
andMPI.MAXLOC
.- Parameters:
sendbuf
- send bufferrecvbuf
- receive buffercount
- number of items in send buffertype
- data type of each item in send bufferop
- reduce operationroot
- rank of root process- Throws:
MPIException
- Signals that an MPI exception of some sort has occurred.
-
reduce
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
usingMPI_IN_PLACE
instead of the send buffer.- Parameters:
buf
- send/receive buffercount
- number of items in buffertype
- data type of each item in bufferop
- reduce operationroot
- 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 bufferrecvbuf
- receive buffercount
- number of items in send buffertype
- data type of each item in send bufferop
- reduce operationroot
- 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
usingMPI_IN_PLACE
instead of the send buffer.- Parameters:
buf
- send/receive buffercount
- number of items in buffertype
- data type of each item in bufferop
- reduce operationroot
- 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 asreduce
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 bufferrecvbuf
- receive buffercount
- number of items in send buffertype
- data type of each item in send bufferop
- reduce operation- Throws:
MPIException
- Signals that an MPI exception of some sort has occurred.
-
allReduce
Same asreduce
except that the result appears in receive buffer of all process in the group.Java binding of the MPI operation
MPI_ALLREDUCE
usingMPI_IN_PLACE
instead of the send buffer.- Parameters:
buf
- receive buffercount
- number of items in send buffertype
- data type of each item in send bufferop
- 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 asreduce
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 bufferrecvbuf
- receive buffercount
- number of items in send buffertype
- data type of each item in send bufferop
- reduce operation- Returns:
- communication request
- Throws:
MPIException
- Signals that an MPI exception of some sort has occurred.
-
iAllReduce
Same asreduce
except that the result appears in receive buffer of all process in the group.Java binding of the MPI operation
MPI_IALLREDUCE
usingMPI_IN_PLACE
instead of the send buffer.- Parameters:
buf
- receive buffercount
- number of items in send buffertype
- data type of each item in send bufferop
- 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 bufferrecvbuf
- receive bufferrecvcounts
- numbers of result elements distributed to each processtype
- data type of each item in send bufferop
- reduce operation- Throws:
MPIException
- Signals that an MPI exception of some sort has occurred.
-
reduceScatter
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
usingMPI_IN_PLACE
instead of the send buffer.- Parameters:
buf
- receive buffercounts
- numbers of result elements distributed to each processtype
- data type of each item in send bufferop
- 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 bufferrecvbuf
- receive bufferrecvcounts
- numbers of result elements distributed to each processtype
- data type of each item in send bufferop
- 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
usingMPI_IN_PLACE
instead of the send buffer.- Parameters:
buf
- receive buffercounts
- numbers of result elements distributed to each processtype
- data type of each item in send bufferop
- 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 bufferrecvbuf
- receive bufferrecvcount
- element count per blocktype
- data type of each item in send bufferop
- 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
usingMPI_IN_PLACE
instead of the send buffer.- Parameters:
buf
- receive buffercount
- element count per blocktype
- data type of each item in send bufferop
- 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 bufferrecvbuf
- receive bufferrecvcount
- element count per blocktype
- data type of each item in send bufferop
- 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
usingMPI_IN_PLACE
instead of the send buffer.- Parameters:
buf
- receive buffercount
- element count per blocktype
- data type of each item in send bufferop
- 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 byop
element-wise to the elements ofinBuf
andinOutBuf
with the result stored element-wise ininOutBuf
.Java binding of the MPI operation
MPI_REDUCE_LOCAL
.- Parameters:
inBuf
- input bufferinOutBuf
- input buffer, will contain combined outputcount
- number of elementstype
- data type of each itemop
- reduce operation- Throws:
MPIException
- Signals that an MPI exception of some sort has occurred.
-
setName
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
Return the print name from the communicator.- Returns:
- name of the communicator
- Throws:
MPIException
- Signals that an MPI exception of some sort has occurred.
-