OPAL (Object Oriented Parallel Accelerator Library)  2.2.0
OPAL
Public Member Functions | Protected Attributes | Private Attributes | List of all members
SplitStrategy Class Referenceabstract

Defines an interface for splitter strategy implementations. More...

#include <SplitStrategy.h>

Inheritance diagram for SplitStrategy:
Inheritance graph
[legend]

Public Member Functions

 SplitStrategy (CmdArguments_t args, MPI_Comm comm=MPI_COMM_WORLD)
 
virtual ~SplitStrategy ()
 
virtual void split ()=0
 
virtual int getNrWorkerGroups () const =0
 Get number of worker groups. More...
 
MPI_Comm getComm () const
 
int getRank () const
 
int getGlobalRank () const
 
int getNP () const
 
Role_t getRole () const
 
int getLeader () const
 
int getPoller () const
 

Protected Attributes

int rank_
 
int global_rank_
 
int num_procs_
 
int group_id_
 
CmdArguments_t cmd_args_
 
Role_t role_
 
std::vector< unsigned int > colorings_
 defines comm splitting More...
 
int leader_
 every core specifies a leader (master is its own leader) More...
 
int poller_
 every core can specifies a master More...
 

Private Attributes

MPI_Comm comm_
 communicator we are splitting More...
 

Detailed Description

Defines an interface for splitter strategy implementations.

Definition at line 13 of file SplitStrategy.h.

Constructor & Destructor Documentation

SplitStrategy::SplitStrategy ( CmdArguments_t  args,
MPI_Comm  comm = MPI_COMM_WORLD 
)
inline

Definition at line 17 of file SplitStrategy.h.

References global_rank_, group_id_, num_procs_, and rank_.

virtual SplitStrategy::~SplitStrategy ( )
inlinevirtual

Definition at line 36 of file SplitStrategy.h.

Member Function Documentation

MPI_Comm SplitStrategy::getComm ( ) const
inline

Definition at line 49 of file SplitStrategy.h.

References comm_.

Referenced by ManyMasterSplit< TopoDiscoveryStrategy >::parseArguments().

int SplitStrategy::getGlobalRank ( ) const
inline

Definition at line 52 of file SplitStrategy.h.

References global_rank_.

int SplitStrategy::getLeader ( ) const
inline

Definition at line 56 of file SplitStrategy.h.

References leader_.

int SplitStrategy::getNP ( ) const
inline

Definition at line 53 of file SplitStrategy.h.

References num_procs_.

virtual int SplitStrategy::getNrWorkerGroups ( ) const
pure virtual

Get number of worker groups.

Implemented in ManyMasterSplit< TopoDiscoveryStrategy >.

int SplitStrategy::getPoller ( ) const
inline

Definition at line 57 of file SplitStrategy.h.

References poller_.

int SplitStrategy::getRank ( ) const
inline

Definition at line 51 of file SplitStrategy.h.

References rank_.

Role_t SplitStrategy::getRole ( ) const
inline

Definition at line 55 of file SplitStrategy.h.

References role_.

virtual void SplitStrategy::split ( )
pure virtual

Forcing concrete implementation to split and assign poller, optimizer and worker nodes.

Implemented in GeometricStrategy, ManyMasterSplit< TopoDiscoveryStrategy >, and RandomStrategy.

Member Data Documentation

CmdArguments_t SplitStrategy::cmd_args_
protected
std::vector<unsigned int> SplitStrategy::colorings_
protected

defines comm splitting

Definition at line 78 of file SplitStrategy.h.

Referenced by ManyMasterSplit< TopoDiscoveryStrategy >::split().

MPI_Comm SplitStrategy::comm_
private

communicator we are splitting

Definition at line 63 of file SplitStrategy.h.

Referenced by GeometricStrategy::coordinatesToPID(), getComm(), and GeometricStrategy::split().

int SplitStrategy::global_rank_
protected

Definition at line 69 of file SplitStrategy.h.

Referenced by getGlobalRank(), and SplitStrategy().

int SplitStrategy::group_id_
protected
int SplitStrategy::leader_
protected

every core specifies a leader (master is its own leader)

Definition at line 81 of file SplitStrategy.h.

Referenced by getLeader(), and ManyMasterSplit< TopoDiscoveryStrategy >::split().

int SplitStrategy::num_procs_
protected
int SplitStrategy::poller_
protected

every core can specifies a master

Definition at line 84 of file SplitStrategy.h.

Referenced by getPoller(), and ManyMasterSplit< TopoDiscoveryStrategy >::split().

int SplitStrategy::rank_
protected
Role_t SplitStrategy::role_
protected

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