SST  7.0.0
StructuralSimulationToolkit
linpart.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_LINEAR
14 #define SST_CORE_PART_LINEAR
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 
24 class Output;
25 
26 namespace Partition {
27 
28 
29 
30 /**
31 Performs a linear partition scheme of an SST simulation configuration. In this
32 scheme a list of components (supplied as a graph) are grouped by slicing the list
33 into approximately equal parts. A "part" is generated for each MPI rank performing
34 the simulation. This means Components with sequential ids will be placed close together.
35 In general this scheme provides a very effective partition for most parallel
36 simulations which generate man similar components of interest close together in the input
37 Python configuration. It is also very fast to compute a linear partiton scheme. For
38 more aggressive partition schemes users should try either a simple or Zoltan-based
39 partitioner.
40 */
42 
43 protected:
44  /** Number of ranks in the simulation */
46  /** Output object to print partitioning information */
48 
49 public:
50  /**
51  Creates a new linear partition scheme.
52  \param mpiRankCount Number of MPI ranks in the simulation
53  \param verbosity The level of information to output
54  */
55  SSTLinearPartition(RankInfo rankCount, RankInfo my_rank, int verbosity);
56 
57  /**
58  Performs a partition of an SST simulation configuration
59  \param graph The simulation configuration to partition
60  */
61  void performPartition(PartitionGraph* graph) override;
62 
63  bool requiresConfigGraph() override { return false; }
64  bool spawnOnAllRanks() override { return false; }
65 
66  // static SSTPartitioner* allocate(RankInfo total_ranks, RankInfo my_rank, int verbosity) {
67  // return new SSTLinearPartition(total_ranks, my_rank, verbosity);
68  // }
69 
70  SST_ELI_REGISTER_PARTITIONER(SSTLinearPartition,"sst","linear","Partitions components by dividing Component ID space into roughly equal portions. Components with sequential IDs will be placed close together.")
71 
72  SST_ELI_DOCUMENT_VERSION(1,0,0)
73 };
74 
75 }
76 }
77 
78 #endif
Output object provides consistant method for outputing data to stdout, stderr and/or sst debug file...
Definition: output.h:54
Output * partOutput
Output object to print partitioning information.
Definition: linpart.h:47
Definition: configGraph.h:530
Definition: element.h:31
Definition: action.cc:17
Performs a linear partition scheme of an SST simulation configuration.
Definition: linpart.h:41
Definition: rankInfo.h:21
Base class for Partitioning graphs.
Definition: sstpart.h:31
RankInfo rankcount
Number of ranks in the simulation.
Definition: linpart.h:45