void Comm.Send(Object buf, int offset, int count, Datatype datatype, int dest, int tag)
buf | send buffer array |
offset | initial offset in send buffer |
count | number of items to send |
datatype | datatype of each item in send buffer |
dest | rank of destination |
tag | message tag |
The elements of buf may have primitive type or class type.
If the elements are objects, they must be serializable objects.
If the datatype argument represents an MPI basic type, its
value must agree with the element type of buf:
the basic MPI datatypes supported, and their correspondence to Java types,
are as follows
MPI datatype | Java datatype |
MPI.BYTE | byte |
MPI.CHAR | char |
MPI.SHORT | short |
MPI.BOOLEAN | boolean |
MPI.INT | int |
MPI.LONG | long |
MPI.FLOAT | float |
MPI.DOUBLE | double |
MPI.OBJECT | Object |
Status Comm.Recv(Object buf, int offset, int count, Datatype datatype, int source, int tag)
buf | receive buffer array |
offset | initial offset in receive buffer |
count | number of items in receive buffer |
datatype | datatype of each item in receive buffer |
source | rank of source |
tag | message tag |
returns: | status object |
The elements of buf may have primitive type or class type. If the datatype argument represents an MPI basic type, its value must agree with the element type of buf; if datatype represents an MPI derived type, its base type must agree with the element type of buf (see section 3.12).
The MPI constants MPI_ANY_SOURCE and MPI_ANY_TAG are available as MPI.ANY_SOURCE and MPI.ANY_TAG.
The source and tag of the received message are available in the publically accessible source and tag fields of the returned object. The following method can be used to further interrogate the return status of a receive operation.
int Status.Get_count(Datatype datatype)
datatype | datatype of each item in receive buffer |
returns: | number of received entries |