OPAL (Object Oriented Parallel Accelerator Library) 2022.1
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::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_.

◆ ~SplitStrategy()

virtual SplitStrategy::~SplitStrategy ( )
inlinevirtual

Definition at line 36 of file SplitStrategy.h.

Member Function Documentation

◆ getComm()

MPI_Comm SplitStrategy::getComm ( ) const
inline

Definition at line 49 of file SplitStrategy.h.

References comm_.

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

◆ getGlobalRank()

int SplitStrategy::getGlobalRank ( ) const
inline

Definition at line 52 of file SplitStrategy.h.

References global_rank_.

◆ getLeader()

int SplitStrategy::getLeader ( ) const
inline

Definition at line 56 of file SplitStrategy.h.

References leader_.

◆ getNP()

int SplitStrategy::getNP ( ) const
inline

Definition at line 53 of file SplitStrategy.h.

References num_procs_.

◆ getNrWorkerGroups()

virtual int SplitStrategy::getNrWorkerGroups ( ) const
pure virtual

Get number of worker groups.

Implemented in ManyMasterSplit< TopoDiscoveryStrategy >.

◆ getPoller()

int SplitStrategy::getPoller ( ) const
inline

Definition at line 57 of file SplitStrategy.h.

References poller_.

◆ getRank()

int SplitStrategy::getRank ( ) const
inline

Definition at line 51 of file SplitStrategy.h.

References rank_.

◆ getRole()

Role_t SplitStrategy::getRole ( ) const
inline

Definition at line 55 of file SplitStrategy.h.

References role_.

◆ split()

virtual void SplitStrategy::split ( )
pure virtual

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

Implemented in ManyMasterSplit< TopoDiscoveryStrategy >.

Member Data Documentation

◆ cmd_args_

CmdArguments_t SplitStrategy::cmd_args_
protected

◆ colorings_

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

defines comm splitting

Definition at line 78 of file SplitStrategy.h.

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

◆ comm_

MPI_Comm SplitStrategy::comm_
private

communicator we are splitting

Definition at line 63 of file SplitStrategy.h.

Referenced by getComm().

◆ global_rank_

int SplitStrategy::global_rank_
protected

Definition at line 69 of file SplitStrategy.h.

Referenced by getGlobalRank(), and SplitStrategy().

◆ group_id_

int SplitStrategy::group_id_
protected

◆ leader_

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().

◆ num_procs_

int SplitStrategy::num_procs_
protected

◆ poller_

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().

◆ rank_

int SplitStrategy::rank_
protected

◆ role_

Role_t SplitStrategy::role_
protected

Definition at line 75 of file SplitStrategy.h.

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


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