OPAL (Object Oriented Parallel Accelerator Library) 2022.1
OPAL
|
#include <ManyMasterSplit.h>
Public Member Functions | |
ManyMasterSplit (CmdArguments_t args, MPI_Comm comm=MPI_COMM_WORLD) | |
virtual | ~ManyMasterSplit () |
virtual void | split () |
virtual int | getNrWorkerGroups () const |
Get number of worker groups. More... | |
Private Member Functions | |
void | parseArguments () |
Private Attributes | |
size_t | num_masters_ |
size_t | num_coworkers_worker_ |
Additional Inherited Members | |
Protected Member Functions inherited from SplitStrategy | |
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 inherited from SplitStrategy | |
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... | |
A very simple splitting strategy where we have a one core optimizer and pilot (and k of those "islands") and many-core worker groups. The number of islands and co-workers is retrieved from the passed command line arguments:
Definition at line 22 of file ManyMasterSplit.h.
|
inline |
Definition at line 26 of file ManyMasterSplit.h.
|
inlinevirtual |
Definition at line 31 of file ManyMasterSplit.h.
|
inlinevirtual |
Get number of worker groups.
Implements SplitStrategy.
Definition at line 97 of file ManyMasterSplit.h.
References ManyMasterSplit< TopoDiscoveryStrategy >::num_coworkers_worker_, ManyMasterSplit< TopoDiscoveryStrategy >::num_masters_, and SplitStrategy::num_procs_.
|
inlineprivate |
Definition at line 106 of file ManyMasterSplit.h.
References SplitStrategy::cmd_args_, Physics::e, endl(), SplitStrategy::getComm(), ManyMasterSplit< TopoDiscoveryStrategy >::num_coworkers_worker_, ManyMasterSplit< TopoDiscoveryStrategy >::num_masters_, and SplitStrategy::num_procs_.
Referenced by ManyMasterSplit< TopoDiscoveryStrategy >::split().
|
inlinevirtual |
Forcing concrete implementation to split and assign poller, optimizer and worker nodes.
Implements SplitStrategy.
Definition at line 35 of file ManyMasterSplit.h.
References SplitStrategy::colorings_, SplitStrategy::group_id_, SplitStrategy::leader_, ManyMasterSplit< TopoDiscoveryStrategy >::num_coworkers_worker_, ManyMasterSplit< TopoDiscoveryStrategy >::num_masters_, SplitStrategy::num_procs_, OPTIMIZER, ManyMasterSplit< TopoDiscoveryStrategy >::parseArguments(), POLLER, SplitStrategy::poller_, SplitStrategy::rank_, SplitStrategy::role_, and WORKER.
|
private |
Definition at line 104 of file ManyMasterSplit.h.
Referenced by ManyMasterSplit< TopoDiscoveryStrategy >::getNrWorkerGroups(), ManyMasterSplit< TopoDiscoveryStrategy >::parseArguments(), and ManyMasterSplit< TopoDiscoveryStrategy >::split().
|
private |
Definition at line 103 of file ManyMasterSplit.h.
Referenced by ManyMasterSplit< TopoDiscoveryStrategy >::getNrWorkerGroups(), ManyMasterSplit< TopoDiscoveryStrategy >::parseArguments(), and ManyMasterSplit< TopoDiscoveryStrategy >::split().