Jpetra  Development
 All Classes Functions Variables
Public Member Functions | List of all members
Jpetra.Comm Interface Reference
Inheritance diagram for Jpetra.Comm:
Inheritance graph
[legend]

Public Member Functions

void barrier ()
 
Serializable broadcast (Serializable value, int root)
 
int broadcast (int value, int root)
 
double broadcast (double value, int root)
 
Serializable[] gatherAll (Serializable[] myElements)
 
double[] gatherAll (double[] myElements)
 
int[] gatherAll (int[] myElements)
 
int[][] gatherAll2dArray (int[] myElements)
 
int[] gatherAll (int myInt)
 
double[] gatherAll (double myDouble)
 
double[] sumAll (double[] partialSums)
 
int[] sumAll (int[] partialSums)
 
double[] maxAll (double[] partialMaxs)
 
int[] maxAll (int[] partialMaxs)
 
Serializable maxAll (Serializable partialMaxs)
 
double[] minAll (double[] partialMins)
 
Serializable minAll (Serializable partialMins)
 
int[] minAll (int[] partialMins)
 
double[] scanSums (double[] myElements)
 
int[] scanSums (int[] myElements)
 
int getNumVnodes ()
 
int getVnodeId ()
 
void setMyVnodeID (int newVnodeID)
 
void send (int[] exportObject, int destinationVnode)
 
void send (double[] exportObject, int destinationVnode)
 
void send (Serializable exportObject, int destinationVnode)
 
Serializable receive (int senderId)
 
int[] scatter2dArray (int[][] in)
 
int[] scatterIntArray (int[] in)
 
int[][] gather (int[] in)
 
boolean isSerial ()
 
Directory createDirectory (VectorSpace vectorSpace)
 
Distributor createDistributor ()
 

Detailed Description

Comm is the interface for the all the Jpetra communication classes.

Terminology: A vnode is considered to be a virtual node (a memory image) and not a physical machine. A physical node is considered to be a physical machine, and may have many vnodes on it. The term node has no meaning, and should be qualified by virtual or physical.

Author
Mike Heroux
Michael William Boldt
Jason Cross

Member Function Documentation

void Jpetra.Comm.barrier ( )

Causes each vnode in the communicator to wait until all vnodes have arrived. No-op for a serial communicator.

Implemented in Jpetra.CcjComm, and Jpetra.SerialComm.

Serializable Jpetra.Comm.broadcast ( Serializable  value,
int  root 
)

Broadcasts any Serializable object from the root vnode to all other vnodes. Requires the return object to be cast into a more useful object.

Parameters
valueobject that is broadcast by the root vnode
rootroot vnode ID, most likely 0
Returns
all vnodes recieve this object

Implemented in Jpetra.CcjComm.

int Jpetra.Comm.broadcast ( int  value,
int  root 
)

Broadcasts an int from the root vnode to all other vnodes.

Parameters
valueint that is broadcast by the root vnode
rootroot vnode ID, most likely 0
Returns
all vnodes recieve this int

Implemented in Jpetra.CcjComm, and Jpetra.SerialComm.

double Jpetra.Comm.broadcast ( double  value,
int  root 
)

Broadcasts an double from the root vnode to all other vnodes.

Parameters
valuedouble that is broadcast by the root vnode
rootroot vnode ID, most likely 0
Returns
all vnodes recieve this int

Implemented in Jpetra.CcjComm, and Jpetra.SerialComm.

Serializable [] Jpetra.Comm.gatherAll ( Serializable[]  myElements)

Takes a list of Serilizable objects from all vnodes in the communicator and creates an ordered contiguous list of those objects in each vnode. Requires the return object to be cast into a more useful object.

Parameters
myElementsin on entry; the list of values to be sent to all vnodes
Returns
allElements out on exit; the list of values from all vnodes

Implemented in Jpetra.CcjComm.

double [] Jpetra.Comm.gatherAll ( double[]  myElements)

Takes a list of values from all vnodes in the communicator and creates an ordered contiguous list of those values in each vnode.

Parameters
myElementsin on entry; the list of values to be sent to all vnodes
Returns
allElements out on exit; the list of values from all vnodes

Implemented in Jpetra.CcjComm, and Jpetra.SerialComm.

int [] Jpetra.Comm.gatherAll ( int[]  myElements)

Takes a list of values from all vnodes in the communicator and creates an ordered contiguous list of those values in each vnode.

Parameters
myElementsin on entry; the list of values to be sent to all vnodes
Returns
out on exit; the list of values from all vnodes

Implemented in Jpetra.CcjComm, and Jpetra.SerialComm.

int [] Jpetra.Comm.gatherAll ( int  myInt)

Takes a value from all vnodes in the communicator and creates an ordered contiguous list of those values in each vnode.

Parameters
myIntin on entry; the list of values to be sent to all vnodes
Returns
out on exit; the list of values from all vnodes

Implemented in Jpetra.CcjComm, and Jpetra.SerialComm.

double [] Jpetra.Comm.gatherAll ( double  myDouble)

Takes a value from all vnodes in the communicator and creates an ordered contiguous list of those values in each vnode.

Parameters
myDoublein on entry; the list of values to be sent to all vnodes
Returns
out on exit; the list of values from all vnodes

Implemented in Jpetra.CcjComm, and Jpetra.SerialComm.

int Jpetra.Comm.getNumVnodes ( )

Accessor for the number of vnodes in the commmunicator.

Returns
number of vnodes

Implemented in Jpetra.SerialComm, and Jpetra.CcjComm.

int Jpetra.Comm.getVnodeId ( )

