mpi
Class Comm

java.lang.Object
  extended by mpi.Comm
Direct Known Subclasses:
Intercomm, Intracomm

public class Comm
extends java.lang.Object


Field Summary
 Group group
           
 Comm mpjdevComm
           
 
Method Summary
 void Abort(int errorcode)
          Abort MPI.
 void Attr_delete(int keyval)
          Retrieves attribute value by key.
 java.lang.Object Attr_get(int keyval)
          Retrieves attribute value by key.
 Prequest Bsend_init(java.lang.Object buf, int offset, int count, Datatype datatype, int dest, int tag)
          Creates a persistent communication request for a buffered mode send.
 void Bsend(java.lang.Object buf, int offset, int count, Datatype datatype, int dest, int tag)
          Send in buffered mode.
protected  void bsend(java.lang.Object buf, int offset, int count, Datatype datatype, int dest, int tag, boolean pt2pt)
           
 java.lang.Object clone()
          Duplicate this communicator.
static int Compare(Comm comm1, Comm comm2)
          Compare two communicators.
 Intercomm Create_intercomm(Comm local_comm, int local_leader, int remote_leader, int tag)
          Create an inter-communicator.
 void Free()
          Destroy this communicator.
 Group Group()
          Return group associated with a communicator.
 Request Ibsend(java.lang.Object buf, int offset, int count, Datatype datatype, int dest, int tag)
          Start a buffered mode, nonblocking send.
protected  Request ibsend(java.lang.Object buf, int offset, int count, Datatype datatype, int dest, int tag, boolean pt2pt)
           
 Status Iprobe(int source, int tag)
          Check if there is an incoming message matching the pattern specified.
 Request Irecv(java.lang.Object buf, int offset, int count, Datatype datatype, int src, int tag)
          Start a nonblocking receive.
protected  Request irecv(java.lang.Object buf, int offset, int count, Datatype datatype, int src, int tag, boolean pt2pt)
           
 Request Irsend(java.lang.Object buf, int offset, int count, Datatype datatype, int dest, int tag)
          Start a ready mode, nonblocking send.
protected  Request irsend(java.lang.Object buf, int offset, int count, Datatype datatype, int dest, int tag, boolean pt2pt)
           
 Request Isend(java.lang.Object buf, int offset, int count, Datatype datatype, int dest, int tag)
          Start a standard mode, nonblocking send.
protected  Request isend(java.lang.Object buf, int offset, int count, Datatype datatype, int dest, int tag, boolean pt2pt)
           
 Request Issend(java.lang.Object buf, int offset, int count, Datatype datatype, int dest, int tag)
          Start a synchronous mode, nonblocking send.
protected  Request issend(java.lang.Object buf, int offset, int count, Datatype datatype, int dest, int tag, boolean pt2pt)
           
 int Pack_size(int incount, Datatype datatype)
          Returns an upper bound on the increment of position effected by pack.
 int Pack(java.lang.Object inbuf, int offset, int incount, Datatype datatype, Buffer outbuf, int position)
          Packs message in send buffer inbuf into space specified in outbuf.
 Status Probe(int source, int tag)
          Wait until there is an incoming message matching the pattern specified.
 int Rank()
          Rank of this process in group of this communicator.
 Prequest Recv_init(java.lang.Object buf, int offset, int count, Datatype datatype, int dest, int tag)
          Creates a persistent communication request for a receive operation.
 Status Recv(java.lang.Object buf, int offset, int count, Datatype datatype, int source, int tag)
          Blocking receive operation.
protected  Status recv(java.lang.Object buf, int offset, int count, Datatype datatype, int source, int tag, boolean pt2pt)
           
 Prequest Rsend_init(java.lang.Object buf, int offset, int count, Datatype datatype, int dest, int tag)
          Creates a persistent communication request for a ready mode send.
 void Rsend(java.lang.Object buf, int offset, int count, Datatype datatype, int dest, int tag)
          Send in ready mode.
protected  void rsend(java.lang.Object buf, int offset, int count, Datatype datatype, int dest, int tag, boolean pt2pt)
           
 Prequest Send_init(java.lang.Object buf, int offset, int count, Datatype datatype, int dest, int tag)
          Creates a persistent communication request for a standard mode send.
 void Send(java.lang.Object buf, int offset, int count, Datatype datatype, int dest, int tag)
          Blocking send operation.
protected  void send(java.lang.Object buf, int offset, int count, Datatype datatype, int dest, int tag, boolean pt2pt)
           
 Status Sendrecv_replace(java.lang.Object buf, int offset, int count, Datatype datatype, int dest, int sendtag, int source, int recvtag)
          Execute a blocking send and receive operation, receiving message into send buffer.
