trilinos / Trilinos

Primary repository for the Trilinos Project
https://trilinos.org/
Other
1.2k stars 564 forks source link

MueLu: How to avoid coarsening stagnation #5722

Closed dlkarnitz closed 5 years ago

dlkarnitz commented 5 years ago

Question

@trilinos/muelu

How do I avoid this scenario documented by the MueLu output where the aggregation appears to no longer coarsen the problem? It seems to me that the higher numbered levels won't contribute to accelerating the convergence. It would be okay if I can provide settings that allow the coarsening to stop once the c ratio does not change or hits a threshold, or provide settings that allow the coarsening to successfully continue down to the max level.

This is generated by using the default settings for MueLu like this:

Teuchos::ParameterList MLlist;
ML_Epetra::SetDefaults("SA", MLlist);
MLlist.set("aggregation: damping factor", 0.0);

// Convert from ML parameters to MueLu parameters
RCP<ParameterList> MueLuList = Teuchos::getParametersFromXmlString(
      MueLu::ML2MueLuParameterTranslator::translate( MLlist, "SA" ) );

Number of levels = 10 Operator complexity = 1.19 Cycle type = V

level rows nnz nnz/row c ratio procs
0 186296 1416362 7.60 24
1 24312 228258 9.39 7.66 24
2 2718 20430 7.52 8.94 24
3 633 3452 5.45 4.29 24
4 393 1764 4.49 1.61 24
5 374 1679 4.49 1.05 24
6 373 1657 4.44 1.00 24
7 373 1657 4.44 1.00 24
8 373 1657 4.44 1.00 24
9 373 1657 4.44 1.00 24
cgcgcg commented 5 years ago

I'm not sure what exactly is happening here, but maybe just set coarse: max size to something like 1000? Also, you could look into rebalancing and setting aggregation: drop tol to something bigger than 0.

jhux2 commented 5 years ago

@dlkarnit I agree with @cgcgcg, you should enable rebalancing. This option requires coordinates. A long time ago, the team discussed adding an option to stop coarsening if the rate dropped below some threshold, but I don't recall now if said option was ever implemented.

lucbv commented 5 years ago

@dlkarnit it seems that @cgcgcg and @jhux2 answered your question so I will close this issue. Feel free to reopen it if you want more explanations or open another issue if you have further unrelated questions.