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

Public Member Functions

 CcjComm (String filePath)
 
boolean isSerial ()
 
int getVnodeId ()
 
int getNumVnodes ()
 
void barrier ()
 
void threadBarrier ()
 
Serializable broadcast (Serializable value, int root)
 
int broadcast (int value, int root)
 
double broadcast (double value, int root)
 
Serializable[] gatherAll (Serializable[] myElements)
 
int[] gatherAll (int[] myElements)
 
int[][] gatherAll2dArray (int[] myElements)
 
double[] gatherAll (double[] 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 minAll (Serializable partialMins)
 
double[] minAll (double[] partialMins)
 
int[] minAll (int[] partialMins)
 
double[] scanSums (double[] myElements)
 
int[] scanSums (int[] myElements)
 
int getVnodeID ()
 
void setMyVnodeID (int newVnodeID)
 
Distributor createDistributor ()
 
CcjLink getCcjLink ()
 
String getGroupName ()
 
Directory createDirectory (VectorSpace vectorSpace)
 
void send (double[] exportObject, int destinationVnode)
 
void send (int[] exportObject, int destinationVnode)
 
void send (Serializable exportObject, int destinationVnode)
 
void setupReceives (int numReceives)
 
Serializable receive (int senderId)
 
int[] scatter2dArray (int[][] in)
 
int[] scatterIntArray (int[] in)
 
int[][] gather (int[] in)
 
Serializable[][] gather (Serializable[] in)
 
Serializable maxAll (Serializable in)
 
String getMyHostName ()
 
- Public Member Functions inherited from Jpetra.JpetraObject
 JpetraObject ()
 
void initializeOutput ()
 

Additional Inherited Members

- Static Public Member Functions inherited from Jpetra.JpetraObject
static void setRootPrint (String key, boolean rootPrint)
 
static void setRootStream (String key, PrintStream rootStream)
 
static void setVnodesPrint (String key, boolean vnodesPrint)
 
static void setVnodesStream (String key, PrintStream vnodesStream)
 
static void print (String key, String message)
 
static void println (String key, String message)
 
static void setAmIroot (Comm comm)
 
- Static Public Attributes inherited from Jpetra.JpetraObject
static HashMap outputStreams = new HashMap(4)
 
static boolean amIroot
 

Detailed Description

CcjComm is the implementatin of the Comm interface for vnodes running in a parallel environment. It utilizes the Collective Communication (CCJ) API for MPI like message passing.

To use CcjComm first an instance of CcjComm needs to be created. A the path and file name of a ccjhosts file needs to be passed to the CcjComm contructor. The format of this file is one IP or host name and port per line, seperated by a colon (:). Note that the port number is optional.

Example ccjhosts file:

 // comments begining with /
 # and # are allowed; blank lines are also ok
 //root vnode
 192.168.1.8
 //slave vnodes
 192.168.1.8:1
 192.168.1.8:24
 sun1
 sun2
 //do not put comments on a host line: 192.168.1.5 // root  <== this comment will break things!
 

Each vnode needs to be able to access the ccjhosts file. This could entail copying the file to the same path on each physical node, or a shared file system could be used.

Adapted from SerialComm by Mike Heroux and Michael William Boldt.

Author
Jason Cross

Constructor & Destructor Documentation

Jpetra.CcjComm.CcjComm ( String  filePath)
inline

Creates new CcjComm

Member Function Documentation

void Jpetra.CcjComm.barrier ( )
inline

Makes each CCJ vnode wait until all CCJ vnodes are ready.

Implements Jpetra.Comm.

Serializable Jpetra.CcjComm.broadcast ( Serializable  value,
int  root 
)
inline

Wrapper to CCJ broadcast.

Implements Jpetra.Comm.

int Jpetra.CcjComm.broadcast ( int  value,
int  root 
)
inline

Wrapper to CCJ broadcast.

Implements Jpetra.Comm.

References Jpetra.CcjSupport.CcjLink.broadcast().

double Jpetra.CcjComm.broadcast ( double  value,
int  root 
)
inline

Wrapper to CCJ broadcast.

Implements Jpetra.Comm.

References Jpetra.CcjSupport.CcjLink.broadcast().

Serializable [] Jpetra.CcjComm.gatherAll ( Serializable[]  myElements)
inline

Wrapper to CCJ gatherAll.

Implements Jpetra.Comm.

int [] Jpetra.CcjComm.gatherAll ( int[]  myElements)
inline

Wrapper to CCJ gatherAll.

Implements Jpetra.Comm.

double [] Jpetra.CcjComm.gatherAll ( double[]  myElements)
inline

Wrapper to CCJ gatherAll.

Implements Jpetra.Comm.

int [] Jpetra.CcjComm.gatherAll ( int  myInt)
inline

Wrapper to CCJ gatherAll.

Implements Jpetra.Comm.

double [] Jpetra.CcjComm.gatherAll ( double  myDouble)
inline

Wrapper to CCJ gatherAll.

Implements Jpetra.Comm.

int Jpetra.CcjComm.getNumVnodes ( )
inline

Accessor for numVnodes.

Returns
numVnodes

Implements Jpetra.Comm.

int Jpetra.CcjComm.getVnodeId ( )
inline

Accessor for myVnode.

Returns
myVnode

Implements Jpetra.Comm.

int Jpetra.CcjComm.getVnodeID ( )
inline

Accessor for myVnode.

Returns
myVnode
boolean Jpetra.CcjComm.isSerial ( )
inline

Accessor for isSerial.

Returns
isSerial

Implements Jpetra.Comm.

double [] Jpetra.CcjComm.maxAll ( double[]  partialMaxs)
inline

Wrapper to CcjLink maxAll.

Implements Jpetra.Comm.

int [] Jpetra.CcjComm.maxAll ( int[]  partialMaxs)
inline

Wrapper to CcjLink maxAll.

Implements Jpetra.Comm.

Serializable Jpetra.CcjComm.minAll ( Serializable  partialMins)
inline

Wrapper to CcjLink minAll.

Implements Jpetra.Comm.

double [] Jpetra.CcjComm.minAll ( double[]  partialMins)
inline

Wrapper to CcjLink minAll.

Implements Jpetra.Comm.

int [] Jpetra.CcjComm.minAll ( int[]  partialMins)
inline

Wrapper to CcjLink minAll.

Implements Jpetra.Comm.

Serializable Jpetra.CcjComm.receive ( int  senderId)
inline

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

Implements Jpetra.Comm.

double [] Jpetra.CcjComm.scanSums ( double[]  myElements)
inline

Wrapper to CcjLink scanSums.

Implements Jpetra.Comm.

int [] Jpetra.CcjComm.scanSums ( int[]  myElements)
inline

Wrapper to CcjLink scanSums.

Implements Jpetra.Comm.

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

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

Implements Jpetra.Comm.

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

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

Implements Jpetra.Comm.

void Jpetra.CcjComm.send ( Serializable  exportObject,
int  destinationVnode 
)
inline

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

Implements Jpetra.Comm.

void Jpetra.CcjComm.setMyVnodeID ( int  newVnodeID)
inline

Sets the vnode ID. The ID is also the rank, do not change this unless you know exaclty what you are doing.

Parameters
newVnodeIDnew proccess ID/rank

Implements Jpetra.Comm.

double [] Jpetra.CcjComm.sumAll ( double[]  partialSums)
inline

Wrapper to CcjLink sumAll.

Implements Jpetra.Comm.

int [] Jpetra.CcjComm.sumAll ( int[]  partialSums)
inline

Wrapper to CcjLink sumAll.

Implements Jpetra.Comm.

void Jpetra.CcjComm.threadBarrier ( )
inline

Makes each thread in this CCJ vnode wait until all threads in this vnode are ready. Not currently implemented.


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