Skip to content

Commit

Permalink
remove old rebalancer
Browse files Browse the repository at this point in the history
  • Loading branch information
N-Maas committed Sep 11, 2023
1 parent 8810fa5 commit facb8be
Show file tree
Hide file tree
Showing 20 changed files with 14 additions and 608 deletions.
2 changes: 1 addition & 1 deletion config/default_preset.ini
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ i-r-fm-iter-moves-on-recalc=true
# main -> initial_partitioning -> refinement -> flows
i-r-flow-algo=do_nothing
# main -> refinement
r-rebalancer-type=simple_rebalancer
r-rebalancer-type=rebalancer
r-refine-until-no-improvement=false
# main -> refinement -> label_propagation
r-lp-type=label_propagation
Expand Down
2 changes: 1 addition & 1 deletion config/deterministic_preset.ini
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ i-fm-refinement-rounds=3
i-lp-maximum-iterations=20
i-lp-initial-block-size=5
# main -> initial_partitioning -> refinement
r-rebalancer-type=simple_rebalancer
r-rebalancer-type=rebalancer
i-r-refine-until-no-improvement=false
# main -> initial_partitioning -> refinement -> label_propagation
i-r-lp-type=deterministic
Expand Down
2 changes: 1 addition & 1 deletion config/highest_quality_preset.ini
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ i-r-use-global-fm=false
# main -> initial_partitioning -> refinement -> flows
i-r-flow-algo=do_nothing
# main -> refinement
r-rebalancer-type=simple_rebalancer
r-rebalancer-type=rebalancer
r-refine-until-no-improvement=true
r-relative-improvement-threshold=0.0025
r-max-batch-size=1000
Expand Down
2 changes: 1 addition & 1 deletion config/large_k_preset.ini
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ i-r-fm-type=do_nothing
# main -> initial_partitioning -> refinement -> flows
i-r-flow-algo=do_nothing
# main -> refinement
r-rebalancer-type=simple_rebalancer
r-rebalancer-type=rebalancer
r-refine-until-no-improvement=false
# main -> refinement -> label_propagation
r-lp-type=label_propagation
Expand Down
2 changes: 1 addition & 1 deletion config/old_configs/default_flow_preset.ini
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ i-r-fm-iter-moves-on-recalc=true
# main -> initial_partitioning -> refinement -> flows
i-r-flow-algo=do_nothing
# main -> refinement
r-rebalancer-type=simple_rebalancer
r-rebalancer-type=rebalancer
r-refine-until-no-improvement=true
r-relative-improvement-threshold=0.0025
# main -> refinement -> label_propagation
Expand Down
2 changes: 1 addition & 1 deletion config/old_configs/default_preset.ini
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ i-r-fm-iter-moves-on-recalc=true
# main -> initial_partitioning -> refinement -> flows
i-r-flow-algo=do_nothing
# main -> refinement
r-rebalancer-type=simple_rebalancer
r-rebalancer-type=rebalancer
r-refine-until-no-improvement=false
# main -> refinement -> label_propagation
r-lp-type=label_propagation
Expand Down
2 changes: 1 addition & 1 deletion config/old_configs/quality_flow_preset.ini
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ i-r-use-global-fm=false
# main -> initial_partitioning -> refinement -> flows
i-r-flow-algo=do_nothing
# main -> refinement
r-rebalancer-type=simple_rebalancer
r-rebalancer-type=rebalancer
r-refine-until-no-improvement=true
r-relative-improvement-threshold=0.0025
r-max-batch-size=1000
Expand Down
2 changes: 1 addition & 1 deletion config/old_configs/quality_preset.ini
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ i-r-flow-algo=do_nothing
# main -> initial_partitioning -> refinement -> global fm
i-r-use-global-fm=false
# main -> refinement
r-rebalancer-type=simple_rebalancer
r-rebalancer-type=rebalancer
r-refine-until-no-improvement=true
r-max-batch-size=1000
r-min-border-vertices-per-thread=50
Expand Down
2 changes: 1 addition & 1 deletion config/quality_preset.ini
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ i-r-fm-iter-moves-on-recalc=true
# main -> initial_partitioning -> refinement -> flows
i-r-flow-algo=do_nothing
# main -> refinement
r-rebalancer-type=simple_rebalancer
r-rebalancer-type=rebalancer
r-refine-until-no-improvement=true
r-relative-improvement-threshold=0.0025
# main -> refinement -> label_propagation
Expand Down
1 change: 0 additions & 1 deletion mt-kahypar/io/command_line_options.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -522,7 +522,6 @@ namespace mt_kahypar {
}
})->default_value("do_nothing"),
"Rebalancer Algorithm:\n"
"- simple_rebalancer\n"
"- rebalancer\n"
"- do_nothing");
return options;
Expand Down
8 changes: 4 additions & 4 deletions mt-kahypar/partition/context.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -540,7 +540,7 @@ namespace mt_kahypar {
initial_partitioning.refinement.flows.algorithm = FlowAlgorithm::do_nothing;

// refinement
refinement.rebalancer = RebalancingAlgorithm::simple_rebalancer;
refinement.rebalancer = RebalancingAlgorithm::rebalancer;
refinement.refine_until_no_improvement = false;

// refinement -> label propagation
Expand Down Expand Up @@ -662,7 +662,7 @@ namespace mt_kahypar {
initial_partitioning.refinement.flows.algorithm = FlowAlgorithm::do_nothing;

// refinement
refinement.rebalancer = RebalancingAlgorithm::simple_rebalancer;
refinement.rebalancer = RebalancingAlgorithm::rebalancer;
refinement.refine_until_no_improvement = false;

// refinement -> label propagation
Expand Down Expand Up @@ -764,7 +764,7 @@ namespace mt_kahypar {
initial_partitioning.refinement.global_fm.use_global_fm = false;

// refinement
refinement.rebalancer = RebalancingAlgorithm::simple_rebalancer;
refinement.rebalancer = RebalancingAlgorithm::rebalancer;
refinement.refine_until_no_improvement = true;
refinement.max_batch_size = 1000;
refinement.min_border_vertices_per_thread = 50;
Expand Down Expand Up @@ -893,7 +893,7 @@ namespace mt_kahypar {
initial_partitioning.refinement.flows.algorithm = FlowAlgorithm::do_nothing;

// refinement
refinement.rebalancer = RebalancingAlgorithm::simple_rebalancer;
refinement.rebalancer = RebalancingAlgorithm::rebalancer;
refinement.refine_until_no_improvement = false;

// refinement -> label propagation
Expand Down
5 changes: 1 addition & 4 deletions mt-kahypar/partition/context_enum_classes.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,6 @@ namespace mt_kahypar {

std::ostream & operator<< (std::ostream& os, const RebalancingAlgorithm& algo) {
switch (algo) {
case RebalancingAlgorithm::simple_rebalancer: return os << "simple_rebalancer";
case RebalancingAlgorithm::rebalancer: return os << "rebalancer";
case RebalancingAlgorithm::do_nothing: return os << "do_nothing";
// omit default case to trigger compiler warning for missing cases
Expand Down Expand Up @@ -467,9 +466,7 @@ namespace mt_kahypar {
}

RebalancingAlgorithm rebalancingAlgorithmFromString(const std::string& type) {
if (type == "simple_rebalancer") {
return RebalancingAlgorithm::simple_rebalancer;
} else if (type == "rebalancer") {
if (type == "rebalancer") {
return RebalancingAlgorithm::rebalancer;
} else if (type == "do_nothing") {
return RebalancingAlgorithm::do_nothing;
Expand Down
1 change: 0 additions & 1 deletion mt-kahypar/partition/context_enum_classes.h
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,6 @@ enum class FlowAlgorithm : uint8_t {
};

enum class RebalancingAlgorithm : uint8_t {
simple_rebalancer,
rebalancer,
do_nothing
};
Expand Down
6 changes: 0 additions & 6 deletions mt-kahypar/partition/factories.h
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@
#include "mt-kahypar/partition/refinement/gains/gain_definitions.h"
#include "mt-kahypar/partition/refinement/flows/scheduler.h"
#include "mt-kahypar/partition/refinement/flows/flow_refiner.h"
#include "mt-kahypar/partition/refinement/rebalancing/rebalancer.h"
#include "mt-kahypar/partition/refinement/rebalancing/rebalancer_v2.h"

namespace mt_kahypar {
Expand Down Expand Up @@ -126,11 +125,6 @@ using FlowSchedulerDispatcher = kahypar::meta::StaticMultiDispatchFactory<

using RebalancerFactory = kahypar::meta::Factory<RebalancingAlgorithm, IRebalancer* (*)(HypernodeID, const Context&, gain_cache_t)>;

using RebalancerDispatcher = kahypar::meta::StaticMultiDispatchFactory<
Rebalancer,
IRebalancer,
kahypar::meta::Typelist<TypeTraitsList, GainTypes>>;

using RebalancerV2Dispatcher = kahypar::meta::StaticMultiDispatchFactory<
RebalancerV2,
IRebalancer,
Expand Down
1 change: 0 additions & 1 deletion mt-kahypar/partition/refinement/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ set(RefinementSources
fm/global_rollback.cpp
fm/sequential_twoway_fm_refiner.cpp
label_propagation/label_propagation_refiner.cpp
rebalancing/rebalancer.cpp
rebalancing/rebalancer_v2.cpp
deterministic/deterministic_label_propagation.cpp
flows/refiner_adapter.cpp
Expand Down
Loading

0 comments on commit facb8be

Please sign in to comment.