p2pmpi.mpi
Class Comm

java.lang.Object
  extended by p2pmpi.mpi.Comm
Direct Known Subclasses:
IntraComm

public class Comm
extends java.lang.Object

Point-to-Point communication class


Constructor Summary
Comm(Group group)
          Create a new communicator by group
Comm(p2pmpi.mpi.internal.MessageHandler msgHandle, p2pmpi.common.RankTable rankTable, int rank, int rankInList, int numRank, p2pmpi.common.MapRankTable mapRankTable)
          Internal use
 
Method Summary
 Group Group()
          Returns group of this communicator
 Request IRecv(java.lang.Object recvBuffer, int offset, int count, Datatype datatype, int src, int tag)
          Begins a non-blocking receive.
static void Object_Deserialize(java.lang.Object buf, byte[] byte_buf, int offset, int count, Datatype type)
           
static byte[] Object_Serialize(java.lang.Object buf, int offset, int count, Datatype type)
           
 int Rank()
          Returns my rank number in communicator.
 Status Recv(java.lang.Object recvBuffer, int offset, int count, Datatype datatype, int src, int tag)
          Basic (blocking) receive.
 int Send(java.lang.Object sendBuffer, int offset, int count, Datatype datatype, int dest, int tag)
          Basic send operation.
 Status Sendrecv(java.lang.Object sendBuffer, int sendOffset, int sendCount, Datatype sendType, int dest, int sendTag, java.lang.Object recvBuffer, int recvOffset, int recvCount, Datatype recvType, int source, int recvTag)
           
 int Size()
          Returns the number of processes in communicator.
 int SizeTotal()
          Internal use.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Comm

public Comm(p2pmpi.mpi.internal.MessageHandler msgHandle,
            p2pmpi.common.RankTable rankTable,
            int rank,
            int rankInList,
            int numRank,
            p2pmpi.common.MapRankTable mapRankTable)
Internal use


Comm

public Comm(Group group)
Create a new communicator by group

Parameters:
group - Group
Method Detail

Group

public Group Group()
Returns group of this communicator

Returns:
group

Size

public int Size()
Returns the number of processes in communicator.

Returns:
number of processes in co

SizeTotal

public int SizeTotal()
Internal use.


Rank

public int Rank()
Returns my rank number in communicator.

Returns:
MPI rank

Send

public int Send(java.lang.Object sendBuffer,
                int offset,
                int count,
                Datatype datatype,
                int dest,
                int tag)
Basic send operation.

Parameters:
sendBuffer - send buffer array
offset - initial offset in send buffer
count - number of items to send
datatype - datatype of send buffer items
dest - rank of destination
tag - message tag

IRecv

public Request IRecv(java.lang.Object recvBuffer,
                     int offset,
                     int count,
                     Datatype datatype,
                     int src,
                     int tag)
Begins a non-blocking receive.

Parameters:
recvBuffer - receive buffer array
offset - initial offset in receive buffer
count - number of items to receive
datatype - datatype of received items
src - rank of source
tag - message tag

Sendrecv

public Status Sendrecv(java.lang.Object sendBuffer,
                       int sendOffset,
                       int sendCount,
                       Datatype sendType,
                       int dest,
                       int sendTag,
                       java.lang.Object recvBuffer,
                       int recvOffset,
                       int recvCount,
                       Datatype recvType,
                       int source,
                       int recvTag)

Recv

public Status Recv(java.lang.Object recvBuffer,
                   int offset,
                   int count,
                   Datatype datatype,
                   int src,
                   int tag)
Basic (blocking) receive.

Parameters:
recvBuffer - receive buffer array
offset - initial offset in receive buffer
count - number of items to receive
datatype - datatype of received items
src - rank of source
tag - message tag

Object_Serialize

public static byte[] Object_Serialize(java.lang.Object buf,
                                      int offset,
                                      int count,
                                      Datatype type)

Object_Deserialize

public static void Object_Deserialize(java.lang.Object buf,
                                      byte[] byte_buf,
                                      int offset,
                                      int count,
                                      Datatype type)