SST  7.0.0
StructuralSimulationToolkit
singlepart.h
1 // Copyright 2009-2017 Sandia Corporation. Under the terms
2 // of Contract DE-AC04-94AL85000 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 
12 
13 #ifndef SST_CORE_PART_SINGLE
14 #define SST_CORE_PART_SINGLE
15 
16 #include <sst/core/part/sstpart.h>
17 #include <sst/core/elementinfo.h>
18 
19 using namespace SST;
20 using namespace SST::Partition;
21 
22 namespace SST {
23 namespace Partition {
24 
25 
26 
27 /**
28  Single partitioner is a virtual partitioner used for serial jobs.
29  It simply ensures that all components are assigned to rank 0.
30 */
32 
33 public:
34  /**
35  Creates a new single partition scheme.
36  */
37  SSTSinglePartition(RankInfo total_ranks, 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  SST_ELI_REGISTER_PARTITIONER(SSTSinglePartition,"sst","single","Allocates all components to rank 0. Automatically selected for serial jobs.")
50 
51  SST_ELI_DOCUMENT_VERSION(1,0,0)
52 };
53 
54 }
55 }
56 
57 #endif
Definition: configGraph.h:530
Definition: element.h:31
Definition: action.cc:17
Definition: rankInfo.h:21
Base class for Partitioning graphs.
Definition: sstpart.h:31
Single partitioner is a virtual partitioner used for serial jobs.
Definition: singlepart.h:31