protected  Status sendrecv(java.lang.Object sendbuf, int sendoffset, int sendcount, Datatype sendtype, int dest, int sendtag, java.lang.Object recvbuf, int recvoffset, int recvcount, Datatype recvtype, int source, int recvtag)
           
 Status Sendrecv(java.lang.Object sendbuf, int sendoffset, int sendcount, Datatype sendtype, int dest, int sendtag, java.lang.Object recvbuf, int recvoffset, int recvcount, Datatype recvtype, int source, int recvtag)
          Execute a blocking send and receive operation.
 int Size()
          Size of group of this communicator.
 Prequest Ssend_init(java.lang.Object buf, int offset, int count, Datatype datatype, int dest, int tag)
          Creates a persistent communication request for a synchronous mode send.
 void Ssend(java.lang.Object buf, int offset, int count, Datatype datatype, int dest, int tag)
          Send in synchronous mode.
protected  void ssend(java.lang.Object buf, int offset, int count, Datatype datatype, int dest, int tag, boolean pt2pt)
           
 boolean Test_inter()
          Test if this communicator is an inter-communicator.
 int Topo_test()
          Returns the type of topology associated with the communicator.
 int Unpack(Buffer inbuf, int position, java.lang.Object outbuf, int offset, int outcount, Datatype datatype)
          Unpacks message in receive buffer outbuf into space specified in inbuf.
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

group

public Group group

mpjdevComm

public Comm mpjdevComm
Method Detail

Size

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

returns: number of processors in the group of this communicator

Java binding of the MPI operation MPI_COMM_SIZE.

Throws:
MPIException

Rank

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

returns: rank of the calling process in the group of this communicator

Java binding of the MPI operation MPI_COMM_RANK.

Throws:
MPIException

Group

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

returns: group corresponding to this communicator group

Java binding of the MPI operation MPI_COMM_GROUP.

Throws:
MPIException

Compare

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

comm1 first communicator
comm2 second communicator
returns: result

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.

Throws:
MPIException

Free

public void Free()
          throws MPIException
Destroy this communicator.

Java binding of the MPI operation MPI_COMM_FREE.

Throws:
MPIException

Test_inter

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

returns: true if this is an inter-communicator, false otherwise

Java binding of the MPI operation MPI_COMM_TEST_INTER.

Throws:
MPIException

Create_intercomm

public Intercomm Create_intercomm(Comm local_comm,
                                  int local_leader,
                                  int remote_leader,
                                  int tag)
                           throws MPIException
Create an inter-communicator.

local_comm local intra-communicator
local_leader rank of local group leader in localComm
remote_leader rank of remote group leader in this communictor
tag ``safe'' tag
returns: new inter-communicator

Java binding of the MPI operation MPI_INTERCOMM_CREATE.

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

Throws:
MPIException

Attr_get

public java.lang.Object Attr_get(int keyval)
                          throws MPIException
Retrieves attribute value by key.

keyval one of the key values predefined by the implementation
returns: attribute value

Java binding of the MPI operation MPI_ATTR_GET.

Throws:
MPIException

Attr_delete

public void Attr_delete(int keyval)
                 throws MPIException
Retrieves attribute value by key.

keyval one of the key values predefined by the implementation
returns: attribute value

Java binding of the MPI operation MPI_ATTR_GET.

Throws:
MPIException

Send

public void Send(java.lang.Object buf,
                 int offset,
                 int count,
                 Datatype datatype,
                 int dest,
                 int tag)
          throws MPIException
Blocking send operation.

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

Java binding of the MPI operation MPI_SEND.

The actual argument associated with buf must be one-dimensional array. The value offset is a subscript in this array, defining the position of the first item of the message.

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

Throws:
MPIException

send

protected void send(java.lang.Object buf,
                    int offset,
                    int count,
                    Datatype datatype,
                    int dest,
                    int tag,
                    boolean pt2pt)
             throws MPIException
Throws:
MPIException

Ssend

public void Ssend(java.lang.Object buf,
                  int offset,
                  int count,
                  Datatype datatype,
                  int dest,
                  int tag)
           throws MPIException
Send in synchronous mode.

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

Java binding of the MPI operation MPI_SSEND.

Further comments as for Send.

Throws:
MPIException

ssend

protected void ssend(java.lang.Object buf,
                     int offset,
                     int count,
                     Datatype datatype,
                     int dest,
                     int tag,
                     boolean pt2pt)
              throws MPIException
Throws:
MPIException

Bsend

public void Bsend(java.lang.Object buf,
                  int offset,
                  int count,
                  Datatype datatype,
                  int dest,
                  int tag)
           throws MPIException
Send in buffered mode.

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

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.

Throws:
MPIException

bsend

