mpi
Class Comm

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

public abstract class Comm
extends java.lang.Object


Method Summary
 void Abort(int errorcode)
          Abort MPI.
abstract  void Allgather(java.lang.Object sendbuf, int sendoffset, int sendcount, Datatype sendtype, java.lang.Object recvbuf, int recvoffset, int recvcount, Datatype recvtype)
          Similar to Gather, but all processes receive the result.
abstract  void Allgatherv(java.lang.Object sendbuf, int sendoffset, int sendcount, Datatype sendtype, java.lang.Object recvbuf, int recvoffset, int[] recvcount, int[] displs, Datatype recvtype)
          Similar to Gatherv, but all processes receive the result.
abstract  void Allreduce(java.lang.Object sendbuf, int sendoffset, java.lang.Object recvbuf, int recvoffset, int count, Datatype datatype, Op op)
          Same as Reduce except that the result appears in the receive buffer of all processes in the group.
abstract  void Alltoall(java.lang.Object sendbuf, int sendoffset, int sendcount, Datatype sendtype, java.lang.Object recvbuf, int recvoffset, int recvcount, Datatype recvtype)
          Extension of Allgather to the case where each process sends distinct data to each of the receivers.
abstract  void Alltoallv(java.lang.Object sendbuf, int sendoffset, int[] sendcount, int[] sdispls, Datatype sendtype, java.lang.Object recvbuf, int recvoffset, int[] recvcount, int[] rdispls, Datatype recvtype)
          Adds flexibility to Alltoall: location of data for send is specified by sdispls and location to place data on receive side is specified by rdispls.
abstract  void Barrier()
          A call to Barrier blocks the caller until all processes in the group have called it.
abstract  void Bcast(java.lang.Object buf, int offset, int count, Datatype datatype, int root)
          Broadcast a message from the process with rank root to all processes of the group, itself included.
 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.
 java.lang.Object clone()
          Duplicate this communicator.
static int Compare(Comm comm1, Comm comm2)
          Compare two communicators.
 Intercomm Create_intercomm(Comm local_intracomm, int local_leader, int remote_leader, int tag)
          Creates an inter-communicator from two intra-communicators.
 void Delete_attr(Keyval key)
          Deletes an attribute value associated with a key on a communicator.
static Errhandler Errorhandler_get()
          Returns the error handler currently associated with the communicator.
static void Errorhandler_set(Errhandler errhandler)
          Associates a new error handler with communicator at the calling process.
 void Free()
          Destroy this communicator.
abstract  void Gather(java.lang.Object sendbuf, int sendoffset, int sendcount, Datatype sendtype, java.lang.Object recvbuf, int recvoffset, int recvcount, Datatype recvtype, int root)
          Each process (root process included) sends the contents of its send buffer to the root process, which receives these contents in its recvbuf.
abstract  void Gatherv(java.lang.Object sendbuf, int sendoffset, int sendcount, Datatype sendtype, java.lang.Object recvbuf, int recvoffset, int[] recvcount, int[] displs, Datatype recvtype, int root)
          Extend the functionality of Gather by allowing varying counts of data from each process.
 java.lang.Object Get_attr(Keyval key)
          Retrieves attribute value by key.
 java.lang.String Get_name()
          Return the print name from the communicator.
abstract  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.
 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 source, int tag)
          Start a nonblocking receive.
 Request Irsend(java.lang.Object buf, int offset, int count, Datatype datatype, int dest, int tag)
          Start a ready mode, nonblocking send.
 boolean Is_null()
          Replaces comparision with MPI.COMM_NULL.
 Request Isend(java.lang.Object buf, int offset, int count, Datatype datatype, int dest, int tag)
          Start a standard mode, nonblocking send.
 Request Issend(java.lang.Object buf, int offset, int count, Datatype datatype, int dest, int tag)
          Start a synchronous mode, nonblocking send.
 int Pack_size(int incount, Datatype datatype)
          Returns an upper bound on the increment of position effected by pack.
 int Pack_size(int incount, java.lang.Object[] obj)
          Special version of Pack_size for MPI.OBJECT datatype
 int Pack(java.lang.Object inbuf, int offset, int incount, Datatype datatype, byte[] 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.
abstract  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 source, 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.
abstract  void Reduce_scatter(java.lang.Object sendbuf, int sendoffset, java.lang.Object recvbuf, int recvoffset, int[] recvcounts, Datatype datatype, 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.
abstract  void Reduce(java.lang.Object sendbuf, int sendoffset, java.lang.Object recvbuf, int recvoffset, int count, Datatype datatype, Op op, int root)
          Combine elements in input buffer of each process using the reduce operation, and return the combined value in the output buffer of the root process.
 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.
abstract  void Scan(java.lang.Object sendbuf, int sendoffset, java.lang.Object recvbuf, int recvoffset, int count, Datatype datatype, Op op)
          Perform a prefix reduction on data distributed across the group.
abstract  void Scatter(java.lang.Object sendbuf, int sendoffset, int sendcount, Datatype sendtype, java.lang.Object recvbuf, int recvoffset, int recvcount, Datatype recvtype, int root)
          Inverse of the operation Gather.
abstract  void Scatterv(java.lang.Object sendbuf, int sendoffset, int[] sendcount, int[] displs, Datatype sendtype, java.lang.Object recvbuf, int recvoffset, int recvcount, Datatype recvtype, int root)
          Inverse of the operation Gatherv.
 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.
 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.
 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.
 void Set_attr(Keyval key, java.lang.Object attribute_val)
          Stores attribute value associated with a key.
 void Set_name(java.lang.String name)
          Sets the print name for a communicator.
abstract  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.
 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(byte[] 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
 

Method Detail

Size

public abstract 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 abstract 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 abstract Group Group()
                     throws MPIException
Return group associated with a communicator.

returns: group corresponding to this communicator

Java binding of the MPI operation MPI_COMM_GROUP.

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

Free

public void Free()
          throws MPIException
Destroy this communicator.

Java binding of the MPI operation MPI_COMM_FREE.

An explicitly called Free method is required rather than an implicitly called finalize method, because MPI COMM FREE is a collective operation. We cannot assume that the Java garbage collector will call a finalize method synchronously on all processors.

Throws:
MPIException

Is_null

public boolean Is_null()
Replaces comparision with MPI.COMM_NULL.

returns: true if the communicator object has been freed, false otherwise


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.

The MPI standard says: the process calling MPI_Abort must be a member of the communicator passed in. If the communicator is invalid or the process is not a member of the communicator, MPI_Abort is called on MPI_COMM_WORLD.

Throws:
MPIException

Set_name

public void Set_name(java.lang.String name)
              throws MPIException
Sets the print name for a communicator.

name Name of the communicator

Java binding of the MPI operation MPI_COMM_SET_NAME.

Throws:
MPIException

Get_name

public java.lang.String Get_name()
                          throws MPIException
Return the print name from the communicator.

returns: Name of the communicator

Java binding of the MPI operation MPI_COMM_GET_NAME.

The three predefined communicators will have predefined names associated with them. Thus, the names of MPI.COMM_WORLD, MPI.COMM_SELF and MPI.COMM_NULL will have the default of MPI.COMM_WORLD, MPI.COMM_SELF and MPI.COMM_NULL

Throws:
MPIException

Get_attr

public java.lang.Object Get_attr(Keyval key)
                          throws MPIException
Retrieves attribute value by key.

key key value
returns: attribute value or null if no attribute is associated with the key

Java binding of the MPI operation MPI_COMM_GET_ATTR.

Retrieves attribute value by key. The call is erroneous if there is no key with value keyval. On the other hand, the call is correct if the key value exists, but no attribute is attached on comm for that key; in such case, the call returns null

Throws:
MPIException

Delete_attr

public void Delete_attr(Keyval key)
                 throws MPIException
Deletes an attribute value associated with a key on a communicator.

key the key value of the deleted attribute

Java binding of the MPI operation MPI_COMM_DELETE_ATTR.

Throws:
MPIException

Set_attr

public void Set_attr(Keyval key,
                     java.lang.Object attribute_val)
              throws MPIException
Stores attribute value associated with a key.

key key value, as returned by MPI.Comm_create_keyval

Java binding of the MPI operation MPI_COMM_SET_ATTR.

If the value is already present, then the outcome is as if Comm.Delete_attr() was first called to delete the previous value, and a new value was next stored

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

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 results if the comm1 and comm2 are references to the same object (ie, if comm1 == comm2). MPI.CONGRUENT results if the underlying groups are identical but the communicators differ by context. MPI.SIMILAR results if the underlying groups are similar but the communicators differ by context. MPI.UNEQUAL results otherwise.

Throws:
MPIException

Create_intercomm

public Intercomm Create_intercomm(Comm local_intracomm,
                                  int local_leader,
                                  int remote_leader,
                                  int tag)
                           throws MPIException
Creates an inter-communicator from two intra-communicators.

local_intracomm local intra-communicator
local_leader rank of local group leader in local_intracomm
remote_leader rank of remote group leader in this intra-communicator
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 intra-communicator", making it analogous to a Send or Recv communication with the remote group leader.

The MPI 1.2 standard contains two mutually exclusive comments on the input intra-communicators. One says that their respective groups must be disjoint; the other that the leaders can be the same process.

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

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

Irecv

public Request Irecv(java.lang.Object buf,
                     int offset,
                     int count,
                     Datatype datatype,
                     int source,
                     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

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 class type (object). If the datatype argument represents an MPI derived type, its base type must agree with the element type of buf.

If a data type has MPI.OBJECT as its base type, the objects in the buffer will be transparently serialized and unserialized inside the communication operations.

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

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 class type (object). If the datatype argument represents an MPI derived type, its base type must agree with the element type of buf

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

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

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 Isend.

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 specified by MPI.Buffer_attach operation, and then sends using the standard mode of communication. Further comments as for Send.

Throws:
MPIException

Iprobe

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

source source rank
tag tag value
returns: status object or null reference

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 reference 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 source rank
tag tag value
returns: status object or null reference

Java binding of the MPI operation MPI_PROBE.

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

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

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

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

Recv_init

public Prequest Recv_init(java.lang.Object buf,
                          int offset,
                          int count,
                          Datatype datatype,
                          int source,
                          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: persistent communication request

Java binding of the MPI operation MPI_RECV_INIT.

Further comments as for Recv.

Throws:
MPIException

Pack

public int Pack(java.lang.Object inbuf,
                int offset,
                int incount,
                Datatype datatype,
                byte[] 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, in bytes
returns: final position in output buffer, in bytes

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(byte[] 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, in bytes
outcount number of items in output buffer
datatype datatype of each item in output buffer
returns: final position in input buffer, in bytes

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

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, in bytes

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 (FastMPJ provides Pack_size(int,Object[]) method instead) or MPI.PACKED (not sense) .

Throws:
MPIException

Pack_size

public int Pack_size(int incount,
                     java.lang.Object[] obj)
              throws MPIException
Special version of Pack_size for MPI.OBJECT datatype

incount number of items in input buffer
obj array of objects to be packed
returns: upper bound on size of packed message, in bytes

Throws:
MPIException

Barrier

public abstract void Barrier()
                      throws MPIException
A call to Barrier blocks the caller until all processes in the group have called it. The call returns at any process only after all group members have entered the call. This function can be used when a synchronization of all processes is needed.

Java binding of the MPI operation MPI_BARRIER.

Throws:
MPIException

Bcast

public abstract void Bcast(java.lang.Object buf,
                           int offset,
                           int count,
                           Datatype datatype,
                           int root)
                    throws MPIException
Broadcast a message from the process with rank root to all processes of the group, itself included. It is called by all members of group using the same arguments. On return, the contents of root's communication buffer have been copied to all processes. The type signature of count, datatype on any process must be equal to the type signature of count, datatype at the root.

buf inout buffer array
offset initial offset in buffer
count number of items in buffer
datatype datatype of each item in buffer
root rank of broadcast root

Java binding of the MPI operation MPI_BCAST.

Throws:
MPIException

Gather

public abstract void Gather(java.lang.Object sendbuf,
                            int sendoffset,
                            int sendcount,
                            Datatype sendtype,
                            java.lang.Object recvbuf,
                            int recvoffset,
                            int recvcount,
                            Datatype recvtype,
                            int root)
                     throws MPIException
Each process (root process included) sends the contents of its send buffer to the root process, which receives these contents in its recvbuf. The messages are concatenated in rank order. The type signature of sendcount, sendtype on any process must be equal to the type signature of recvcounts, recvtype at the root.

sendbuf send buffer array
sendoffset initial offset in send buffer
sendcount number of items to send
sendtype datatype of each item in send buffer
recvbuf receive buffer array (significant only at root)
recvoffset initial offset in receive buffer (significant only at root)
recvcount number of items to receive from each process
recvtype datatype of each item in receive buffer
root rank of receiving process

Java binding of the MPI operation MPI_GATHER.

Throws:
MPIException

Gatherv

public abstract void Gatherv(java.lang.Object sendbuf,
                             int sendoffset,
                             int sendcount,
                             Datatype sendtype,
                             java.lang.Object recvbuf,
                             int recvoffset,
                             int[] recvcount,
                             int[] displs,
                             Datatype recvtype,
                             int root)
                      throws MPIException
Extend the functionality of Gather by allowing varying counts of data from each process. It also allows more flexibility as to where the data is placed on the root, by providing the new argument, displs. Messages are placed in the receive buffer of the root process in rank order.

sendbuf send buffer array
sendoffset initial offset in send buffer
sendcount number of items to send
sendtype datatype of each item in send buffer
recvbuf receive buffer array (significant only at root)
recvoffset initial offset in receive buffer (significant only at root)
recvcounts number of elements received from each process (significant only at root)
displs displacements at which to place incoming data from each process (significant only at root)
recvtype datatype of each item in receive buffer (significant only at root)
root rank of receiving process

Java binding of the MPI operation MPI_GATHERV.

The size of arrays recvcounts and displs should be the size of the group. Entry i of displs specifies the displacement relative to element recvoffset of recvbuf at which to place incoming data. sendtype and recvtype must be the same.

Note that if recvtype is a derived data type, elements of displs are in units of the derived type extent, (unlike recvoffset, which is a direct index into the buffer array).

Throws:
MPIException

Scatter

public abstract void Scatter(java.lang.Object sendbuf,
                             int sendoffset,
                             int sendcount,
                             Datatype sendtype,
                             java.lang.Object recvbuf,
                             int recvoffset,
                             int recvcount,
                             Datatype recvtype,
                             int root)
                      throws MPIException
Inverse of the operation Gather. It is similar to Bcast but any process receives different data. The root sends a message which is split into n equal segments and the ith segment is received by the ith process in the group. The type signature associated with sendcount, sendtype at the root must be equal to the type signature associated with recvcount, recvtype at all processes. The argument root must have identical values on all processes.

sendbuf send buffer array (significant only at root)
sendoffset initial offset in send buffer
sendcount number of items to send to each process (significant only at root
sendtype datatype of each item in send buffer (significant only at root)
recvbuf receive buffer array
recvoffset initial offset in receive buffer
recvcount number of items to receive
recvtype datatype of each item in receive buffer
root rank of sending process

Java binding of the MPI operation MPI_SCATTER.

Throws:
MPIException

Scatterv

public abstract void Scatterv(java.lang.Object sendbuf,
                              int sendoffset,
                              int[] sendcount,
                              int[] displs,
                              Datatype sendtype,
                              java.lang.Object recvbuf,
                              int recvoffset,
                              int recvcount,
                              Datatype recvtype,
                              int root)
                       throws MPIException
Inverse of the operation Gatherv. It extends the operation Scatter by allowing sending different MPIUtil.counts of data to each process, since sendcount is now an array. It also allows more flexibility as to where the data is taken from on the root, by providing the new argument, displs. The type signature implied by sendcount[i], sendtype at the root must be equal to the type signature implied by recvcount, recvtype at process i.

sendbuf send buffer array (significant only at root)
sendoffset initial offset in send buffer
sendcount number of items to send to each process
displs displacements from which to take outgoing data to each process
sendtype datatype of each item in send buffer
recvbuf receive buffer array
recvoffset initial offset in receive buffer
recvcount number of items to receive
recvtype datatype of each item in receive buffer
root rank of sending process

Java binding of the MPI operation MPI_SCATTERV.

Throws:
MPIException

Allgather

public abstract void Allgather(java.lang.Object sendbuf,
                               int sendoffset,
                               int sendcount,
                               Datatype sendtype,
                               java.lang.Object recvbuf,
                               int recvoffset,
                               int recvcount,
                               Datatype recvtype)
                        throws MPIException
Similar to Gather, but all processes receive the result. The block of data sent from the process jth is received by every process and placed in the jth block of the buffer recvbuf. The type signature associated with sendcount, sendtype, at a process must be equal to the type signature associated with recvcount, recvtype at any other process.

sendbuf send buffer array
sendoffset initial offset in send buffer
sendcount number of items to send
sendtype datatype of each item in send buffer
recvbuf receive buffer array
recvoffset initial offset in receive buffer
recvcount number of items to receive from each process
recvtype datatype of each item in receive buffer

Java binding of the MPI operation MPI_ALLGATHER.

Throws:
MPIException

Allgatherv

public abstract void Allgatherv(java.lang.Object sendbuf,
                                int sendoffset,
                                int sendcount,
                                Datatype sendtype,
                                java.lang.Object recvbuf,
                                int recvoffset,
                                int[] recvcount,
                                int[] displs,
                                Datatype recvtype)
                         throws MPIException
Similar to Gatherv, but all processes receive the result. The block of data sent from jth process is received by every process and placed in the jth block of the buffer recvbuf. These blocks need not all be the same size. The type signature associated with sendcount, sendtype, at process j must be equal to the type signature associated with recvcounts[j], recvtype at any other process.

sendbuf send buffer array
sendoffset initial offset in send buffer
sendcount number of items to send
sendtype datatype of each item in send buffer
recvbuf receive buffer array
recvoffset initial offset in receive buffer
recvcounts number of received elements from each process
displs displacements at which to place incoming data
recvtype datatype of each item in receive buffer

Java binding of the MPI operation MPI_ALLGATHERV.

Throws:
MPIException

Alltoall

public abstract void Alltoall(java.lang.Object sendbuf,
                              int sendoffset,
                              int sendcount,
                              Datatype sendtype,
                              java.lang.Object recvbuf,
                              int recvoffset,
                              int recvcount,
                              Datatype recvtype)
                       throws MPIException
Extension of Allgather to the case where each process sends distinct data to each of the receivers. The jth block sent from process i is received by process j and is placed in the ith block of recvbuf. The type signature associated with sendcount, sendtype, at a process must be equal to the type signature associated with recvcount, recvtype at any other process.

sendbuf send buffer array
sendoffset initial offset in send buffer
sendcount number of items sent to each process
sendtype datatype send buffer items
recvbuf receive buffer array
recvoffset initial offset in receive buffer
recvcount number of items received from any process
recvtype datatype of receive buffer items

Java binding of the MPI operation MPI_ALLTOALL.

Throws:
MPIException

Alltoallv

public abstract void Alltoallv(java.lang.Object sendbuf,
                               int sendoffset,
                               int[] sendcount,
                               int[] sdispls,
                               Datatype sendtype,
                               java.lang.Object recvbuf,
                               int recvoffset,
                               int[] recvcount,
                               int[] rdispls,
                               Datatype recvtype)
                        throws MPIException
Adds flexibility to Alltoall: location of data for send is specified by sdispls and location to place data on receive side is specified by rdispls. The jth block sent from process i is received by process j and is placed in the ith block of recvbuf. These blocks need not all have the same size. The type signature associated with sendcount[j], sendtype at process i must be equal to the type signature associated with recvcounts[i], recvtype at process j.

sendbuf send buffer array
sendoffset initial offset in send buffer
sendcount number of items sent to each process
sdispls displacements from which to take outgoing data. Entry j specifies the displacement from which to take the outgoing data destined for process j
sendtype datatype send buffer items
recvbuf receive buffer array
recvoffset initial offset in receive buffer
recvcounts number of elements received from each process
rdispls displacements at which to place incoming data. Entry i specifies the displacement at which to place the incoming data from process i
recvtype datatype of each item in receive buffer

Java binding of the MPI operation MPI_ALLTOALLV.

Throws:
MPIException

Reduce

public abstract void Reduce(java.lang.Object sendbuf,
                            int sendoffset,
                            java.lang.Object recvbuf,
                            int recvoffset,
                            int count,
                            Datatype datatype,
                            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. Arguments count, datatype, op and root must be the same in all processes. Input and output buffers have the same length and elements of the same type. Each process can provide one element, or a sequence of elements, in which case the combine operation is executed element-wise on each entry of the sequence.

sendbuf send buffer array
sendoffset initial offset in send buffer
recvbuf receive buffer array (significant only at root)
recvoffset initial offset in receive buffer
count number of items in send buffer
datatype data type of each item in send buffer
op reduce operation
root rank of root process

Java binding of the MPI operation MPI_REDUCE.

op can be a predefined operation or an user-defined operation. The predefined operations are available in Java as MPI.MAX, MPI.MIN, MPI.SUM, MPI.PROD, MPI.LAND, MPI.BAND, MPI.LOR, MPI.BOR, MPI.LXOR, MPI.BXOR, MPI.MINLOC and MPI.MAXLOC. The operation is always assumed to be associative. The datatype must be compatible with op.

Throws:
MPIException

Allreduce

public abstract void Allreduce(java.lang.Object sendbuf,
                               int sendoffset,
                               java.lang.Object recvbuf,
                               int recvoffset,
                               int count,
                               Datatype datatype,
                               Op op)
                        throws MPIException
Same as Reduce except that the result appears in the receive buffer of all processes in the group. All processes must receive identical results.

sendbuf send buffer array
sendoffset initial offset in send buffer
recvbuf receive buffer array
recvoffset initial offset in receive buffer
count number of items in send buffer
datatype data type of each item in send buffer
op reduce operation

Java binding of the MPI operation MPI_ALLREDUCE.

Throws:
MPIException

Reduce_scatter

public abstract void Reduce_scatter(java.lang.Object sendbuf,
                                    int sendoffset,
                                    java.lang.Object recvbuf,
                                    int recvoffset,
                                    int[] recvcounts,
                                    Datatype datatype,
                                    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. The ith segment in result vector is sent to process i and stored in the receive buffer defined by recvbuf, recvcounts[i] and datatype.

sendbuf send buffer array
sendoffset initial offset in send buffer
recvbuf receive buffer array
recvoffset initial offset in receive buffer
recvcounts numbers of result elements distributed to each process. Array must be identical on all calling processes.
datatype data type of each item in send buffer
op reduce operation

Java binding of the MPI operation MPI_REDUCE_SCATTER.

Throws:
MPIException

Scan

public abstract void Scan(java.lang.Object sendbuf,
                          int sendoffset,
                          java.lang.Object recvbuf,
                          int recvoffset,
                          int count,
                          Datatype datatype,
                          Op op)
                   throws MPIException
Perform a prefix reduction on data distributed across the group. The operation returns, in the recvbuf of the process with rank i, the reduction of the values in the send buffers of processes with ranks 0,...,i (inclusive). Operations supported, semantics and constraints of arguments are as for Reduce.

sendbuf send buffer array
sendoffset initial offset in send buffer
recvbuf receive buffer array
recvoffset initial offset in receive buffer
count number of items in input buffer
datatype data type of each item in input buffer
op reduce operation

Java binding of the MPI operation MPI_SCAN.

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

Errorhandler_set

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

errhandler new MPI error handler for communicator

Java binding of the MPI operation MPI_ERRORHANDLER_SET..

Not implemented in the current release

Throws:
MPIException

Errorhandler_get

public static Errhandler Errorhandler_get()
                                   throws MPIException
Returns the error handler currently associated with the communicator.

returns: MPI error handler currently associated with communicator

Java binding of the MPI operation MPI_ERRORHANDLER_GET..

Not implemented in the current release

Throws:
MPIException