SST 15.0
Structural Simulation Toolkit
rrobin.h
1// Copyright 2009-2025 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-2025, 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/eli/elementinfo.h"
15#include "sst/core/sstpart.h"
16
17namespace SST::IMPL::Partition {
18
19class SSTRoundRobinPartition : public SST::Partition::SSTPartitioner
20{
21
22public:
23 SST_ELI_REGISTER_PARTITIONER(
24 SSTRoundRobinPartition,
25 "sst",
26 "roundrobin",
27 SST_ELI_ELEMENT_VERSION(1,0,0),
28 "Partitions components using a simple round robin scheme based on ComponentID. "
29 "Sequential IDs will be placed on different ranks.")
30
31private:
32 RankInfo world_size;
33
34public:
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} // namespace SST::IMPL::Partition
48
49#endif // SST_CORE_IMPL_PARTITONERS_RROBIN_H
void performPartition(PartitionGraph *graph) override
Performs a partition of an SST simulation configuration.
Definition rrobin.cc:27
Definition configGraph.h:692
Base class for Partitioning graphs.
Definition sstpart.h:32
Definition rankInfo.h:24