Skip to content

Commit

Permalink
working version
Browse files Browse the repository at this point in the history
  • Loading branch information
V0G3L committed Sep 18, 2024
1 parent ed0e46b commit e76ebf3
Show file tree
Hide file tree
Showing 8 changed files with 282 additions and 91 deletions.
2 changes: 1 addition & 1 deletion config/evo_quality_preset.ini
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ max-steiner-tree-size=4
mapping-largest-he-fraction=0.0
mapping-min-pin-coverage=0.05
#main -> evolutionary
evolutionary.population_size=100;
evolutionary.population_size=10;
evolutionary.dynamic_population_size=false;
evolutionary.dynamic_population_amount_of_time=0.15;
evolutionary.diversify_interval=1;
Expand Down
117 changes: 117 additions & 0 deletions config/evo_quality_preset_no_unconstrained.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,117 @@
# general
mode=direct
preset-type=quality
maxnet-removal-factor=0.01
smallest-maxnet-threshold=50000
maxnet-ignore=1000
num-vcycles=0
partition-evolutionary=true
time-limit=300
# main -> shared_memory
s-use-localized-random-shuffle=false
s-static-balancing-work-packages=128
# main -> preprocessing
p-enable-community-detection=true
# main -> preprocessing -> community_detection
p-louvain-edge-weight-function=hybrid
p-max-louvain-pass-iterations=5
p-louvain-min-vertex-move-fraction=0.01
p-vertex-degree-sampling-threshold=200000
# main -> coarsening
c-type=multilevel_coarsener
c-use-adaptive-edge-size=true
c-min-shrink-factor=1.01
c-max-shrink-factor=2.5
c-s=1
c-t=160
c-vertex-degree-sampling-threshold=200000
# main -> coarsening -> rating
c-rating-score=heavy_edge
c-rating-heavy-node-penalty=no_penalty
c-rating-acceptance-criterion=best_prefer_unmatched
# main -> initial_partitioning
i-mode=rb
i-runs=20
i-use-adaptive-ip-runs=true
i-min-adaptive-ip-runs=5
i-perform-refinement-on-best-partitions=true
i-fm-refinement-rounds=1
i-lp-maximum-iterations=20
i-lp-initial-block-size=5
# main -> initial_partitioning -> refinement
i-r-refine-until-no-improvement=false
i-r-relative-improvement-threshold=0.0
# main -> initial_partitioning -> refinement -> label_propagation
i-r-lp-type=label_propagation
i-r-lp-maximum-iterations=5
i-r-lp-rebalancing=true
i-r-lp-he-size-activation-threshold=100
# main -> initial_partitioning -> refinement -> fm
i-r-fm-type=kway_fm
i-r-fm-multitry-rounds=5
i-r-fm-perform-moves-global=false
i-r-fm-rollback-parallel=true
i-r-fm-rollback-balance-violation-factor=1
i-r-fm-seed-nodes=25
i-r-fm-obey-minimal-parallelism=false
i-r-fm-release-nodes=true
i-r-fm-time-limit-factor=0.25
i-r-fm-iter-moves-on-recalc=true
# main -> initial_partitioning -> refinement -> flows
i-r-flow-algo=do_nothing
# main -> refinement
r-rebalancer-type=advanced_rebalancer
r-refine-until-no-improvement=true
r-relative-improvement-threshold=0.0025
# main -> refinement -> label_propagation
r-lp-type=do_nothing
r-lp-unconstrained=true
r-lp-maximum-iterations=5
r-lp-rebalancing=true
r-lp-he-size-activation-threshold=100
r-lp-relative-improvement-threshold=0.001
# main -> refinement -> fm
r-fm-type=kway_fm
r-fm-multitry-rounds=10
r-fm-unconstrained-rounds=8
r-fm-perform-moves-global=false
r-fm-rollback-parallel=true
r-fm-rollback-balance-violation-factor=1.0
r-fm-threshold-border-node-inclusion=0.7
r-fm-imbalance-penalty-min=0.2
r-fm-imbalance-penalty-max=1.0
r-fm-seed-nodes=25
r-fm-release-nodes=true
r-fm-min-improvement=-1.0
r-fm-unconstrained-min-improvement=0.002
r-fm-obey-minimal-parallelism=true
r-fm-time-limit-factor=0.25
r-fm-iter-moves-on-recalc=true
# main -> refinement -> flows
r-flow-algo=flow_cutter
r-flow-scaling=16
r-flow-max-num-pins=4294967295
r-flow-find-most-balanced-cut=true
r-flow-determine-distance-from-cut=true
r-flow-parallel-search-multiplier=1.0
r-flow-max-bfs-distance=2
r-flow-min-relative-improvement-per-round=0.001
r-flow-time-limit-factor=8
r-flow-skip-small-cuts=true
r-flow-skip-unpromising-blocks=true
r-flow-pierce-in-bulk=true
r-flow-process-mapping-policy=lower_bound
# main -> mapping
one-to-one-mapping-strategy=greedy_mapping
mapping-use-local-search=true
use-two-phase-approach=false
max-steiner-tree-size=4
mapping-largest-he-fraction=0.0
mapping-min-pin-coverage=0.05
#main -> evolutionary
evolutionary.population_size=10;
evolutionary.dynamic_population_size=false;
evolutionary.dynamic_population_amount_of_time=0.15;
evolutionary.diversify_interval=1;
evolutionary.mutation_chance=0.5;
evo-replacement-strategy=strong-diverse;
117 changes: 117 additions & 0 deletions config/evo_quality_preset_short.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,117 @@
# general
mode=direct
preset-type=quality
maxnet-removal-factor=0.01
smallest-maxnet-threshold=50000
maxnet-ignore=1000
num-vcycles=0
partition-evolutionary=true
time-limit=20
# main -> shared_memory
s-use-localized-random-shuffle=false
s-static-balancing-work-packages=128
# main -> preprocessing
p-enable-community-detection=true
# main -> preprocessing -> community_detection
p-louvain-edge-weight-function=hybrid
p-max-louvain-pass-iterations=5
p-louvain-min-vertex-move-fraction=0.01
p-vertex-degree-sampling-threshold=200000
# main -> coarsening
c-type=multilevel_coarsener
c-use-adaptive-edge-size=true
c-min-shrink-factor=1.01
c-max-shrink-factor=2.5
c-s=1
c-t=160
c-vertex-degree-sampling-threshold=200000
# main -> coarsening -> rating
c-rating-score=heavy_edge
c-rating-heavy-node-penalty=no_penalty
c-rating-acceptance-criterion=best_prefer_unmatched
# main -> initial_partitioning
i-mode=rb
i-runs=20
i-use-adaptive-ip-runs=true
i-min-adaptive-ip-runs=5
i-perform-refinement-on-best-partitions=true
i-fm-refinement-rounds=1
i-lp-maximum-iterations=20
i-lp-initial-block-size=5
# main -> initial_partitioning -> refinement
i-r-refine-until-no-improvement=false
i-r-relative-improvement-threshold=0.0
# main -> initial_partitioning -> refinement -> label_propagation
i-r-lp-type=label_propagation
i-r-lp-maximum-iterations=5
i-r-lp-rebalancing=true
i-r-lp-he-size-activation-threshold=100
# main -> initial_partitioning -> refinement -> fm
i-r-fm-type=kway_fm
i-r-fm-multitry-rounds=5
i-r-fm-perform-moves-global=false
i-r-fm-rollback-parallel=true
i-r-fm-rollback-balance-violation-factor=1
i-r-fm-seed-nodes=25
i-r-fm-obey-minimal-parallelism=false
i-r-fm-release-nodes=true
i-r-fm-time-limit-factor=0.25
i-r-fm-iter-moves-on-recalc=true
# main -> initial_partitioning -> refinement -> flows
i-r-flow-algo=do_nothing
# main -> refinement
r-rebalancer-type=advanced_rebalancer
r-refine-until-no-improvement=true
r-relative-improvement-threshold=0.0025
# main -> refinement -> label_propagation
r-lp-type=label_propagation
r-lp-unconstrained=true
r-lp-maximum-iterations=5
r-lp-rebalancing=true
r-lp-he-size-activation-threshold=100
r-lp-relative-improvement-threshold=0.001
# main -> refinement -> fm
r-fm-type=unconstrained_fm
r-fm-multitry-rounds=10
r-fm-unconstrained-rounds=8
r-fm-perform-moves-global=false
r-fm-rollback-parallel=true
r-fm-rollback-balance-violation-factor=1.0
r-fm-threshold-border-node-inclusion=0.7
r-fm-imbalance-penalty-min=0.2
r-fm-imbalance-penalty-max=1.0
r-fm-seed-nodes=25
r-fm-release-nodes=true
r-fm-min-improvement=-1.0
r-fm-unconstrained-min-improvement=0.002
r-fm-obey-minimal-parallelism=true
r-fm-time-limit-factor=0.25
r-fm-iter-moves-on-recalc=true
# main -> refinement -> flows
r-flow-algo=flow_cutter
r-flow-scaling=16
r-flow-max-num-pins=4294967295
r-flow-find-most-balanced-cut=true
r-flow-determine-distance-from-cut=true
r-flow-parallel-search-multiplier=1.0
r-flow-max-bfs-distance=2
r-flow-min-relative-improvement-per-round=0.001
r-flow-time-limit-factor=8
r-flow-skip-small-cuts=true
r-flow-skip-unpromising-blocks=true
r-flow-pierce-in-bulk=true
r-flow-process-mapping-policy=lower_bound
# main -> mapping
one-to-one-mapping-strategy=greedy_mapping
mapping-use-local-search=true
use-two-phase-approach=false
max-steiner-tree-size=4
mapping-largest-he-fraction=0.0
mapping-min-pin-coverage=0.05
#main -> evolutionary
evolutionary.population_size=10;
evolutionary.dynamic_population_size=false;
evolutionary.dynamic_population_amount_of_time=0.15;
evolutionary.diversify_interval=1;
evolutionary.mutation_chance=0.5;
evo-replacement-strategy=strong-diverse;
5 changes: 2 additions & 3 deletions config/evolutionary_preset.ini
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ smallest-maxnet-threshold=50000
maxnet-ignore=1000
num-vcycles=0
partition-evolutionary=true
time-limit= 60
time-limit= 20
#300
# main -> shared_memory
s-use-localized-random-shuffle=false
Expand Down Expand Up @@ -96,8 +96,7 @@ max-steiner-tree-size=4
mapping-largest-he-fraction=0.0
mapping-min-pin-coverage=0.05
#main -> evolutionary
evolutionary.population_size=1;
#100
evolutionary.population_size=10;
evolutionary.dynamic_population_size=false;
evolutionary.dynamic_population_amount_of_time=0.15;
evolutionary.diversify_interval=1;
Expand Down
5 changes: 4 additions & 1 deletion mt-kahypar/io/command_line_options.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -738,7 +738,10 @@ namespace mt_kahypar {
"default: 0.5)")
("evo-history-file",
po::value<std::string>(&context.evolutionary.history_file)->value_name("<string>"),
"Output file for evolution history");
"Output file for evolution history")
("evo-kway",
po::value<int>(&context.evolutionary.kway_combine)->value_name("<int>")->default_value(2),
"How many individsuals to combine for the combine step\n");
return options;
}

Expand Down
1 change: 1 addition & 0 deletions mt-kahypar/partition/context.h
Original file line number Diff line number Diff line change
Expand Up @@ -281,6 +281,7 @@ struct EvolutionaryParameters {
mutable int iteration;
mutable std::chrono::milliseconds time_elapsed;
std::string history_file;
int kway_combine;
};

std::ostream & operator<< (std::ostream& str, const EvolutionaryParameters& params);
Expand Down
Loading

0 comments on commit e76ebf3

Please sign in to comment.