p2pmpi.mpi
Class IntraComm

java.lang.Object
  extended by p2pmpi.mpi.Comm
      extended by p2pmpi.mpi.IntraComm

public class IntraComm
extends Comm

Collective communication class


Constructor Summary
IntraComm(p2pmpi.mpi.dev.Device myDevice, p2pmpi.common.RankTable rankTable, int rank, int rankInList, int numRank, p2pmpi.common.MapRankTable mapRankTable)
          Internal use
IntraComm(Group group)
          Create a new collective communicator by group
 
Method Summary
 void Allgather(java.lang.Object sendBuffer, int sendOffset, int sendCount, Datatype sendType, java.lang.Object recvBuffer, int recvOffset, int recvCount, Datatype recvType)
          Gathers data from all tasks and distribute it to all
 void Allgatherv(java.lang.Object sendBuffer, int sendOffset, int sendCount, Datatype sendType, java.lang.Object recvBuffer, int recvOffset, int[] recvCount, int[] displs, Datatype recvType)
          Gathers data from all tasks and deliver it to all
 void Allreduce(java.lang.Object sendBuffer, int sendOffset, java.lang.Object recvBuffer, int recvOffset, int count, Datatype datatype, Op op)
          Reduce the result and then broadcast it to all MPI processes
 void AllreduceButterfly(java.lang.Object sendBuffer, int sendOffset, java.lang.Object recvBuffer, int recvOffset, int count, Datatype datatype, Op op)
           
 void AllreduceSimple(java.lang.Object sendBuffer, int sendOffset, java.lang.Object recvBuffer, int recvOffset, int count, Datatype datatype, Op op)
           
 void Alltoall(java.lang.Object sendBuffer, int sendOffset, int sendCount, Datatype sendType, java.lang.Object recvBuffer, int recvOffset, int recvCount, Datatype recvType)
          Reduce the result and then broadcast it to all MPI processes
 void Alltoallv(java.lang.Object sendBuffer, int sendOffset, int[] sendCount, int[] sdispls, Datatype sendType, java.lang.Object recvBuffer, int recvOffset, int[] recvCount, int[] rdispls, Datatype recvType)
          Reduce the result and then broadcast it to all MPI processes with variable size
 void Barrier()
          Synchronize MPI processes
 void Bcast(java.lang.Object buffer, int offset, int count, Datatype datatype, int root)
          Broadcast a message to all MPI processes
 IntraComm Create(Group group)
          Create a new intra-communicator
 void Gather(java.lang.Object sendBuffer, int sendOffset, int sendCount, Datatype sendType, java.lang.Object recvBuffer, int recvOffset, int recvCount, Datatype recvType, int root)
          Gathers together values from a group of tasks
 void Gatherv(java.lang.Object sendBuffer, int sendOffset, int sendCount, Datatype sendType, java.lang.Object recvBuffer, int recvOffset, int[] recvCount, int[] displs, Datatype recvType, int root)
          Gathers into specified locations from all processes in group
 void Reduce_scatter(java.lang.Object sendBuffer, int sendOffset, java.lang.Object recvBuffer, int recvOffset, int[] recvCount, Datatype datatype, Op op)
          Combines value and scatters the results
 void Reduce(java.lang.Object sendBuffer, int sendOffset, java.lang.Object recvBuffer, int recvOffset, int count, Datatype datatype, Op op, int root)
          MPI collective operation reduce from all MPI processes (Binomail tree by default)
 void Scan(java.lang.Object sendbuf, int sendoffset, java.lang.Object recvbuf, int recvoffset, int count, Datatype datatype, Op op)
          Computes the scan (partial reductions) of data on a collection of processes
 void Scatter(java.lang.Object sendBuffer, int sendOffset, int sendCount, Datatype sendType, java.lang.Object recvBuffer, int recvOffset, int recvCount, Datatype recvType, int root)
          Sends data from one task to all other tasks in a group
 void Scatterv(java.lang.Object sendBuffer, int sendOffset, int[] sendCount, int[] displs, Datatype sendType, java.lang.Object recvBuffer, int recvOffset, int recvCount, Datatype recvType, int root)
          Sends a buffer in parts to all tasks in a group
 IntraComm Split(int color, int key)
           
 
Methods inherited from class p2pmpi.mpi.Comm
Group, Irecv, Isend, Rank, Recv, Send, Sendrecv, Size, SizeTotal, Ssend
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IntraComm

