Skip to content

Commit 1670a8f

Browse files
committed
Some customization for HIER
1 parent 7c5c81b commit 1670a8f

File tree

1 file changed

+21
-3
lines changed

1 file changed

+21
-3
lines changed

dccrg.hpp

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7489,6 +7489,7 @@ template <
74897489
unsigned int neighborhood_length = 1;
74907490

74917491
std::string load_balancing_method{"RCB"};
7492+
int hierarchical_level_zero {16};
74927493

74937494
// maximum value an MPI tag can have
74947495
unsigned int max_tag;
@@ -7963,12 +7964,12 @@ template <
79637964

79647965
// Hardcoded for now
79657966
if (this->load_balancing_method == "HIER") {
7966-
add_partitioning_level(4); // Level 0 - Nodes
7967+
add_partitioning_level(this->hierarchical_level_zero); // Level 0 - Nodes
79677968
add_partitioning_option(0, "LB_METHOD", "HYPERGRAPH");
79687969

79697970
add_partitioning_level(1); // Level 1 - Processes
7970-
add_partitioning_option(1, "LB_METHOD", "RCB");
7971-
//add_partitioning_option(1, "LB_METHOD", "RIB");
7971+
add_partitioning_option(1, "LB_METHOD", "RIB");
7972+
//add_partitioning_option(1, "LB_METHOD", "RCB");
79727973
}
79737974

79747975
// reserved options that the user cannot change
@@ -8498,6 +8499,23 @@ template <
84988499
const std::string& get_load_balancing_method() const {
84998500
return this->load_balancing_method;
85008501
}
8502+
8503+
/*!
8504+
Sets amount of tasks for node-level of HIER partition for Zoltan
8505+
8506+
Must be called before initialize().
8507+
8508+
\see balance_load()
8509+
*/
8510+
Dccrg<
8511+
Cell_Data,
8512+
Geometry,
8513+
std::tuple<Additional_Cell_Items...>,
8514+
std::tuple<Additional_Neighbor_Items...>
8515+
>& set_load_balancing_hier_level_zero(const int n) {
8516+
this->hierarchical_level_zero = n;
8517+
return *this;
8518+
}
85018519

85028520

85038521
private:

0 commit comments

Comments
 (0)