From 7d9f934f154259a50b193dcf374c585ef8b1e73c Mon Sep 17 00:00:00 2001 From: Nikolai Maas Date: Thu, 27 Jul 2023 10:59:03 +0200 Subject: [PATCH] remove some unnecessary options --- mt-kahypar/io/command_line_options.cpp | 13 ------------- mt-kahypar/partition/context.cpp | 5 ----- mt-kahypar/partition/context.h | 4 ---- .../partition/refinement/fm/multitry_kway_fm.cpp | 7 +------ 4 files changed, 1 insertion(+), 28 deletions(-) diff --git a/mt-kahypar/io/command_line_options.cpp b/mt-kahypar/io/command_line_options.cpp index 63a0819c3..2db4afd93 100644 --- a/mt-kahypar/io/command_line_options.cpp +++ b/mt-kahypar/io/command_line_options.cpp @@ -523,10 +523,6 @@ namespace mt_kahypar { po::value((initial_partitioning ? &context.initial_partitioning.refinement.fm.release_nodes : &context.refinement.fm.release_nodes))->value_name("")->default_value(true), "FM releases nodes that weren't moved, so they might be found by another search.") - ((initial_partitioning ? "i-r-fm-penalty-for-moved-rebalancing-nodes" : "r-fm-penalty-for-moved-rebalancing-nodes"), - po::value((initial_partitioning ? &context.initial_partitioning.refinement.fm.penalty_for_moved_rebalancing_nodes : - &context.refinement.fm.penalty_for_moved_rebalancing_nodes))->value_name("")->default_value(true), - "Whether a pessimistic penalty is used for moves of rebalancing nodes when estimating the imbalance penalty.") ((initial_partitioning ? "i-r-fm-threshold-border-node-inclusion" : "r-fm-threshold-border-node-inclusion"), po::value((initial_partitioning ? &context.initial_partitioning.refinement.fm.treshold_border_node_inclusion : &context.refinement.fm.treshold_border_node_inclusion))->value_name("")->default_value(0.75), @@ -539,15 +535,6 @@ namespace mt_kahypar { po::value((initial_partitioning ? &context.initial_partitioning.refinement.fm.rebalancing_use_violation_factor : &context.refinement.fm.rebalancing_use_violation_factor))->value_name("")->default_value(true), "Whether the rollback balance violation factor is also applied to rebalancing (for unconstrained FM).") - ((initial_partitioning ? "i-r-fm-insert-merged-move-at-rebalancing-position" : "r-fm-insert-merged-move-at-rebalancing-position"), - po::value((initial_partitioning ? &context.initial_partitioning.refinement.fm.insert_merged_move_at_rebalancing_position : - &context.refinement.fm.insert_merged_move_at_rebalancing_position))->value_name("")->default_value(true), - "If rebalancing may move nodes a second time and two moves are merged, determines if the merged move is inserted at the position " - "of the according rebalancing move or the original move.") - ((initial_partitioning ? "i-r-fm-update-penalty-locally-reverted" : "r-fm-update-penalty-locally-reverted"), - po::value((initial_partitioning ? &context.initial_partitioning.refinement.fm.update_penalty_locally_reverted : - &context.refinement.fm.update_penalty_locally_reverted))->value_name("")->default_value(false), - "Update penalty when local moves are reverted, so the penalty for following moves is more optimistic.") ((initial_partitioning ? "i-r-fm-unconstrained-rounds" : "r-fm-unconstrained-rounds"), po::value((initial_partitioning ? &context.initial_partitioning.refinement.fm.unconstrained_rounds : &context.refinement.fm.unconstrained_rounds))->value_name("")->default_value(1), diff --git a/mt-kahypar/partition/context.cpp b/mt-kahypar/partition/context.cpp index afad9f66b..1656fa9d0 100644 --- a/mt-kahypar/partition/context.cpp +++ b/mt-kahypar/partition/context.cpp @@ -155,11 +155,6 @@ namespace mt_kahypar { out << " Release Nodes: " << std::boolalpha << params.release_nodes << std::endl; out << " Time Limit Factor: " << params.time_limit_factor << std::endl; } - if ( params.algorithm != FMAlgorithm::do_nothing && params.algorithm != FMAlgorithm::kway_fm ) { - out << " Penalize Moved Rebalancing Nodes: " << std::boolalpha << params.penalty_for_moved_rebalancing_nodes << std::endl; - out << " Bal. Viol. Factor Rebalancing: " << std::boolalpha << params.rebalancing_use_violation_factor << std::endl; - out << " Merge Move at Rebalancing Pos.: " << std::boolalpha << params.insert_merged_move_at_rebalancing_position << std::endl; - } out << std::flush; return out; } diff --git a/mt-kahypar/partition/context.h b/mt-kahypar/partition/context.h index 079b54c95..3630bf22d 100644 --- a/mt-kahypar/partition/context.h +++ b/mt-kahypar/partition/context.h @@ -174,10 +174,6 @@ struct FMParameters { bool release_nodes = true; bool rebalancing_use_violation_factor = true; - bool insert_merged_move_at_rebalancing_position = true; - bool update_penalty_locally_reverted = false; - - bool penalty_for_moved_rebalancing_nodes = true; double treshold_border_node_inclusion = 0.75; double unconstrained_upper_bound = 0.0; diff --git a/mt-kahypar/partition/refinement/fm/multitry_kway_fm.cpp b/mt-kahypar/partition/refinement/fm/multitry_kway_fm.cpp index 3c60fca2f..27e1782d3 100644 --- a/mt-kahypar/partition/refinement/fm/multitry_kway_fm.cpp +++ b/mt-kahypar/partition/refinement/fm/multitry_kway_fm.cpp @@ -317,8 +317,6 @@ namespace mt_kahypar { }()); GlobalMoveTracker& move_tracker = sharedData.moveTracker; - const bool merge_at_rebalancing_pos = context.refinement.fm.insert_merged_move_at_rebalancing_position; - // check the rebalancing moves for nodes that are moved twice for (PartitionID part = 0; part < context.partition.k; ++part) { vec& moves = rebalancing_moves_by_part[part]; @@ -332,12 +330,9 @@ namespace mt_kahypar { move_tracker.moveOfNode[r_move.node] = 0; first_move.invalidate(); r_move.invalidate(); - } else if (merge_at_rebalancing_pos) { + } else { r_move.from = first_move.from; first_move.invalidate(); - } else { - first_move.to = r_move.to; - r_move.invalidate(); } } }, tbb::static_partitioner());