Modifier and Type | Field and Description |
---|---|
long |
handle |
static long |
MPI_COMM_NULL_VAL |
Modifier and Type | Method and Description |
---|---|
void |
Abort(int errorcode)
Abort MPI.
|
void |
bSend(java.lang.Object buf,
int count,
Datatype datatype,
int dest,
int tag)
Send in buffered mode.
|
Prequest |
bSendInit(java.lang.Object buf,
int count,
Datatype datatype,
int dest,
int tag)
Creates a persistent communication request for a buffered mode send.
|
Comm |
clone()
Duplicate this communicator.
|
static int |
compare(Comm comm1,
Comm comm2)
Compare two communicators.
|
Comm |
create(int[] ids) |
Intercomm |
createIntercomm(Comm local_comm,
int local_leader,
int remote_leader,
int tag)
Create an inter-communicator.
|
void |
deleteAttr(int keyval)
deletes attribute value by key.
|
void |
free()
Destroy this communicator.
|
java.lang.Object |
getAttr(int keyval)
Retrieves attribute value by key.
|
Group |
getGroup()
Return group associated with a communicator.
|
int |
getRank()
Rank of this process in group of this communicator.
|
int |
getSize()
Size of group of this communicator.
|
int |
getTopology()
Returns the type of topology associated with the communicator.
|
Request |
ibSend(java.lang.Object buf,
int count,
Datatype datatype,
int dest,
int tag)
Start a buffered mode, nonblocking send.
|
Status |
iProbe(int source,
int tag)
Check if there is an incoming message matching the pattern specified.
|
Request |
iRecv(java.lang.Object buf,
int count,
Datatype datatype,
int src,
int tag)
Start a nonblocking receive.
|
Request |
irSend(java.lang.Object buf,
int count,
Datatype datatype,
int dest,
int tag)
Start a ready mode, nonblocking send.
|
Request |
iSend(java.lang.Object buf,
int count,
Datatype datatype,
int dest,
int tag)
Start a standard mode, nonblocking send.
|
boolean |
isInter()
Test if this communicator is an inter-communicator.
|
boolean |
isNull() |
Request |
isSend(java.lang.Object buf,
int count,
Datatype datatype,
int dest,
int tag)
Start a synchronous mode, nonblocking send.
|
int |
pack(java.lang.Object inbuf,
int incount,
Datatype datatype,
mpjbuf.Buffer outbuf,
int position)
Packs message in send buffer
inbuf into space specified in outbuf . |
int |
packSize(int incount,
Datatype datatype)
Returns an upper bound on the increment of
position effected by pack . |
Status |
probe(int source,
int tag)
Wait until there is an incoming message matching the pattern specified.
|
Status |
recv(java.lang.Object buf,
int count,
Datatype datatype,
int source,
int tag)
Blocking receive operation.
|
Prequest |
recvInit(java.lang.Object buf,
int count,
Datatype datatype,
int dest,
int tag)
Creates a persistent communication request for a receive operation.
|
void |
rSend(java.lang.Object buf,
int count,
Datatype datatype,
int dest,
int tag)
Send in ready mode.
|
Prequest |
rSendInit(java.lang.Object buf,
int count,
Datatype datatype,
int dest,
int tag)
Creates a persistent communication request for a ready mode send.
|
void |
send(java.lang.Object buf,
int count,
Datatype datatype,
int dest,
int tag)
Blocking send operation.
|
Prequest |
sendInit(java.lang.Object buf,
int count,
Datatype datatype,
int dest,
int tag)
Creates a persistent communication request for a standard mode send.
|
Status |
sendRecv(java.lang.Object sendbuf,
int sendcount,
Datatype sendtype,
int dest,
int sendtag,
java.lang.Object recvbuf,
int recvcount,
Datatype recvtype,
int source,
int recvtag)
Execute a blocking send and receive operation.
|
Status |
sendRecvReplace(java.lang.Object buf,
int count,
Datatype datatype,
int dest,
int sendtag,
int source,
int recvtag)
Execute a blocking send and receive operation, receiving message into send buffer.
|
Intercomm |
spawn(java.lang.String command,
java.lang.String[] argv,
int maxprocs,
Info info,
int root,
int[] errCodes)
Spawn an MPI process.
|
Intercomm |
spawnMultiple(java.lang.String[] cmds,
java.lang.String[][] argsArray,
int[] maxprocs,
Info[] info,
int root,
int[] errcodes)
Spawn an multiple MPI processes with different executable specifications.
|
void |
sSend(java.lang.Object buf,
int count,
Datatype datatype,
int dest,
int tag)
Send in synchronous mode.
|
Prequest |
sSendInit(java.lang.Object buf,
int count,
Datatype datatype,
int dest,
int tag)
Creates a persistent communication request for a synchronous mode send.
|
int |
unpack(mpjbuf.Buffer inbuf,
int position,
java.lang.Object outbuf,
int outcount,
Datatype datatype)
Unpacks message in receive buffer outbuf into space specified in inbuf.
|
public static final long MPI_COMM_NULL_VAL
public long handle
public Comm(long handle, Group localgroup_) throws MPIException
MPIException
public int getSize() throws MPIException
Java binding of the MPI operation MPI_COMM_SIZE
.
MPIException
- Points out that an MPI exception has occured.public int getRank() throws MPIException
Java binding of the MPI operation MPI_COMM_RANK
.
MPIException
- Points out that an MPI exception has occured.public final boolean isNull()
public Comm create(int[] ids) throws MPIException
MPIException
public void free() throws MPIException
Java binding of the MPI operation MPI_COMM_FREE
.
MPIException
- Points out that an MPI exception has occured.public Group getGroup() throws MPIException
Java binding of the MPI operation MPI_COMM_GROUP
.
MPIException
- Points out that an MPI exception has occured.public boolean isInter() throws MPIException
true
if this is an inter-communicator, false
otherwise.
Java binding of the MPI operation MPI_COMM_TEST_INTER
.
MPIException
- Points out that an MPI exception has occured.public Intercomm createIntercomm(Comm local_comm, int local_leader, int remote_leader, int tag) throws MPIException
local_comm
- local intra-communicator.local_leader
- rank of local group leader in localComm
.remote_leader
- rank of remote group leader in this communicator.tag
- ``tag'' tag.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.)
MPIException
- Points out that an MPI exception has occured.public java.lang.Object getAttr(int keyval) throws MPIException
keyval
- one of the key values predefined by the implementation.Java binding of the MPI operation MPI_ATTR_GET
.
MPIException
- Points out that an MPI exception has occured.public void deleteAttr(int keyval) throws MPIException
keyval
- one of the key values predefined by the implementation.
Java binding of the MPI operation MPI_ATTR_DELETE
.
MPIException
- Points out that an MPI exception has occured.public void send(java.lang.Object buf, int count, Datatype datatype, int dest, int tag) throws MPIException
The method supports communication of both ByteBuffers
and Java
arrays. For arrays, the datatypes MPI.BYTE
, MPI.CHAR
,
MPI.SHORT
, MPI.BOOLEAN
, MPI.INT
, MPI.LONG
,
MPI.FLOAT
, and MPI.DOUBLE
are supported. For ByteBuffers,
the datatypes we currently support are MPI.BYTE
.
buf
- send buffer array.count
- number of items to send.datatype
- datatype of each item in send buffer.dest
- rank of destination.tag
- message tag.
Java binding of the MPI operation MPI_SEND
.
The actual argument associated with buf
must be one-dimensional array.
If the datatype
argument represents an MPI basic type, its value must agree with
the element type of buf
---either a primitive type or a reference (object) type. If the
datatype
argument represents an MPI derived type, its base type must agree
with the element type of buf
.
MPIException
- Points out that an MPI exception has occured.public void sSend(java.lang.Object buf, int count, Datatype datatype, int dest, int tag) throws MPIException
The method supports communication of both ByteBuffers
and Java
arrays. For arrays, the datatypes MPI.BYTE
, MPI.CHAR
,
MPI.SHORT
, MPI.BOOLEAN
, MPI.INT
, MPI.LONG
,
MPI.FLOAT
, and MPI.DOUBLE
are supported. For ByteBuffers,
the datatypes we currently support are MPI.BYTE
.
buf
- send buffer array.count
- number of items to send.datatype
- datatype of items to send.dest
- rank of destination.tag
- message tag.
Java binding of the MPI operation MPI_SSEND
.
Further comments as for Send
.
MPIException
- Points out that an MPI exception has occured.public void bSend(java.lang.Object buf, int count, Datatype datatype, int dest, int tag) throws MPIException
Not supported in the current release
as it relies on MPI.attachBuffer
and MPI.detachBuffer
buf
- send buffer array.count
- number of items to send.datatype
- datatype of each item in send buffer.dest
- rank of destination.tag
- message tag.
Java binding of the MPI operation MPI_BSEND
.
This operation copies message into a buffer (mpi.Buffer) specified by MPI.Buffer_attach
operation, and then sends using the standard mode of communication. Further comments as for
Send
.
MPIException
- Points out that an MPI exception has occured.public void rSend(java.lang.Object buf, int count, Datatype datatype, int dest, int tag) throws MPIException
The method supports communication of both ByteBuffers
and Java
arrays. For arrays, the datatypes MPI.BYTE
, MPI.CHAR
,
MPI.SHORT
, MPI.BOOLEAN
, MPI.INT
, MPI.LONG
,
MPI.FLOAT
, and MPI.DOUBLE
are supported. For ByteBuffers,
the datatypes we currently support are MPI.BYTE
.
buf
- send buffer array.count
- number of items to send.datatype
- datatype of each item in send buffer.dest
- rank of destination.tag
- message tag.
Java binding of the MPI operation MPI_RSEND
.
Further comments as for Send
.
MPIException
- Points out that an MPI exception has occured.public Request iSend(java.lang.Object buf, int count, Datatype datatype, int dest, int tag) throws MPIException
The method supports communication of both ByteBuffers
and Java
arrays. For arrays, the datatypes MPI.BYTE
, MPI.CHAR
,
MPI.SHORT
, MPI.BOOLEAN
, MPI.INT
, MPI.LONG
,
MPI.FLOAT
, and MPI.DOUBLE
are supported. For ByteBuffers,
the datatypes we currently support are MPI.BYTE
.
buf
- send buffer array.count
- number of items to send.datatype
- datatype of each item in send buffer.dest
- rank of destinationtag
- message tagJava binding of the MPI operation MPI_ISEND
.
Further comments as for Send
.
MPIException
- Points out that an MPI exception has occured.public Request ibSend(java.lang.Object buf, int count, Datatype datatype, int dest, int tag) throws MPIException
Not supported in the current release
as it relies on MPI.attachBuffer
and MPI.detachBuffer
buf
- send buffer array.count
- number of items to send.datatype
- datatype of each item in send buffer.dest
- rank of destination.tag
- message tag.Java binding of the MPI operation MPI_IBSEND
.
Further comments as for Send
.
MPIException
- Points out that an MPI exception has occured.public Request isSend(java.lang.Object buf, int count, Datatype datatype, int dest, int tag) throws MPIException
The method supports communication of both ByteBuffers
and Java
arrays. For arrays, the datatypes MPI.BYTE
, MPI.CHAR
,
MPI.SHORT
, MPI.BOOLEAN
, MPI.INT
, MPI.LONG
,
MPI.FLOAT
, and MPI.DOUBLE
are supported. For ByteBuffers,
the datatypes we currently support are MPI.BYTE
.
buf
- send buffer array.count
- number of items to send.datatype
- datatype of each item in send buffer.dest
- rank of destination.tag
- message tag.Java binding of the MPI operation MPI_ISSEND
.
Further comments as for Send
.
MPIException
- Points out that an MPI exception has occured.public Request irSend(java.lang.Object buf, int count, Datatype datatype, int dest, int tag) throws MPIException
The method supports communication of both ByteBuffers
and Java
arrays. For arrays, the datatypes MPI.BYTE
, MPI.CHAR
,
MPI.SHORT
, MPI.BOOLEAN
, MPI.INT
, MPI.LONG
,
MPI.FLOAT
, and MPI.DOUBLE
are supported. For ByteBuffers,
the datatypes we currently support are MPI.BYTE
.
buf
- send buffer array.count
- number of items to send.datatype
- datatype of each item in send buffer.dest
- rank of destination.tag
- message tag.Java binding of the MPI operation MPI_IRSEND
.
Further comments as for Send
.
MPIException
- Points out that an MPI exception has occured.public Status recv(java.lang.Object buf, int count, Datatype datatype, int source, int tag) throws MPIException
The method supports communication of both ByteBuffers
and Java
arrays. For arrays, the datatypes MPI.BYTE
, MPI.CHAR
,
MPI.SHORT
, MPI.BOOLEAN
, MPI.INT
, MPI.LONG
,
MPI.FLOAT
, and MPI.DOUBLE
are supported. For ByteBuffers,
the datatypes we currently support are MPI.BYTE
.
buf
- receive buffer array.count
- number of items in receive buffer.datatype
- datatypde of each item in receive buffer.source
- rank of source.tag
- message tag.Java binding of the MPI operation MPI_RECV
.
The actual argument associated with buf
must be one-dimensional array.
If the datatype
argument represents an MPI basic type, its value must agree with
the element type of buf
---either a primitive type or a reference (object) type. If the
datatype
argument represents an MPI derived type, its base type must agree
with the element type of buf
.
MPIException
- Points out that an MPI exception has occured.public Request iRecv(java.lang.Object buf, int count, Datatype datatype, int src, int tag) throws MPIException
The method supports communication of both ByteBuffers
and Java
arrays. For arrays, the datatypes MPI.BYTE
, MPI.CHAR
,
MPI.SHORT
, MPI.BOOLEAN
, MPI.INT
, MPI.LONG
,
MPI.FLOAT
, and MPI.DOUBLE
are supported. For ByteBuffers,
the datatypes we currently support are MPI.BYTE
.
buf
- receive buffer array.count
- number of items in receive buffer.datatype
- datatype of each item in receive buffer.src
- rank of source.tag
- message tag.Java binding of the MPI operation MPI_IRECV
.
Further comments as for Recv
.
MPIException
- Points out that an MPI exception has occured.public Status iProbe(int source, int tag) throws MPIException
source
- rank of source.tag
- message tag.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. Otherwise a null handle is returned.
MPIException
- Points out that an MPI exception has occured.public Status probe(int source, int tag) throws MPIException
source
- rank of source.tag
- message tag.Java binding of the MPI operation MPI_PROBE
.
Returns a status object similar to the return value of a matching Recv
operation.
MPIException
- Points out that an MPI exception has occured.public int packSize(int incount, Datatype datatype) throws MPIException
position
effected by pack
.incount
- number of items in input buffer.datatype
- datatype of each item in input buffer.Java binding of the MPI operation MPI_PACK_SIZE
.
It is an error to call this function if the base type of datatype
is
MPI.OBJECT
.
MPIException
- Points out that an MPI exception has occured.public int pack(java.lang.Object inbuf, int incount, Datatype datatype, mpjbuf.Buffer outbuf, int position) throws MPIException
inbuf
into space specified in outbuf
.
Not Implemented in the current release
.inbuf
- input buffer array.incount
- number of items in input buffer.datatype
- datatype of each item in input buffer.outbuf
- output buffer.position
- initial position in output buffer.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.
MPIException
- Points out that an MPI exception has occured.public int unpack(mpjbuf.Buffer inbuf, int position, java.lang.Object outbuf, int outcount, Datatype datatype) throws MPIException
Not Implemented in the current release
.inbuf
- input buffer.position
- initial position in input buffer.outbuf
- output buffer.outcount
- number of items in output buffer.datatype
- datatype of each item in output buffer.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.
MPIException
- Points out that an MPI exception has occured.public Prequest bSendInit(java.lang.Object buf, int count, Datatype datatype, int dest, int tag) throws MPIException
Not supported in the current release
as it relies on MPI.attachBuffer
and MPI.detachBuffer
buf
- send buffer array.count
- number of items to send.datatype
- datatype of each item in send buffer.dest
- rank of destination.tag
- message tag.Java binding of the MPI operation MPI_BSEND_INIT
.
Further comments as for Send
.
MPIException
- Points out that an MPI exception has occured.public Prequest sendInit(java.lang.Object buf, int count, Datatype datatype, int dest, int tag) throws MPIException
The method supports communication of both ByteBuffers
and Java
arrays. For arrays, the datatypes MPI.BYTE
, MPI.CHAR
,
MPI.SHORT
, MPI.BOOLEAN
, MPI.INT
, MPI.LONG
,
MPI.FLOAT
, and MPI.DOUBLE
are supported. For ByteBuffers,
the datatypes we currently support are MPI.BYTE
.
buf
- send buffer array.count
- number of items to send.datatype
- datatype of each item in send buffer.dest
- rank of destination.tag
- message tag.Java binding of the MPI operation MPI_SEND_INIT
.
Further comments as for Send
.
MPIException
- Points out that an MPI exception has occured.public Prequest sSendInit(java.lang.Object buf, int count, Datatype datatype, int dest, int tag) throws MPIException
The method supports communication of both ByteBuffers
and Java
arrays. For arrays, the datatypes MPI.BYTE
, MPI.CHAR
,
MPI.SHORT
, MPI.BOOLEAN
, MPI.INT
, MPI.LONG
,
MPI.FLOAT
, and MPI.DOUBLE
are supported. For ByteBuffers,
the datatypes we currently support are MPI.BYTE
.
buf
- send buffer array.count
- number of items to send.datatype
- datatype of each item in send buffer.dest
- rank of destination.tag
- message tag.Java binding of the MPI operation MPI_SSEND_INIT
.
Further comments as for Send
.
MPIException
- Points out that an MPI exception has occured.public Prequest rSendInit(java.lang.Object buf, int count, Datatype datatype, int dest, int tag) throws MPIException
The method supports communication of both ByteBuffers
and Java
arrays. For arrays, the datatypes MPI.BYTE
, MPI.CHAR
,
MPI.SHORT
, MPI.BOOLEAN
, MPI.INT
, MPI.LONG
,
MPI.FLOAT
, and MPI.DOUBLE
are supported. For ByteBuffers,
the datatypes we currently support are MPI.BYTE
.
buf
- send buffer array.count
- number of items to send.datatype
- datatype of each item in send buffer.dest
- rank of destination.tag
- message tag.Java binding of the MPI operation MPI_RSEND_INIT
.
Further comments as for Send
.
MPIException
- Points out that an MPI exception has occured.public Prequest recvInit(java.lang.Object buf, int count, Datatype datatype, int dest, int tag) throws MPIException
The method supports communication of both ByteBuffers
and Java
arrays. For arrays, the datatypes MPI.BYTE
, MPI.CHAR
,
MPI.SHORT
, MPI.BOOLEAN
, MPI.INT
, MPI.LONG
,
MPI.FLOAT
, and MPI.DOUBLE
are supported. For ByteBuffers,
the datatypes we currently support are MPI.BYTE
.
buf
- receive buffer array.count
- number of items in receive buffer.datatype
- datatype of each item in receive buffer.dest
- rank of destination.tag
- message tag.Java binding of the MPI operation MPI_RECV_INIT
.
Further comments as for Recv
.
MPIException
- Points out that an MPI exception has occured.public Status sendRecv(java.lang.Object sendbuf, int sendcount, Datatype sendtype, int dest, int sendtag, java.lang.Object recvbuf, int recvcount, Datatype recvtype, int source, int recvtag) throws MPIException
The method supports communication of both ByteBuffers
and Java
arrays. For arrays, the datatypes MPI.BYTE
, MPI.CHAR
,
MPI.SHORT
, MPI.BOOLEAN
, MPI.INT
, MPI.LONG
,
MPI.FLOAT
, and MPI.DOUBLE
are supported. For ByteBuffers,
the datatypes we currently support are MPI.BYTE
.
sendbuf
- send buffer array.sendcount
- number of items to send.sendtype
- datatype of each item in send buffer.dest
- rank of destination.sendtag
- send tag.recvbuf
- receive buffer array.recvcount
- number of items in receive buffer.recvtype
- datatype of each item in receive buffer.source
- rank of source.recvtag
- receive tag.Java binding of the MPI operation MPI_SENDRECV
.
Further comments as for Send
and Recv
.
MPIException
- Points out that an MPI exception has occured.public Status sendRecvReplace(java.lang.Object buf, int count, Datatype datatype, int dest, int sendtag, int source, int recvtag) throws MPIException
The method supports communication of both ByteBuffers
and Java
arrays. For arrays, the datatypes MPI.BYTE
, MPI.CHAR
,
MPI.SHORT
, MPI.BOOLEAN
, MPI.INT
, MPI.LONG
,
MPI.FLOAT
, and MPI.DOUBLE
are supported. For ByteBuffers,
the datatypes we currently support are MPI.BYTE
.
buf
- buffer array.count
- number of items to send.datatype
- datatype of each item in buffer.dest
- rank of destination.sendtag
- send tag.source
- rank of source.recvtag
- receive tag.Java binding of the MPI operation MPI_SENDRECV_REPLACE
.
Further comments as for Send
and Recv
.
MPIException
- Points out that an MPI exception has occured.public int getTopology() throws MPIException
Not Implemented in the current release
.Java binding of the MPI operation MPI_TOPO_TEST
.
The return value will be one of MPI.GRAPH
, MPI.CART
or
MPI.UNDEFINED
.
MPIException
- Points out that an MPI exception has occured.public void Abort(int errorcode) throws MPIException
Not Implemented in the current release
.errorcode
- error code for Unix or POSIX environments.
Java binding of the MPI operation MPI_ABORT
.
MPIException
- Points out that an MPI exception has occured.public Comm clone() throws MPIException
clone
in class java.lang.Object
Java binding of the MPI operation MPI_COMM_DUP
.
The new communicator is ``congruent'' to the old one, but has a different context.
MPIException
- Points out that an MPI exception has occured.public Intercomm spawn(java.lang.String command, java.lang.String[] argv, int maxprocs, Info info, int root, int[] errCodes) throws MPIException
command
- name of program to be spawned.argv
- arguments for the command.maxprocs
- maximum number of processes to launch.info
- a set of key-value pairs telling the runtime system where and how to
start the processes.root
- rank of root process.errCodes
- array where error codes are populated per process after
launch.errCodes
.
Java binding of the MPI operation MPI_COMM_SPAWN
.
MPIException
- Points out that an MPI exception has occured.public Intercomm spawnMultiple(java.lang.String[] cmds, java.lang.String[][] argsArray, int[] maxprocs, Info[] info, int root, int[] errcodes) throws MPIException
cmds
- programs to be executed.argsArray
- arguments for commands.maxprocs
- maximum number of processes to start for each command.info
- info objects telling the runtime system where and how to start
processes.root
- rank of root process.errcodes
- array for error codes.errCodes
.
Java binding of the MPI operation MPI_COMM_SPAWN_MULTIPLE
.
MPIException
- Points out that an MPI exception has occured.public static int compare(Comm comm1, Comm comm2) throws MPIException
comm1
- first communicator.comm2
- second communicator.Java binding of the MPI operation MPI_COMM_COMPARE
.
MPI.IDENT
(0) results if the comm1
and comm2
are references to the
same object (ie, if comm1 == comm2
). MPI.CONGRUENT
(3) results if the
underlying groups are identical but the communicators differ by context.
MPI.SIMILAR
(1) results if the underlying groups are similar but the communicators
differ by context. MPI.UNEQUAL
(2) results otherwise.
MPIException
- Points out that an MPI exception has occured.