SST  7.2.0
StructuralSimulationToolkit
rrobin.h
1 // Copyright 2009-2017 Sandia Corporation. Under the terms
2 // of Contract DE-NA0003525 with Sandia Corporation, the U.S.
3 // Government retains certain rights in this software.
4 //
5 // Copyright (c) 2009-2017, Sandia Corporation
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_PART_RROBIN_H
12 #define SST_CORE_PART_RROBIN_H
13 
14 #include <sst/core/part/sstpart.h>
15 #include <sst/core/elementinfo.h>
16 
17 namespace SST {
18 namespace Partition {
19 
21 
22 public:
23  SST_ELI_REGISTER_PARTITIONER(
25  "sst",
26  "roundrobin",
27  SST_ELI_ELEMENT_VERSION(1,0,0),
28  "Partitions components using a simple round robin scheme based on ComponentID. Sequential IDs will be placed on different ranks.")
29 
30 private:
31  RankInfo world_size;
32 
33 public:
34  SSTRoundRobinPartition(RankInfo world_size, RankInfo my_rank, int verbosity);
35 
36  /**
37  Performs a partition of an SST simulation configuration
38  \param graph The simulation configuration to partition
39  */
40  void performPartition(PartitionGraph* graph) override;
41 
42  bool requiresConfigGraph() override { return false; }
43  bool spawnOnAllRanks() override { return false; }
44 
45 
46 };
47 
48 } // namespace Partition
49 } //namespace SST
50 #endif //SST_CORE_PART_RROBIN_H
Definition: configGraph.h:490
Definition: action.cc:17
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