public IntraComm(p2pmpi.mpi.dev.Device myDevice,
                 p2pmpi.common.RankTable rankTable,
                 int rank,
                 int rankInList,
                 int numRank,
                 p2pmpi.common.MapRankTable mapRankTable)
Internal use


IntraComm

public IntraComm(Group group)
Create a new collective communicator by group

Parameters:
group - Group
Method Detail

Create

public IntraComm Create(Group group)
Create a new intra-communicator

Parameters:
group - Group
Returns:
a new inter-communicator

Barrier

public void Barrier()
Synchronize MPI processes


Bcast

public void Bcast(java.lang.Object buffer,
                  int offset,
                  int count,
                  Datatype datatype,
                  int root)
Broadcast a message to all MPI processes

Parameters:
buffer - Send object
offset - Offset of send object
count - Number of elements
datatype - Type of send object
root - MPI Rank of root node

Reduce

public void Reduce(java.lang.Object sendBuffer,
                   int sendOffset,
                   java.lang.Object recvBuffer,
                   int recvOffset,
                   int count,
                   Datatype datatype,
                   Op op,
                   int root)
MPI collective operation reduce from all MPI processes (Binomail tree by default)

Parameters:
sendBuffer - Send object
sendOffset - Send object offset
recvBuffer - Receive object
recvOffset - Receive object offset
count - Number of elements
datatype - MPI datatype
op - Operation used in reduce
root - MPI rank of root node which maintain the result

Allreduce

public void Allreduce(java.lang.Object sendBuffer,
                      int sendOffset,
                      java.lang.Object recvBuffer,
                      int recvOffset,
                      int count,
                      Datatype datatype,
                      Op op)
Reduce the result and then broadcast it to all MPI processes

Parameters:
sendBuffer - Send object
sendOffset - Send object offset
recvBuffer - Receive object
recvOffset - Receive object offset
count - Number of elements
datatype - MPI datatype
op - Operation used in reduce

AllreduceSimple

public void AllreduceSimple(java.lang.Object sendBuffer,
                            int sendOffset,
                            java.lang.Object recvBuffer,
                            int recvOffset,
                            int count,
                            Datatype datatype,
                            Op op)

AllreduceButterfly

public void AllreduceButterfly(java.lang.Object sendBuffer,
                               int sendOffset,
                               java.lang.Object recvBuffer,
                               int recvOffset,
                               int count,
                               Datatype datatype,
                               Op op)

Alltoallv

public void Alltoallv(java.lang.Object sendBuffer,
                      int sendOffset,
                      int[] sendCount,
                      int[] sdispls,
                      Datatype sendType,
                      java.lang.Object recvBuffer,
                      int recvOffset,
                      int[] recvCount,
                      int[] rdispls,
                      Datatype recvType)
Reduce the result and then broadcast it to all MPI processes with variable size

Parameters:
sendBuffer - Send object
sendOffset - Send object offset
sendCount - Number of elements for sending
sdispls - Displacement of send object
sendType - MPI datatype of send object
recvBuffer - Receive object
recvOffset - Receive object offset
recvCount - Number of elements for receiving
rdispls - Displacement of receive object
recvType - MPI datatype of receive object

Alltoall

public void Alltoall(java.lang.Object sendBuffer,
                     int sendOffset,
                     int sendCount,
                     Datatype sendType,
                     java.lang.Object recvBuffer,
                     int recvOffset,
                     int recvCount,
                     Datatype recvType)
Reduce the result and then broadcast it to all MPI processes

Parameters:
sendBuffer - Send object
sendOffset - Send object offset
sendCount - Number of elements for sending
sendType - MPI datatype of send object
recvBuffer - Receive object
recvOffset - Receive object offset
recvCount - Number of elements for receiving
recvType - MPI datatype of receive object

Gather

public void Gather(java.lang.Object sendBuffer,
                   int sendOffset,
                   int sendCount,
                   Datatype sendType,
                   java.lang.Object recvBuffer,
                   int recvOffset,
                   int recvCount,
                   Datatype recvType,
                   int root)
Gathers together values from a group of tasks

Parameters:
sendBuffer - send object
sendOffset - send object offset
sendCount - number of elements for sending
sendType - MPI datatype of send object
recvBuffer - receive object
recvOffset - receive object offset
recvCount - number of elements for receiving
recvType - MPI datatype of receive object
root - node to gather the value

Gatherv

public void Gatherv(java.lang.Object sendBuffer,
                    int sendOffset,
                    int sendCount,
                    Datatype sendType,
                    java.lang.Object recvBuffer,
                    int recvOffset,
                    int[] recvCount,
                    int[] displs,
                    Datatype recvType,
                    int root)
Gathers into specified locations from all processes in group

Parameters:
sendBuffer - send object
sendOffset - send object offset
sendCount - number of elements in send object
sendType - datatype of send object elements
recvBuffer - receive object
recvOffset - receive object offset
recvCount - integer array (of length group size) containing the number of elements that are received from each process
displs - integer array (of length group size). Entry i specifies the displacement relative to recvOffset of recvBuffer at which to place the incoming data from process i
recvType - MPI datatype of receive object
root - node to gather the value

Allgather

public void Allgather(java.lang.Object sendBuffer,
                      int sendOffset,
                      int sendCount,
                      Datatype sendType,
                      java.lang.Object recvBuffer,
                      int recvOffset,
                      int recvCount,
                      Datatype recvType)
Gathers data from all tasks and distribute it to all

Parameters:
sendBuffer - send object
sendOffset - send object offset
sendCount - number of elements for sending
sendType - MPI datatype of send object
recvBuffer - receive object
recvOffset - receive object offset
recvCount - number of elements for receiving
recvType - MPI datatype of receive object

Allgatherv

public void Allgatherv(java.lang.Object sendBuffer,
                       int sendOffset,
                       int sendCount,
                       Datatype sendType,
                       java.lang.Object recvBuffer,
                       int recvOffset,
                       int[] recvCount,
                       int[] displs,
                       Datatype recvType)
Gathers data from all tasks and deliver it to all

Parameters:
sendBuffer - send object
sendOffset - send object offset
sendCount - number of elements for sending
sendType - MPI datatype of send object
recvBuffer - receive object
recvOffset - receive object offset
recvCount - integer array (of length group size) containing the number of elements that are received from each process
displs - integer array (of length group size). Entry i specifies the displacement relative to recvOffset of recvBuffer at which to place the incoming data from process i
recvType - MPI datatype of receive object

Scatter

public void Scatter(java.lang.Object sendBuffer,
                    int sendOffset,
                    int sendCount,
                    Datatype sendType,
                    java.lang.Object recvBuffer,
                    int recvOffset,
                    int recvCount,
                    Datatype recvType,
                    int root)
Sends data from one task to all other tasks in a group

Parameters:
sendBuffer - send object
sendOffset - send object offset
sendCount - number of elements for sending
sendType - MPI datatype of send object
recvBuffer - receive object
recvOffset - receive object offset
recvCount - number of elements for receiving
recvType - MPI datatype of receive object
root - rank of sending process

Scatterv

public void Scatterv(java.lang.Object sendBuffer,
                     int sendOffset,
                     int[] sendCount,
                     int[] displs,
                     Datatype sendType,
                     java.lang.Object recvBuffer,
                     int recvOffset,
                     int recvCount,
                     Datatype recvType,
                     int root)
Sends a buffer in parts to all tasks in a group

Parameters:
sendBuffer - send object
sendOffset - send object offset
sendCount - integer array (of length group size) specifying the number of elements to send to each processor
displs - integer array (of length group size). Entry i specifies the displacement relative to process i
sendType - MPI datatype of send object
recvBuffer - receive object
recvOffset - receive object offset
recvCount - number of elements for receiving
recvType - MPI datatype of receive object
root - rank of sending process

Reduce_scatter

public void Reduce_scatter(java.lang.Object sendBuffer,
                           int sendOffset,
                           java.lang.Object recvBuffer,
                           int recvOffset,
                           int[] recvCount,
                           Datatype datatype,
                           Op op)
Combines value and scatters the results

Parameters:
sendBuffer - send object
sendOffset - send object offset
recvBuffer - receive object
recvOffset - receive object offset
recvCount - integer array specifying the number of elements in result distributed to each process
datatype - data type of elements of sending object (handle)
op - operation (handle)

Scan

public void Scan(java.lang.Object sendbuf,
                 int sendoffset,
                 java.lang.Object recvbuf,
                 int recvoffset,
                 int count,
                 Datatype datatype,
                 Op op)
Computes the scan (partial reductions) of data on a collection of processes

Parameters:
sendbuf - send buffer
sendoffset - send buffer offset
recvbuf - receive buffer
recvoffset - receive buffer offset
count - number of elements
datatype - data type
op - operation

Split

public IntraComm Split(int color,
                       int key)