Accessor for the rank of the calling vnode.

Returns
the rank of the calling vnode in MPI (CCJ); 0 in serial mode

Implemented in Jpetra.SerialComm, and Jpetra.CcjComm.

Referenced by Jpetra.ElementSpace.ElementSpace().

boolean Jpetra.Comm.isSerial ( )

Accessor to see if the communicator is on a serial or parallel machine.

Returns
true in serial mode, otherwise false

Implemented in Jpetra.SerialComm, and Jpetra.CcjComm.

Referenced by Jpetra.ElementSpace.ElementSpace().

double [] Jpetra.Comm.maxAll ( double[]  partialMaxs)

Takes a list of values form all vnodes in the communicator, computes the max, and returns the max to all vnodes.

Parameters
partialMaxsin on entry; the list of values, usually computed locally, to be summed across all vnodes
Returns
out on exit; the list of values summed across all vnodes

Implemented in Jpetra.CcjComm, and Jpetra.SerialComm.

int [] Jpetra.Comm.maxAll ( int[]  partialMaxs)

Takes a list of values form all vnodes in the communicator, computes the max, and returns the max to all vnodes.

Parameters
partialMaxsin on entry; the list of values, usually computed locally, to be summed across all vnodes
Returns
out on exit; the list of values summed across all vnodes

Implemented in Jpetra.CcjComm, and Jpetra.SerialComm.

double [] Jpetra.Comm.minAll ( double[]  partialMins)

Takes a list of values form all vnodes in the communicator, computes the min, and returns the min to all vnodes.

Parameters
partialMinsin on entry; the list of values, usually computed locally, to be summed across all vnodes
Returns
out on exit; the list of values summed across all vnodes

Implemented in Jpetra.SerialComm, and Jpetra.CcjComm.

int [] Jpetra.Comm.minAll ( int[]  partialMins)

Takes a list of values form all vnodes in the communicator, computes the min, and returns the min to all vnodes.

Parameters
partialMinsin on entry; the list of values, usually computed locally, to be summed across all vnodes
Returns
out on exit; the list of values summed across all vnodes

Implemented in Jpetra.CcjComm, and Jpetra.SerialComm.

Serializable Jpetra.Comm.receive ( int  senderId)

getReceives does all the work receiving all expected messages at once and then returns them. Note: this IS a blocking operation.

return the objects received

Implemented in Jpetra.CcjComm, and Jpetra.SerialComm.

double [] Jpetra.Comm.scanSums ( double[]  myElements)

Takes a list of values from all vnodes in the communicator, computes the scan sum, and returns it to all vnodes such that vnode i contains the sum of values from vnodes up to and including vnode i.

Parameters
myElementsin on entry; the values to be summed across all vnodes
Returns
out on exit; the list of values summed across vnodes 0 through i

Implemented in Jpetra.CcjComm, and Jpetra.SerialComm.

int [] Jpetra.Comm.scanSums ( int[]  myElements)

Takes a list of values from all vnodes in the communicator, computes the scan sum, and returns it to all vnodes such that vnode i contains the sum of values from vnodes up to and including vnode i.

Parameters
myElementsin on entry; the values to be summed across all vnodes
Returns
out on exit; the list of values summed across vnodes 0 through i

Implemented in Jpetra.CcjComm, and Jpetra.SerialComm.

void Jpetra.Comm.send ( int[]  exportObject,
int  destinationVnode 
)

Sends an int arry to a single specified vnode. Note: this is NOT a blocking operation.

Parameters
exportObjectthe int array to be sent
destinationVnodethe vnode ID of the receiving vnode

Implemented in Jpetra.CcjComm, and Jpetra.SerialComm.

void Jpetra.Comm.send ( double[]  exportObject,
int  destinationVnode 
)

Sends a double arry to a single specified vnode. Note: this is NOT a blocking operation.

Parameters
exportObjectthe double array to be sent
destinationVnodethe vnode ID of the receiving vnode

Implemented in Jpetra.CcjComm, and Jpetra.SerialComm.

void Jpetra.Comm.send ( Serializable  exportObject,
int  destinationVnode 
)

Sends a Serializable arry to a single specified vnode. Note: this is NOT a blocking operation.

Parameters
exportObjectthe Serializable array to be sent
destinationVnodethe vnode ID of the receiving vnode

Implemented in Jpetra.CcjComm, and Jpetra.SerialComm.

void Jpetra.Comm.setMyVnodeID ( int  newVnodeID)

Sets the vnode ID for the calling vnode. Can be used to facilitate threaded programming acroass an MPI application by associating several MPI vnodes with a single vnode. By default, each MPI vnode is associated with a single vnode wit the same ID.

Parameters
newVnodeIDnew vnode ID

Implemented in Jpetra.CcjComm, and Jpetra.SerialComm.

double [] Jpetra.Comm.sumAll ( double[]  partialSums)

Takes a list of values from all vnodes in the communicator, computes the sum, and returns the sum to all vnodes.

Parameters
partialSumsin on entry; the list of values, usually computed locally, to be summed across all vnodes
Returns
out on exit; the list of values summed across all vnodes

Implemented in Jpetra.SerialComm, and Jpetra.CcjComm.

int [] Jpetra.Comm.sumAll ( int[]  partialSums)

Takes a list of values from all vnodes in the communicator, computes the sum, and returns the sum to all vnodes.

Parameters
partialSumsin on entry; the list of values, usually computed locally, to be summed across all vnodes
Returns
out on exit; the list of values summed across all vnodes

Implemented in Jpetra.SerialComm, and Jpetra.CcjComm.


The documentation for this interface was generated from the following file: