SST  8.0.0
StructuralSimulationToolkit
rrobin.h
1 // Copyright 2009-2018 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-2018, 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/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  bool requiresConfigGraph() override { return false; }
44  bool spawnOnAllRanks() override { return false; }
45 
46 
47 };
48 
49 } // namespace Partition
50 } // namespace IMPL
51 } //namespace SST
52 #endif //SST_CORE_IMPL_PARTITONERS_RROBIN_H
Definition: configGraph.h:490
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:33