SST  9.0.0
StructuralSimulationToolkit
singlepart.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 
12 
13 #ifndef SST_CORE_IMPL_PARTITONERS_SINGLEPART_H
14 #define SST_CORE_IMPL_PARTITONERS_SINGLEPART_H
15 
16 #include <sst/core/sstpart.h>
17 #include <sst/core/eli/elementinfo.h>
18 
19 namespace SST {
20 namespace IMPL {
21 namespace Partition {
22 
23 
24 
25 /**
26  Single partitioner is a virtual partitioner used for serial jobs.
27  It simply ensures that all components are assigned to rank 0.
28 */
30 
31 public:
34  "sst",
35  "single",
36  SST_ELI_ELEMENT_VERSION(1,0,0),
37  "Allocates all components to rank 0. Automatically selected for serial jobs.")
38 
39  /**
40  Creates a new single partition scheme.
41  */
42  SSTSinglePartition(RankInfo total_ranks, RankInfo my_rank, int verbosity);
43 
44  /**
45  Performs a partition of an SST simulation configuration
46  \param graph The simulation configuration to partition
47  */
48  void performPartition(PartitionGraph* graph) override;
49 
50  void performPartition(ConfigGraph* graph) override {
52  }
53 
54  bool requiresConfigGraph() override { return false; }
55  bool spawnOnAllRanks() override { return false; }
56 
57 
58 };
59 
60 }
61 }
62 }
63 
64 #endif
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(PartitionGraph *graph) override
Performs a partition of an SST simulation configuration.
Definition: singlepart.cc:26
void performPartition(ConfigGraph *graph) override
Function to be overridden by subclasses.
Definition: singlepart.h:50
Definition: rankInfo.h:21
Base class for Partitioning graphs.
Definition: sstpart.h:32
Single partitioner is a virtual partitioner used for serial jobs.
Definition: singlepart.h:29
SST_ELI_REGISTER_PARTITIONER(SSTSinglePartition,"sst","single", SST_ELI_ELEMENT_VERSION(1, 0, 0),"Allocates all components to rank 0. Automatically selected for serial jobs.") SSTSinglePartition(RankInfo total_ranks
Creates a new single partition scheme.