@@ -684,8 +684,7 @@ namespace impl {
684684 const HypernodeWeightArray& reduced_part_weights,
685685 size_t & global_move_id,
686686 const uint8_t * is_locked,
687- bool is_fallback,
688- bool & is_deadlocked) {
687+ bool is_fallback) {
689688 auto & phg = utils::cast<PartitionedHypergraph>(hypergraph);
690689 const bool is_top_level = phg.initialNumNodes () == _top_level_num_nodes;
691690 auto & max_part_weights = _context.refinement .rebalancing .reduced_rollback ? reduced_part_weights : _context.partition .max_part_weights ;
@@ -734,9 +733,7 @@ namespace impl {
734733 && new_overweight < old_overweight
735734 && global_move_id < phg.initialNumNodes ()
736735 && (max_rounds == 0 || round < max_rounds));
737-
738736 DBG << V (old_overweight) << V (new_overweight) << V (global_move_id) << V (moved_nodes);
739- is_deadlocked = (max_rounds == 0 || round == max_rounds);
740737 return {attributed_gain, num_overloaded_blocks, num_moves_first_round};
741738 }
742739
@@ -757,11 +754,10 @@ namespace impl {
757754 auto & phg = utils::cast<PartitionedHypergraph>(hypergraph);
758755 const bool is_top_level = phg.initialNumNodes () == _top_level_num_nodes;
759756
760- bool is_deadlocked = false ;
761757 auto [attributed_gain, num_overloaded_blocks, num_moves_first_round] =
762- runGreedyAlgorithm (hypergraph, reduced_part_weights, global_move_id, is_locked, false , is_deadlocked );
758+ runGreedyAlgorithm (hypergraph, reduced_part_weights, global_move_id, is_locked, false );
763759
764- if (is_deadlocked && _context.refinement .rebalancing .use_deadlock_fallback && num_overloaded_blocks > 0
760+ if (_context.refinement .rebalancing .use_deadlock_fallback && num_overloaded_blocks > 0
765761 && (!_context.refinement .rebalancing .deadlock_fallback_only_toplevel || is_top_level)) {
766762 DBG << YELLOW << " Starting deadlock fallback..." << END ;
767763 auto & stats = utils::Utilities::instance ().getStats (_context.utility_id );
@@ -782,7 +778,7 @@ namespace impl {
782778
783779 attributed_gain += added_gain;
784780 const auto locks = _context.refinement .rebalancing .fallback_use_locking ? _node_is_locked.data () : nullptr ;
785- auto [attr_gain, n_overloaded, _] = runGreedyAlgorithm (hypergraph, reduced_part_weights, global_move_id, locks, true , is_deadlocked );
781+ auto [attr_gain, n_overloaded, _] = runGreedyAlgorithm (hypergraph, reduced_part_weights, global_move_id, locks, true );
786782 attributed_gain += attr_gain;
787783 num_overloaded_blocks = n_overloaded;
788784 }
0 commit comments