Class | Tree | Deprecated | Index | Help
PREV CLASS | NEXT CLASS FRAMES  | NO FRAMES
SUMMARY:  INNER | FIELD | CONSTR | METHOD DETAIL:  FIELD | CONSTR | METHOD

Class mpij.Intracomm

java.lang.Object
  |
  +--mpij.Comm
        |
        +--mpij.Intracomm

public class Intracomm
extends Comm
Provides a communication universe with global operations.


Method Summary
void allGather(java.lang.Object sendBuf, int sendStart, int sendCount, Datatype sendType, java.lang.Object recvBuf, int recvStart, int recvCount, Datatype recvType)
          allGather can be thought of as gather, but where all processes receive the result, instead of just the root.
void allReduce(java.lang.Object sendBuf, int sendStart, java.lang.Object recvBuf, int recvStart, int count, Datatype type, Op op)
          Same as reduce except that the result appears in the receive buffer of all the group members.
void allToAll(java.lang.Object sendBuf, int sendStart, int sendCount, Datatype sendType, java.lang.Object recvBuf, int recvStart, int recvCount, Datatype recvType)
          allToAll is an extension of allGather to the case where each process sends distinct data to each of the receivers.
void barrier()
          Blocks until all members of the Intracomm have called this method.
void bcast(java.lang.Object buf, int start, int count, Datatype type, int root)
          Broadcasts to all members of the Intracomm.
Intracomm create(Group group)
          Create an Intracomm from the given group
Intracomm dup()
          Returns an exact copy of this Intracomm.
void gather(java.lang.Object sendBuf, int sendStart, int sendCount, Datatype sendType, java.lang.Object recvBuf, int recvStart, int recvCount, Datatype recvType, int root)
          Gathers data from all processes to the root process.
void reduce(java.lang.Object sendBuf, int sendStart, java.lang.Object recvBuf, int recvStart, int count, Datatype type, Op op, int root)
          reduce combines the elements provided in the input buffer of each process in the group, using the operation op, and returns the combined value in the output buffer of the process with rank root.
void scatter(java.lang.Object sendBuf, int sendStart, int sendCount, Datatype sendType, java.lang.Object recvBuf, int recvStart, int recvCount, Datatype recvType, int root)
          Scatters data to all processes from the root process.
void scatterv(java.lang.Object sendBuf, int[] sendCounts, int[] displacements, Datatype sendType, java.lang.Object recvBuf, int recvStart, int recvCount, Datatype recvType, int root)
          scatterv extends the functionality of scatter by allowing a varying count of data to be sent to each process, since sendCounts is now an array.
Intracomm split(int color, int key)
          Splits this Intracomm according to color.
 
Methods inherited from class mpij.Comm
bsend, bsend, compare, group, ibsend, iprobe, irecv, irsend, isend, issend, probe, rank, recv, recv, rsend, rsend, send, send, size, ssend, ssend
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notifyAll, notify, toString, wait, wait, wait
 

Method Detail

dup

public Intracomm dup()
                  throws MPIException
Returns an exact copy of this Intracomm. The new Intracomm has a unique context.

create

public Intracomm create(Group group)
                     throws MPIException
Create an Intracomm from the given group
Parameters:
group - group listing members of the Intracomm

split

public Intracomm split(int color,
                       int key)
                    throws MPIException
Splits this Intracomm according to color. A new Intracomm is created for each value of color passed in. The members of each new Intracomm are ordered according to key. Returns the new Intracomm for the caller.
Parameters:
color - defines which Intracomm the caller will belong to
key - used to determine order in new Intracomms

barrier

public void barrier()
            throws MPIException
Blocks until all members of the Intracomm have called this method.

bcast

public void bcast(java.lang.Object buf,
                  int start,
                  int count,
                  Datatype type,
                  int root)
          throws MPIException
Broadcasts to all members of the Intracomm.
Parameters:
buf - data to broadcast
start - start offset in buf
count - number of elements in buf to send
type - datatype of buf
root - node from which broadcast originates

gather

public void gather(java.lang.Object sendBuf,
                   int sendStart,
                   int sendCount,
                   Datatype sendType,
                   java.lang.Object recvBuf,
                   int recvStart,
                   int recvCount,
                   Datatype recvType,
                   int root)
           throws MPIException
Gathers data from all processes to the root process.
Parameters:
sendBuf - data to send to root
sendStart - start offset in sendBuf
sendCount - length of data to send from sendBuf
sendType - type of send data
recvBuf - dest for gathered data (at root)
recvStart - start offset in recvBuf
recvCount - length of data to recv in recvBuf
recvType - type of recv data

scatter

public void scatter(java.lang.Object sendBuf,
                    int sendStart,
                    int sendCount,
                    Datatype sendType,
                    java.lang.Object recvBuf,
                    int recvStart,
                    int recvCount,
                    Datatype recvType,
                    int root)
            throws MPIException
Scatters data to all processes from the root process.
Parameters:
sendBuf - data to send (from root)
sendStart - start offset in sendBuf
sendCount - length of data to send from sendBuf
sendType - type of send data
recvBuf - dest for gathered data
recvStart - start offset in recvBuf
recvCount - length of data to recv in recvBuf
recvType - type of recv data

allGather

public void allGather(java.lang.Object sendBuf,
                      int sendStart,
                      int sendCount,
                      Datatype sendType,
                      java.lang.Object recvBuf,
                      int recvStart,
                      int recvCount,
                      Datatype recvType)
              throws MPIException
allGather can be thought of as gather, but where all processes receive the result, instead of just the root. The jth block of data sent from each process is received by every process and placed in the jth block of the buffer recvbuf.
Parameters:
sendBuf - data to send
sendStart - start offset in sendBuf
sendCount - length of data to send from sendBuf
sendType - type of send data
recvBuf - dest for gathered data
recvStart - start offset in recvBuf
recvCount - length of data to recv in recvBuf
recvType - type of recv data

allToAll

public void allToAll(java.lang.Object sendBuf,
                     int sendStart,
                     int sendCount,
                     Datatype sendType,
                     java.lang.Object recvBuf,
                     int recvStart,
                     int recvCount,
                     Datatype recvType)
             throws MPIException
allToAll is an 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.
Parameters:
sendBuf - data to send
sendStart - start offset in sendBuf
sendCount - length of data to send from sendBuf
sendType - type of send data
recvBuf - dest for gathered data
recvStart - start offset in recvBuf
recvCount - length of data to recv in recvBuf
recvType - type of recv data

scatterv

public void scatterv(java.lang.Object sendBuf,
                     int[] sendCounts,
                     int[] displacements,
                     Datatype sendType,
                     java.lang.Object recvBuf,
                     int recvStart,
                     int recvCount,
                     Datatype recvType,
                     int root)
             throws MPIException
scatterv extends the functionality of scatter by allowing a varying count of data to be sent to each process, since sendCounts 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, displacement.
Parameters:
sendBuf - data to send
sendCounts - length of data to send from sendBuf
sendStart - start offset in sendBuf
sendType - type of send data
recvBuf - dest for gathered data
recvStart - start offset in recvBuf
recvCount - length of data to recv in recvBuf
recvType - type of recv data

reduce

public void reduce(java.lang.Object sendBuf,
                   int sendStart,
                   java.lang.Object recvBuf,
                   int recvStart,
                   int count,
                   Datatype type,
                   Op op,
                   int root)
           throws MPIException
reduce combines the elements provided in the input buffer of each process in the group, using the operation op, and returns the combined value in the output buffer of the process with rank root. The input buffer is defined by the arguments sendbuf, count and datatype; the output buffer is defined by the arguments recvbuf, count and datatype; both have the same number of elements, with the same type. The routine is called by all group members using the same arguments for count, datatype, op, root and comm. Thus, all processes provide input buffers and output buffers of the same length, with 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. For example, if the operation is MPI.MAX and the send buffer contains two elements that are floating point numbers (count = 2 and dataType = MPI.FLOAT), then recvBuf[0] = globalmax(sendBuf[0]) and recvBuf[1] = globalmax(sendBuf[1]).
Parameters:
sendBuf - data to reduce
sendStart - start offset in sendBuf
recvBuf - dest for gathered data
recvStart - start offset in recvBuf
count - length of data to send/recv
type - type of send/recv data
Op - operation to perform
root - node which receives the result

allReduce

public void allReduce(java.lang.Object sendBuf,
                      int sendStart,
                      java.lang.Object recvBuf,
                      int recvStart,
                      int count,
                      Datatype type,
                      Op op)
              throws MPIException
Same as reduce except that the result appears in the receive buffer of all the group members.
Parameters:
sendBuf - data to reduce
sendStart - start offset in sendBuf
recvBuf - dest for gathered data
recvStart - start offset in recvBuf
count - length of data to send/recv
type - type of send/recv data
Op - operation to perform

Class | Tree | Deprecated | Index | Help
PREV CLASS | NEXT CLASS FRAMES  | NO FRAMES
SUMMARY:  INNER | FIELD | CONSTR | METHOD DETAIL:  FIELD | CONSTR | METHOD