Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add functionality to print patch statistics in ASMStarPC and friends #3875

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

pefarrell
Copy link
Contributor

We often would like to know what kind of sizes of patch problems we are dealing with in ASMStarPC and friends.

When using -snes_view, PETSc prints out the size of the first patch on the first processor, but this isn't all that useful; really we want the minimum and maximum.

This adds an option -pc_star_print_patch_statistics that computes the minimum and maximum patch sizes and prints them out in the viewer, if requested.

firedrake/preconditioners/asm.py Outdated Show resolved Hide resolved
Copy link

github-actions bot commented Nov 20, 2024

TestsPassed ✅Skipped ⏭️Failed ❌
Firedrake complex8156 ran6682 passed1474 skipped0 failed

Copy link

github-actions bot commented Nov 20, 2024

TestsPassed ✅Skipped ⏭️Failed ❌
Firedrake real8162 ran7487 passed675 skipped0 failed

@JHopeCollins
Copy link
Member

This is a really useful option, thanks @pefarrell. Any chance you could add the mean patch size too? Could be useful to know if the min/max are particular outliers or not.

@@ -50,6 +51,7 @@ def test_star_equivalence(problem_type, backend):
"mg_levels_ksp_max_it": 1,
"mg_levels_pc_type": "python",
"mg_levels_pc_python_type": "firedrake.ASMStarPC",
"mg_levels_pc_star_print_patch_statistics": None,
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we rename the option to pc_star_view_patch_sizes?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants