Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
60ff89c
First changes regarding Zoltan2
maxfirmbach Apr 2, 2025
e359444
Fix FSI tests
mayrmt Apr 4, 2025
b55f262
Fix FS3I test
mayrmt Apr 4, 2025
38a1c40
Fix contact saddle-point preconditioner tests
mayrmt Apr 10, 2025
ab8aa9f
Fix self-contact tests
mayrmt Apr 10, 2025
4d91a9a
Fix vtk files
eulovi Apr 29, 2025
7f036c1
Fix beam test
eulovi Apr 30, 2025
bb9c1af
Fix a few minor tolerance violation tests
maxfirmbach May 7, 2025
2f5fc28
Change tolerances of AZTOL for xfluid
eulovi Jun 4, 2025
0e123ee
Fix vtk files
eulovi Jun 4, 2025
84f8309
Fix small error
eulovi Jun 5, 2025
a7592f8
Extend scope of variable
georghammerl Jun 12, 2025
6ee5b14
Several bug fixes
georghammerl Jun 16, 2025
96b2168
Further work on periodic boundary conditions
maxfirmbach Jun 5, 2025
54f3ef1
Fix a few more tests
maxfirmbach Jul 8, 2025
e509ecf
Further work on turbmodel tests
maxfirmbach Jul 8, 2025
be7fab6
Fix communicator for Zoltan2
maxfirmbach Aug 28, 2025
088ab43
Fix unit tests
maxfirmbach Aug 28, 2025
f7b5e6a
Fix a few tests
maxfirmbach Sep 18, 2025
c91a507
fix: update brownian dyn tests
davidrudlstorfer Sep 26, 2025
bc7796c
Fix first batch of ELCH tests
maxfirmbach Oct 9, 2025
5414d76
Fix some s(s)ti tests
maxfirmbach Oct 9, 2025
d4ae3fb
Redo monolithic partitioning test
maxfirmbach Oct 9, 2025
94dd7ef
Fix formatting
maxfirmbach Oct 14, 2025
1ed1290
Fix beam tests
maxfirmbach Oct 17, 2025
059f40a
Adjust tolerances
knarfnitram Oct 19, 2025
4b63308
Fix FSI tests
mayrmt Apr 4, 2025
b63bd00
Redo monolithic partitioning test
maxfirmbach Oct 9, 2025
7812677
Fix fsi tests
maxfirmbach Oct 24, 2025
f886fca
Fix some further things
maxfirmbach Nov 21, 2025
0fad486
Fix from rebase
maxfirmbach Nov 21, 2025
982138e
Fix (s)sti tests
maxfirmbach Dec 2, 2025
4d87013
More test fixing for elch, ssi, sti
maxfirmbach Dec 2, 2025
68e65ee
Fix porofluid test
eulovi Dec 5, 2025
4773242
Fix multivector use for weight
maxfirmbach Dec 5, 2025
0694443
Minimize Zoltan2 output
maxfirmbach Dec 5, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 7 additions & 6 deletions src/contact/src/4C_contact_interface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -901,9 +901,9 @@ void CONTACT::Interface::redistribute()
Core::Rebalance::build_graph(*idiscret_, slaveCloseRowEles);

Teuchos::ParameterList slaveCloseRebalanceParams;
slaveCloseRebalanceParams.set<std::string>("num parts", std::to_string(scproc));
slaveCloseRebalanceParams.set<std::string>("imbalance tol", std::to_string(imbalance_tol));
slaveCloseRebalanceParams.set("partitioning method", "graph");
slaveCloseRebalanceParams.set<std::string>("num_global_parts", std::to_string(scproc));
slaveCloseRebalanceParams.set<std::string>("imbalance_tolerance", std::to_string(imbalance_tol));
slaveCloseRebalanceParams.set<std::string>("algorithm", "parmetis");

const auto& [slaveCloseRowNodes, slaveCloseColNodes] =
Core::Rebalance::rebalance_node_maps(*slaveCloseNodeGraph, slaveCloseRebalanceParams);
Expand All @@ -929,9 +929,10 @@ void CONTACT::Interface::redistribute()
Core::Rebalance::build_graph(*idiscret_, slaveNonCloseRowEles);

Teuchos::ParameterList slaveNonCloseRebalanceParams;
slaveNonCloseRebalanceParams.set<std::string>("num parts", std::to_string(sncproc));
slaveNonCloseRebalanceParams.set<std::string>("imbalance tol", std::to_string(imbalance_tol));
slaveNonCloseRebalanceParams.set("partitioning method", "graph");
slaveNonCloseRebalanceParams.set<std::string>("num_global_parts", std::to_string(sncproc));
slaveNonCloseRebalanceParams.set<std::string>(
"imbalance_tolerance", std::to_string(imbalance_tol));
slaveNonCloseRebalanceParams.set<std::string>("algorithm", "parmetis");

const auto& [slaveNonCloseRowNodes, snccolnodes] =
Core::Rebalance::rebalance_node_maps(*slaveNonCloseNodeGraph, slaveNonCloseRebalanceParams);
Expand Down
28 changes: 12 additions & 16 deletions src/core/binstrategy/4C_binstrategy.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -820,18 +820,13 @@ void Core::Binstrategy::BinningStrategy::distribute_bins_recurs_coord_bisection(
{
// create a parameter list for partitioner
Teuchos::ParameterList params;
params.set("Partitioning Method", "RCB");

// set low-level partitioning parameters (see Zoltan Users' Guide:
// http://www.cs.sandia.gov/zoltan)
Teuchos::ParameterList& sublist = params.sublist("Zoltan");

// debug level (see http://www.cs.sandia.gov/zoltan/ug_html/ug_param.html)
sublist.set("DEBUG_LEVEL", "0");

// recursive coordinate bisection (see http://www.cs.sandia.gov/zoltan/ug_html/ug_alg_rcb.html)
sublist.set("RCB_OUTPUT_LEVEL", "0");
sublist.set("RCB_RECTILINEAR_BLOCKS", "1");
params.set("algorithm", "zoltan");
params.set("debug_level", "no_status");
Teuchos::ParameterList& zparams = params.sublist("zoltan_parameters", false);
zparams.set("LB_METHOD", "RCB");
zparams.set("DEBUG_LEVEL", "0");
Comment on lines +824 to +827
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

DEBUG_LEVEL and debug_level are overwritten at the call site. Is this intended? See other comment.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

debug_level is the verbosity of Zoltan2, while DEBUG_LEVEL is the internal Zoltan verbosity. That's with debug_level is set on params and DEBUG_LEVEL on zparams (the Zoltan sublist). I know this is confusing ... but that's how it is right now. In the Isorropia case it was not that much better though.

zparams.set("RCB_OUTPUT_LEVEL", "0");
zparams.set("RCB_RECTILINEAR_BLOCKS", "1");

std::tie(bincenters, binweights) =
Core::Rebalance::rebalance_coordinates(*bincenters, params, *binweights);
Expand Down Expand Up @@ -1233,12 +1228,13 @@ Core::Binstrategy::BinningStrategy::weighted_distribution_of_bins_to_procs(
bingraph->optimize_storage();

Teuchos::ParameterList paramlist;
paramlist.set("PARTITIONING METHOD", "GRAPH");
Teuchos::ParameterList& sublist = paramlist.sublist("Zoltan");
paramlist.set("algorithm", "zoltan");
Teuchos::ParameterList& zparams = paramlist.sublist("zoltan_parameters", false);
zparams.set("LB_METHOD", "GRAPH");
if (repartition)
sublist.set("LB_APPROACH", "REPARTITION");
paramlist.set("partitioning_approach", "repartition");
else
sublist.set("LB_APPROACH", "PARTITION");
paramlist.set("partitioning_approach", "partition");

auto balanced_bingraph = Core::Rebalance::rebalance_graph(*bingraph, paramlist, vweights);

Expand Down
21 changes: 7 additions & 14 deletions src/core/fem/src/condition/4C_fem_condition_periodic.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1188,7 +1188,7 @@ void Core::Conditions::PeriodicBoundaryConditions::balance_load()
auto node_weights = std::make_shared<Core::LinAlg::Vector<double>>(*node_row_map, true);
{
// set default node weights
node_weights->put_scalar(1.0);
node_weights->put_scalar(10.0);

// apply weight of special elements
for (int node_lid = 0; node_lid < node_row_map->num_my_elements(); ++node_lid)
Expand Down Expand Up @@ -1309,7 +1309,7 @@ void Core::Conditions::PeriodicBoundaryConditions::balance_load()
// 3. set graph edge weights
auto edge_weights = std::make_shared<Core::LinAlg::SparseMatrix>(graph_rowmap, 15);
{
// set standard value of edge weight to 1.0
// set standard value of edge weight to 10.0
for (int i = 0; i < node_graph.num_local_rows(); ++i)
{
const int grow = node_graph.row_map().gid(i);
Expand All @@ -1336,27 +1336,20 @@ void Core::Conditions::PeriodicBoundaryConditions::balance_load()
// we do not want to partition between master and slave nodes
std::vector<int> master_gid(1, master->id());
std::vector<int> slave_gid(1, slave->id());
// add 99 to the initial value of 1.0 to set costs to 100
std::vector<double> value(1, 99.0);
// set cost of strong edges to 100.0
std::vector<double> value(1, 100.0);

edge_weights->insert_global_values(master->id(), 1, value.data(), slave_gid.data());
edge_weights->insert_global_values(slave->id(), 1, value.data(), master_gid.data());
}
}
}
// TODO: Bug?
// Here we fill a data structure, which should be completed at some point, but in doing so we
// end up with an error in Zoltan ...
// edge_weights->complete();
edge_weights->complete();

// 4. setup partitioner and redistribute
// TODO: Why does this only work for all tests with ParMETIS?
Teuchos::ParameterList paramlist;
paramlist.set("PARTITIONING METHOD", "GRAPH");
Teuchos::ParameterList& sublist = paramlist.sublist("Zoltan");
sublist.set("LB_METHOD", "GRAPH");
sublist.set("GRAPH_PACKAGE", "ParMETIS");
sublist.set("LB_APPROACH", "PARTITION");
paramlist.set("algorithm", "parmetis");
paramlist.set("partitioning_approach", "repartition");

auto newnodegraph =
Core::Rebalance::rebalance_graph(node_graph, paramlist, node_weights, edge_weights);
Expand Down
2 changes: 1 addition & 1 deletion src/core/io/src/4C_io_gridgenerator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ namespace Core::IO::GridGenerator

Teuchos::ParameterList rebalanceParams;
rebalanceParams.set<std::string>(
"num parts", std::to_string(Core::Communication::num_mpi_ranks(comm)));
"num_global_parts", std::to_string(Core::Communication::num_mpi_ranks(comm)));

std::tie(nodeRowMap, nodeColMap) =
Core::Rebalance::rebalance_node_maps(*nodeGraph, rebalanceParams);
Expand Down
2 changes: 0 additions & 2 deletions src/core/io/src/4C_io_meshreader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -363,8 +363,6 @@ namespace
std::string section_name;
};



std::vector<std::shared_ptr<Core::FE::Discretization>> find_dis_node(
const std::vector<ElementReader>& element_readers, int global_node_id)
{
Expand Down
12 changes: 6 additions & 6 deletions src/core/rebalance/src/4C_rebalance.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,16 +31,16 @@ do_rebalance_discretization(const Core::LinAlg::Graph& graph,
if (!Core::Communication::my_mpi_rank(comm))
std::cout << "Redistributing using hypergraph .........\n";

rebalanceParams.set("partitioning method", "HYPERGRAPH");
rebalanceParams.set("algorithm", "phg");
std::tie(rowmap, colmap) = Core::Rebalance::rebalance_node_maps(graph, rebalanceParams);
break;
}
case Core::Rebalance::RebalanceType::recursive_coordinate_bisection:
case Core::Rebalance::RebalanceType::multijagged:
{
if (!Core::Communication::my_mpi_rank(comm))
std::cout << "Redistributing using recursive coordinate bisection .........\n";

rebalanceParams.set("partitioning method", "RCB");
rebalanceParams.set("algorithm", "multijagged");

rowmap = std::make_shared<Core::LinAlg::Map>(
-1, graph.row_map().num_my_elements(), graph.row_map().my_global_elements(), 0, comm);
Expand All @@ -66,7 +66,7 @@ do_rebalance_discretization(const Core::LinAlg::Graph& graph,
if (!Core::Communication::my_mpi_rank(comm))
std::cout << "Redistributing using monolithic hypergraph .........\n";

rebalanceParams.set("partitioning method", "HYPERGRAPH");
rebalanceParams.set("algorithm", "phg");

rowmap = std::make_shared<Core::LinAlg::Map>(
-1, graph.row_map().num_my_elements(), graph.row_map().my_global_elements(), 0, comm);
Expand Down Expand Up @@ -109,15 +109,15 @@ void Core::Rebalance::rebalance_discretization(Core::FE::Discretization& discret
const double imbalance_tol = parameters.mesh_partitioning_parameters.imbalance_tol;

Teuchos::ParameterList rebalanceParams;
rebalanceParams.set<std::string>("imbalance tol", std::to_string(imbalance_tol));
rebalanceParams.set<std::string>("imbalance_tolerance", std::to_string(imbalance_tol));

const int minele_per_proc = parameters.mesh_partitioning_parameters.min_ele_per_proc;
const int max_global_procs = Core::Communication::num_mpi_ranks(comm);
int min_global_procs = max_global_procs;

if (minele_per_proc > 0) min_global_procs = row_elements.num_global_elements() / minele_per_proc;
const int num_procs = std::min(max_global_procs, min_global_procs);
rebalanceParams.set<std::string>("num parts", std::to_string(num_procs));
rebalanceParams.set<std::string>("num_global_parts", std::to_string(num_procs));

const auto rebalanceMethod = parameters.mesh_partitioning_parameters.rebalance_type;

Expand Down
11 changes: 5 additions & 6 deletions src/core/rebalance/src/4C_rebalance.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,11 @@ namespace Core::Rebalance

enum class RebalanceType
{
none, //< no partitioning method
hypergraph, //< hypergraph based partitioning
recursive_coordinate_bisection, //< recursive coordinate bisection, geometric based
// partitioning
monolithic //< hypergraph based partitioning by using a global monolithic graph constructed
// via a global collision search
none, //< no partitioning method
hypergraph, //< hypergraph based partitioning
multijagged, //< multijagged, geometric based partitioning
monolithic //< hypergraph based partitioning by using a global monolithic graph constructed
// via a global collision search
};

struct MeshPartitioningParameters
Expand Down
Loading