SST  9.0.0
StructuralSimulationToolkit
rrobin.h
1 // Copyright 2009-2019 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-2019, 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/sstpart.h>
15 #include <sst/core/eli/elementinfo.h>
16 
17 namespace SST {
18 namespace IMPL {
19 namespace Partition {
20 
22 
23 public:
24  SST_ELI_REGISTER_PARTITIONER(
26  "sst",
27  "roundrobin",
28  SST_ELI_ELEMENT_VERSION(1,0,0),
29  "Partitions components using a simple round robin scheme based on ComponentID. Sequential IDs will be placed on different ranks.")
30 
31 private:
32  RankInfo world_size;
33 
34 public:
35  SSTRoundRobinPartition(RankInfo world_size, RankInfo my_rank, int verbosity);
36 
37  /**
38  Performs a partition of an SST simulation configuration
39  \param graph The simulation configuration to partition
40  */
41  void performPartition(PartitionGraph* graph) override;
42 
43  void performPartition(ConfigGraph* graph) override {
45  }
46 
47  bool requiresConfigGraph() override { return false; }
48  bool spawnOnAllRanks() override { return false; }
49 
50 
51 };
52 
53 } // namespace Partition
54 } // namespace IMPL
55 } //namespace SST
56 #endif //SST_CORE_IMPL_PARTITONERS_RROBIN_H
Definition: configGraph.h:494
A Configuration Graph A graph representing Components and Links.
Definition: configGraph.h:298
virtual void performPartition(PartitionGraph *UNUSED(graph))
Function to be overridden by subclasses.
Definition: sstpart.h:50
void performPartition(ConfigGraph *graph) override
Function to be overridden by subclasses.
Definition: rrobin.h:43
Definition: rankInfo.h:21
Base class for Partitioning graphs.
Definition: sstpart.h:32
void performPartition(PartitionGraph *graph) override
Performs a partition of an SST simulation configuration.
Definition: rrobin.cc:33