EpetraExt Development
Public Member Functions
EpetraExt::ZoltanMpiComm Class Reference

EpetraExt::ZoltanMpiComm: The Epetra MPI Communication Class. More...

#include <EpetraExt_ZoltanMpiComm.h>

Inheritance diagram for EpetraExt::ZoltanMpiComm:
Inheritance graph
[legend]

List of all members.

Public Member Functions

ZoltanMpiCommoperator= (const ZoltanMpiComm &Comm)
 Assignment Operator.
 ZoltanMpiComm (MPI_Comm comm)
 ZoltanMpiComm MPI Constructor.
 ZoltanMpiComm (const ZoltanMpiComm &Comm)
 ZoltanMpiComm Copy Constructor.
Epetra_CommClone () const
 Clone method.
virtual ~ZoltanMpiComm ()
 ZoltanMpiComm Destructor.
void Barrier () const
 ZoltanMpiComm Barrier function.
int Broadcast (double *MyVals, int Count, int Root) const
 ZoltanMpiComm Broadcast function.
int Broadcast (int *MyVals, int Count, int Root) const
 ZoltanMpiComm Broadcast function.
int GatherAll (double *MyVals, double *AllVals, int Count) const
 ZoltanMpiComm All Gather function.
int GatherAll (int *MyVals, int *AllVals, int Count) const
 ZoltanMpiComm All Gather function.
int SumAll (double *PartialSums, double *GlobalSums, int Count) const
 ZoltanMpiComm Global Sum function.
int SumAll (int *PartialSums, int *GlobalSums, int Count) const
 ZoltanMpiComm Global Sum function.
int MaxAll (double *PartialMaxs, double *GlobalMaxs, int Count) const
 ZoltanMpiComm Global Max function.
int MaxAll (int *PartialMaxs, int *GlobalMaxs, int Count) const
 ZoltanMpiComm Global Max function.
int MinAll (double *PartialMins, double *GlobalMins, int Count) const
 ZoltanMpiComm Global Min function.
int MinAll (int *PartialMins, int *GlobalMins, int Count) const
 ZoltanMpiComm Global Min function.
int ScanSum (double *MyVals, double *ScanSums, int Count) const
 ZoltanMpiComm Scan Sum function.
int ScanSum (int *MyVals, int *ScanSums, int Count) const
 ZoltanMpiComm Scan Sum function.
MPI_Comm Comm () const
 Extract MPI Communicator from a Epetra_MpiComm object.
int MyPID () const
 Return my process ID.
int NumProc () const
 Returns total number of processes.
Epetra_DistributorCreateDistributor () const
 Create a distributor object.
Epetra_DirectoryCreateDirectory (const Epetra_BlockMap &Map) const
 Create a directory object for the given Epetra_BlockMap.
int GetMpiTag () const
 Acquire an MPI tag from the Epetra range of 24050-24099, increment tag.
MPI_Comm GetMpiComm () const
 Get the MPI Communicator (identical to Comm() method; used when we know we are MPI.
void Print (ostream &os) const
 Print method that implements Epetra_Object virtual Print method.
void PrintInfo (ostream &os) const
 Print method that implements Epetra_Comm virtual PrintInfo method.
int ReferenceCount () const
 Returns the reference count of MpiCommData.
const ZoltanMpiCommDataDataPtr () const
 Returns a pointer to the MpiCommData instance this MpiComm uses.

Detailed Description

EpetraExt::ZoltanMpiComm: The Epetra MPI Communication Class.

The ZoltanMpiComm class is an implementation of Epetra_Comm that encapsulates the general information and services needed for other Epetra classes to run on a parallel computer using MPI and using Zoltan comm library.

Definition at line 67 of file EpetraExt_ZoltanMpiComm.h.


Constructor & Destructor Documentation

EPETRAEXT_DEPRECATED EpetraExt::ZoltanMpiComm::ZoltanMpiComm ( MPI_Comm  comm)

ZoltanMpiComm MPI Constructor.

Creates a ZoltanMpiComm instance for use with MPI. If no specialized MPI communicator is needed, this constuctor can be called with the argument MPI_COMM_WORLD.

Definition at line 49 of file EpetraExt_ZoltanMpiComm.cpp.

EPETRAEXT_DEPRECATED EpetraExt::ZoltanMpiComm::ZoltanMpiComm ( const ZoltanMpiComm Comm)

ZoltanMpiComm Copy Constructor.

Makes an exact copy of an existing ZoltanMpiComm instance.

Definition at line 57 of file EpetraExt_ZoltanMpiComm.cpp.

EPETRAEXT_DEPRECATED EpetraExt::ZoltanMpiComm::~ZoltanMpiComm ( ) [virtual]

ZoltanMpiComm Destructor.

Completely deletes a ZoltanMpiComm object.

Warning:
Note: All objects that depend on a ZoltanMpiComm instance should be destroyed prior to calling this function.

Definition at line 179 of file EpetraExt_ZoltanMpiComm.cpp.


Member Function Documentation

Epetra_Comm* EpetraExt::ZoltanMpiComm::Clone ( ) const [inline, virtual]

Clone method.

Implements Epetra_Comm.

Definition at line 86 of file EpetraExt_ZoltanMpiComm.h.

EPETRAEXT_DEPRECATED void EpetraExt::ZoltanMpiComm::Barrier ( ) const [virtual]

ZoltanMpiComm Barrier function.

Causes each processor in the communicator to wait until all processors have arrived.

Implements Epetra_Comm.

Definition at line 66 of file EpetraExt_ZoltanMpiComm.cpp.

EPETRAEXT_DEPRECATED int EpetraExt::ZoltanMpiComm::Broadcast ( double *  MyVals,
int  Count,
int  Root 
) const [virtual]

ZoltanMpiComm Broadcast function.

Takes list of input values from the root processor and sends to all other processors.

Parameters:
ValuesInOut On entry, the root processor contains the list of values. On exit, all processors will have the same list of values. Note that values must be allocated on all processor before the broadcast.
CountIn On entry, contains the length of the list of Values.
RootIn On entry, contains the processor from which all processors will receive a copy of Values.

Implements Epetra_Comm.

Definition at line 71 of file EpetraExt_ZoltanMpiComm.cpp.

EPETRAEXT_DEPRECATED int EpetraExt::ZoltanMpiComm::Broadcast ( int *  MyVals,
int  Count,
int  Root 
) const [virtual]

ZoltanMpiComm Broadcast function.

Take list of input values from the root processor and sends to all other processors.

Parameters:
ValuesInOut On entry, the root processor contains the list of values. On exit, all processors will have the same list of values. Note that values must be allocated on all processor before the broadcast.
CountIn On entry, contains the length of the list of Values.
RootIn On entry, contains the processor from which all processors will receive a copy of Values.

Implements Epetra_Comm.

Definition at line 78 of file EpetraExt_ZoltanMpiComm.cpp.

EPETRAEXT_DEPRECATED int EpetraExt::ZoltanMpiComm::GatherAll ( double *  MyVals,
double *  AllVals,
int  Count 
) const [virtual]

ZoltanMpiComm All Gather function.

Take list of input values from all processors in the communicator and creates an ordered contiguous list of those values on each processor.

Parameters:
MyValsIn On entry, contains the list of values, to be sent to all processors.
AllValsOut On exit, contains the list of values from all processors. Must by of size NumProc*Count.
CountIn On entry, contains the length of the list of MyVals.

Implements Epetra_Comm.

Definition at line 85 of file EpetraExt_ZoltanMpiComm.cpp.

EPETRAEXT_DEPRECATED int EpetraExt::ZoltanMpiComm::GatherAll ( int *  MyVals,
int *  AllVals,
int  Count 
) const [virtual]

ZoltanMpiComm All Gather function.

Take list of input values from all processors in the communicator and creates an ordered contiguous list of those values on each processor.

Parameters:
MyValsIn On entry, contains the list of values, to be sent to all processors.
AllValsOut On exit, contains the list of values from all processors. Must by of size NumProc*Count.
CountIn On entry, contains the length of the list of MyVals.

Implements Epetra_Comm.

Definition at line 93 of file EpetraExt_ZoltanMpiComm.cpp.

EPETRAEXT_DEPRECATED int EpetraExt::ZoltanMpiComm::SumAll ( double *  PartialSums,
double *  GlobalSums,
int  Count 
) const [virtual]

ZoltanMpiComm Global Sum function.

Take list of input values from all processors in the communicator, computes the sum and returns the sum to all processors.

Parameters:
PartialSumsIn On entry, contains the list of values, usually partial sums computed locally, to be summed across all processors.
GlobalSumsOut On exit, contains the list of values summed across all processors.
CountIn On entry, contains the length of the list of values.

Implements Epetra_Comm.

Definition at line 101 of file EpetraExt_ZoltanMpiComm.cpp.

EPETRAEXT_DEPRECATED int EpetraExt::ZoltanMpiComm::SumAll ( int *  PartialSums,
int *  GlobalSums,
int  Count 
) const [virtual]

ZoltanMpiComm Global Sum function.

Take list of input values from all processors in the communicator, computes the sum and returns the sum to all processors.

Parameters:
PartialSumsIn On entry, contains the list of values, usually partial sums computed locally, to be summed across all processors.
GlobalSumsOut On exit, contains the list of values summed across all processors.
CountIn On entry, contains the length of the list of values.

Implements Epetra_Comm.

Definition at line 109 of file EpetraExt_ZoltanMpiComm.cpp.

EPETRAEXT_DEPRECATED int EpetraExt::ZoltanMpiComm::MaxAll ( double *  PartialMaxs,
double *  GlobalMaxs,
int  Count 
) const [virtual]

ZoltanMpiComm Global Max function.

Take list of input values from all processors in the communicator, computes the max and returns the max to all processors.

Parameters:
PartialMaxsIn On entry, contains the list of values, usually partial maxs computed locally; using these Partial Maxs, the max across all processors will be computed.
GlobalMaxsOut On exit, contains the list of maxs computed across all processors.
CountIn On entry, contains the length of the list of values.

Implements Epetra_Comm.

Definition at line 117 of file EpetraExt_ZoltanMpiComm.cpp.

EPETRAEXT_DEPRECATED int EpetraExt::ZoltanMpiComm::MaxAll ( int *  PartialMaxs,
int *  GlobalMaxs,
int  Count 
) const [virtual]

ZoltanMpiComm Global Max function.

Take list of input values from all processors in the communicator, computes the max and returns the max to all processors.

Parameters:
PartialMaxsIn On entry, contains the list of values, usually partial maxs computed locally; using these Partial Maxs, the max across all processors will be computed.
GlobalMaxsOut On exit, contains the list of maxs computed across all processors.
CountIn On entry, contains the length of the list of values.

Implements Epetra_Comm.

Definition at line 125 of file EpetraExt_ZoltanMpiComm.cpp.

EPETRAEXT_DEPRECATED int EpetraExt::ZoltanMpiComm::MinAll ( double *  PartialMins,
double *  GlobalMins,
int  Count 
) const [virtual]

ZoltanMpiComm Global Min function.

Take list of input values from all processors in the communicator, computes the min and returns the min to all processors.

Parameters:
PartialMinsIn On entry, contains the list of values, usually partial mins computed locally; using these Partial Mins, the min across all processors will be computed.
GlobalMinsOut On exit, contains the list of mins computed across all processors.
CountIn On entry, contains the length of the list of values.

Implements Epetra_Comm.

Definition at line 133 of file EpetraExt_ZoltanMpiComm.cpp.

EPETRAEXT_DEPRECATED int EpetraExt::ZoltanMpiComm::MinAll ( int *  PartialMins,
int *  GlobalMins,
int  Count 
) const [virtual]

ZoltanMpiComm Global Min function.

Take list of input values from all processors in the communicator, computes the min and returns the min to all processors.

Parameters:
PartialMinsIn On entry, contains the list of values, usually partial mins computed locally; using these Partial Mins, the min across all processors will be computed.
GlobalMinsOut On exit, contains the list of mins computed across all processors.
CountIn On entry, contains the length of the list of values.

Implements Epetra_Comm.

Definition at line 141 of file EpetraExt_ZoltanMpiComm.cpp.

EPETRAEXT_DEPRECATED int EpetraExt::ZoltanMpiComm::ScanSum ( double *  MyVals,
double *  ScanSums,
int  Count 
) const [virtual]

ZoltanMpiComm Scan Sum function.

Take list of input values from all processors in the communicator, computes the scan sum and returns it to all processors such that processor i contains the sum of values from processor 0 up to and including processor i.

Parameters:
MyValsIn On entry, contains the list of values to be summed across all processors.
ScanSumsOut On exit, contains the list of values summed across processors 0 through i.
CountIn On entry, contains the length of the list of values.

Implements Epetra_Comm.

Definition at line 149 of file EpetraExt_ZoltanMpiComm.cpp.

EPETRAEXT_DEPRECATED int EpetraExt::ZoltanMpiComm::ScanSum ( int *  MyVals,
int *  ScanSums,
int  Count 
) const [virtual]

ZoltanMpiComm Scan Sum function.

Take list of input values from all processors in the communicator, computes the scan sum and returns it to all processors such that processor i contains the sum of values from processor 0 up to and including processor i.

Parameters:
MyValsIn On entry, contains the list of values to be summed across all processors.
ScanSumsOut On exit, contains the list of values summed across processors 0 through i.
CountIn On entry, contains the length of the list of values.

Implements Epetra_Comm.

Definition at line 157 of file EpetraExt_ZoltanMpiComm.cpp.

MPI_Comm EpetraExt::ZoltanMpiComm::Comm ( ) const [inline]

Extract MPI Communicator from a Epetra_MpiComm object.

Definition at line 281 of file EpetraExt_ZoltanMpiComm.h.

int EpetraExt::ZoltanMpiComm::MyPID ( ) const [inline, virtual]

Return my process ID.

In MPI mode returns the rank of the calling process. In serial mode returns 0.

Implements Epetra_Comm.

Definition at line 287 of file EpetraExt_ZoltanMpiComm.h.

int EpetraExt::ZoltanMpiComm::NumProc ( ) const [inline, virtual]

Returns total number of processes.

In MPI mode returns the size of the MPI communicator. In serial mode returns 1.

Implements Epetra_Comm.

Definition at line 293 of file EpetraExt_ZoltanMpiComm.h.

EPETRAEXT_DEPRECATED Epetra_Distributor * EpetraExt::ZoltanMpiComm::CreateDistributor ( ) const [virtual]

Create a distributor object.

Implements Epetra_Comm.

Definition at line 165 of file EpetraExt_ZoltanMpiComm.cpp.

EPETRAEXT_DEPRECATED Epetra_Directory * EpetraExt::ZoltanMpiComm::CreateDirectory ( const Epetra_BlockMap Map) const [virtual]

Create a directory object for the given Epetra_BlockMap.

Implements Epetra_Comm.

Definition at line 172 of file EpetraExt_ZoltanMpiComm.cpp.

int EpetraExt::ZoltanMpiComm::GetMpiTag ( ) const [inline]

Acquire an MPI tag from the Epetra range of 24050-24099, increment tag.

Definition at line 305 of file EpetraExt_ZoltanMpiComm.h.

MPI_Comm EpetraExt::ZoltanMpiComm::GetMpiComm ( ) const [inline]

Get the MPI Communicator (identical to Comm() method; used when we know we are MPI.

Definition at line 308 of file EpetraExt_ZoltanMpiComm.h.

void EpetraExt::ZoltanMpiComm::Print ( ostream &  os) const [inline, virtual]

Print method that implements Epetra_Object virtual Print method.

Reimplemented from Epetra_Object.

Definition at line 312 of file EpetraExt_ZoltanMpiComm.h.

void EpetraExt::ZoltanMpiComm::PrintInfo ( ostream &  os) const [inline, virtual]

Print method that implements Epetra_Comm virtual PrintInfo method.

Implements Epetra_Comm.

Definition at line 316 of file EpetraExt_ZoltanMpiComm.h.

int EpetraExt::ZoltanMpiComm::ReferenceCount ( ) const [inline]

Returns the reference count of MpiCommData.

(Intended for testing purposes.)

Definition at line 323 of file EpetraExt_ZoltanMpiComm.h.

const ZoltanMpiCommData* EpetraExt::ZoltanMpiComm::DataPtr ( ) const [inline]

Returns a pointer to the MpiCommData instance this MpiComm uses.

(Intended for developer use only for testing purposes.)

Definition at line 327 of file EpetraExt_ZoltanMpiComm.h.

EPETRAEXT_DEPRECATED ZoltanMpiComm & EpetraExt::ZoltanMpiComm::operator= ( const ZoltanMpiComm Comm)

Assignment Operator.

Definition at line 195 of file EpetraExt_ZoltanMpiComm.cpp.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines