SST  14.0.0
StructuralSimulationToolkit
rrobin.h
1 // Copyright 2009-2024 NTESS. Under the terms
2 // of Contract DE-NA0003525 with NTESS, the U.S.
3 // Government retains certain rights in this software.
4 //
5 // Copyright (c) 2009-2024, NTESS
6 // All rights reserved.
7 //
8 // This file is part of the SST software package. For license
9 // information, see the LICENSE file in the top level directory of the
10 // distribution.
11 #ifndef SST_CORE_IMPL_PARTITONERS_RROBIN_H
12 #define SST_CORE_IMPL_PARTITONERS_RROBIN_H
13 
14 #include "sst/core/eli/elementinfo.h"
15 #include "sst/core/sstpart.h"
16 
17 namespace SST {
18 namespace IMPL {
19 namespace Partition {
20 
22 {
23 
24 public:
25  SST_ELI_REGISTER_PARTITIONER(
27  "sst",
28  "roundrobin",
29  SST_ELI_ELEMENT_VERSION(1,0,0),
30  "Partitions components using a simple round robin scheme based on ComponentID. "
31  "Sequential IDs will be placed on different ranks.")
32 
33 private:
34  RankInfo world_size;
35 
36 public:
37  SSTRoundRobinPartition(RankInfo world_size, RankInfo my_rank, int verbosity);
38 
39  /**
40  Performs a partition of an SST simulation configuration
41  \param graph The simulation configuration to partition
42  */
43  void performPartition(PartitionGraph* graph) override;
44 
45  bool requiresConfigGraph() override { return false; }
46  bool spawnOnAllRanks() override { return false; }
47 };
48 
49 } // namespace Partition
50 } // namespace IMPL
51 } // namespace SST
52 #endif // SST_CORE_IMPL_PARTITONERS_RROBIN_H
Definition: configGraph.h:618
Definition: action.cc:18
Definition: rankInfo.h:21
Base class for Partitioning graphs.
Definition: sstpart.h:31
void performPartition(PartitionGraph *graph) override
Performs a partition of an SST simulation configuration.
Definition: rrobin.cc:31