protected void bsend(java.lang.Object buf,
                     int offset,
                     int count,
                     Datatype datatype,
                     int dest,
                     int tag,
                     boolean pt2pt)
              throws MPIException
Throws:
MPIException

Rsend

public void Rsend(java.lang.Object buf,
                  int offset,
                  int count,
                  Datatype datatype,
                  int dest,
                  int tag)
           throws MPIException
Send in ready mode.

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

Java binding of the MPI operation MPI_RSEND.

Further comments as for Send.

Throws:
MPIException

rsend

protected void rsend(java.lang.Object buf,
                     int offset,
                     int count,
                     Datatype datatype,
                     int dest,
                     int tag,
                     boolean pt2pt)
              throws MPIException
Throws:
MPIException

Isend

public Request Isend(java.lang.Object buf,
                     int offset,
                     int count,
                     Datatype datatype,
                     int dest,
                     int tag)
              throws MPIException
Start a standard mode, nonblocking send.

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
returns: communication request

Java binding of the MPI operation MPI_ISEND.

Further comments as for Send.

Throws:
MPIException

isend

protected Request isend(java.lang.Object buf,
                        int offset,
                        int count,
                        Datatype datatype,
                        int dest,
                        int tag,
                        boolean pt2pt)
                 throws MPIException
Throws:
MPIException

Ibsend

public Request Ibsend(java.lang.Object buf,
                      int offset,
                      int count,
                      Datatype datatype,
                      int dest,
                      int tag)
               throws MPIException
Start a buffered mode, nonblocking send.

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
returns: communication request

Java binding of the MPI operation MPI_IBSEND.

Further comments as for Send.

Throws:
MPIException

ibsend

protected Request ibsend(java.lang.Object buf,
                         int offset,
                         int count,
                         Datatype datatype,
                         int dest,
                         int tag,
                         boolean pt2pt)
                  throws MPIException
Throws:
MPIException

Issend

public Request Issend(java.lang.Object buf,
                      int offset,
                      int count,
                      Datatype datatype,
                      int dest,
                      int tag)
               throws MPIException
Start a synchronous mode, nonblocking send.

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
returns: communication request

Java binding of the MPI operation MPI_ISSEND.

Further comments as for Send.

Throws:
MPIException

issend

protected Request issend(java.lang.Object buf,
                         int offset,
                         int count,
                         Datatype datatype,
                         int dest,
                         int tag,
                         boolean pt2pt)
                  throws MPIException
Throws:
MPIException

Irsend

public Request Irsend(java.lang.Object buf,
                      int offset,
                      int count,
                      Datatype datatype,
                      int dest,
                      int tag)
               throws MPIException
Start a ready mode, nonblocking send.

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
returns: communication request

Java binding of the MPI operation MPI_IRSEND.

Further comments as for Send.

Throws:
MPIException

irsend

protected Request irsend(java.lang.Object buf,
                         int offset,
                         int count,
                         Datatype datatype,
                         int dest,
                         int tag,
                         boolean pt2pt)
                  throws MPIException
Throws:
MPIException

Recv

public Status Recv(java.lang.Object buf,
                   int offset,
                   int count,
                   Datatype datatype,
                   int source,
                   int tag)
            throws MPIException
Blocking receive operation.

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

Java binding of the MPI operation MPI_RECV.

The actual argument associated with buf must be one-dimensional array. The value offset is a subscript in this array, defining the position into which the first item of the incoming message will be copied.

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

Throws:
MPIException

recv

protected Status recv(java.lang.Object buf,
                      int offset,
                      int count,
                      Datatype datatype,
                      int source,
                      int tag,
                      boolean pt2pt)
               throws MPIException
Throws:
MPIException

Irecv

public Request Irecv(java.lang.Object buf,
                     int offset,
                     int count,
                     Datatype datatype,
                     int src,
                     int tag)
              throws MPIException
Start a nonblocking receive.

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: communication request

Java binding of the MPI operation MPI_IRECV.

Further comments as for Recv.

Throws:
MPIException

irecv

protected Request irecv(java.lang.Object buf,
                        int offset,
                        int count,
                        Datatype datatype,
                        int src,
                        int tag,
                        boolean pt2pt)
                 throws MPIException
Throws:
MPIException

Iprobe

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

source rank of source
tag message tag
returns: status object or null handle

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.

Throws:
MPIException

Probe

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

source rank of source
tag message tag
returns: status object

Java binding of the MPI operation MPI_PROBE.

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

Throws:
MPIException

Pack_size

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

incount number of items in input buffer
datatype datatype of each item in input buffer
returns: upper bound on size of packed message

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.

Throws:
MPIException

Pack

public int Pack(java.lang.Object inbuf,
                int offset,
                int incount,
                Datatype datatype,
                Buffer outbuf,
                int position)
         throws MPIException
Packs message in send buffer inbuf into space specified in outbuf.

inbuf input buffer array
offset initial offset in input buffer
incount number of items in input buffer
datatype datatype of each item in input buffer
outbuf output buffer
position initial position in output buffer
returns: final 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.

Throws:
MPIException

Unpack

public int Unpack(Buffer inbuf,
                  int position,
                  java.lang.Object outbuf,
                  int offset,
                  int outcount,
                  Datatype datatype)
           throws MPIException
Unpacks message in receive buffer outbuf into space specified in inbuf.

inbuf input buffer
position initial position in input buffer
outbuf output buffer array
offset initial offset in output buffer
outcount number of items in output buffer
datatype datatype of each item in output buffer
returns: final position in input 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.

Throws:
MPIException

Bsend_init

public Prequest Bsend_init(java.lang.Object buf,
                           int offset,
                           int count,
                           Datatype datatype,
                           int dest,
                           int tag)
                    throws MPIException
Creates a persistent communication request for a buffered mode send.

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
returns: persistent communication request

Java binding of the MPI operation MPI_BSEND_INIT.

Further comments as for Send.

Throws:
MPIException

Send_init

public Prequest Send_init(java.lang.Object buf,
                          int offset,
                          int count,
                          Datatype datatype,
                          int dest,
                          int tag)
                   throws MPIException
Creates a persistent communication request for a standard mode send.

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
returns: persistent communication request

Java binding of the MPI operation MPI_SEND_INIT.

Further comments as for Send.

Throws:
MPIException

Ssend_init

public Prequest Ssend_init(java.lang.Object buf,
                           int offset,
                           int count,
                           Datatype datatype,
                           int dest,
                           int tag)
                    throws MPIException
Creates a persistent communication request for a synchronous mode send.

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
returns: persistent communication request

Java binding of the MPI operation MPI_SSEND_INIT.

Further comments as for Send.

Throws:
MPIException

Rsend_init

public Prequest Rsend_init(java.lang.Object buf,
                           int offset,
                           int count,
                           Datatype datatype,
                           int dest,
                           int tag)
                    throws MPIException
Creates a persistent communication request for a ready mode send.

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
returns: persistent communication request

Java binding of the MPI operation MPI_RSEND_INIT.

Further comments as for Send.

Throws:
MPIException

Recv_init

public Prequest Recv_init(java.lang.Object buf,
                          int offset,
                          int count,
                          Datatype datatype,
                          int dest,
                          int tag)
                   throws MPIException
Creates a persistent communication request for a receive operation.

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: communication request

Java binding of the MPI operation MPI_RECV_INIT.

Further comments as for Recv.

Throws:
MPIException

Sendrecv

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

sendbuf send buffer array
sendoffset initial offset in send buffer
sendcount number of items to send
sendtype datatype of each item in send buffer
dest rank of destination
sendtag send tag
recvbuf receive buffer array
recvoffset initial offset in receive buffer
recvcount number of items in receive buffer
recvtype datatype of each item in receive buffer
source rank of source
recvtag receive tag
returns: status object

Java binding of the MPI operation MPI_SENDRECV.

Further comments as for Send and Recv.

Throws:
MPIException

Sendrecv_replace

public Status Sendrecv_replace(java.lang.Object buf,
                               int offset,
                               int count,
                               Datatype datatype,
                               int dest,
                               int sendtag,
                               int source,
                               int recvtag)
                        throws MPIException
Execute a blocking send and receive operation, receiving message into send buffer.

buf buffer array
offset initial offset in buffer
count number of items to send
type datatype of each item in buffer
dest rank of destination
sendtag send tag
source rank of source
recvtag receive tag
returns: status object

Further comments as for Send and Recv.

Throws:
MPIException

sendrecv

protected Status sendrecv(java.lang.Object sendbuf,
                          int sendoffset,
                          int sendcount,
                          Datatype sendtype,
                          int dest,
                          int sendtag,
                          java.lang.Object recvbuf,
                          int recvoffset,
                          int recvcount,
                          Datatype recvtype,
                          int source,
                          int recvtag)
                   throws MPIException
Throws:
MPIException

Topo_test

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

returns: topology type of communicator

Java binding of the MPI operation MPI_TOPO_TEST.

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

Throws:
MPIException

Abort

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

errorcode error code for Unix or POSIX environments

Java binding of the MPI operation MPI_ABORT.

Throws:
MPIException

clone

public java.lang.Object clone()
                       throws MPIException
Duplicate this communicator.

returns: copy of this communicator

Java binding of the MPI operation MPI_COMM_DUP.

The new communicator is ``congruent'' to the old one, but has a different context.

Overrides:
clone in class java.lang.Object
Throws:
MPIException