You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Rotated free-slip annulus: the FMG coarse level is a dense SVD on one rank, so more ranks make the solve slower (caps kaiju at np 16) #901
Measured on kaiju (ZG95 annulus campaign, 52-core nodes) on 2026-10-23/24 and recorded in uw3-campaigns HUB.md, before #890 merged. This is why the fault campaigns run at np 16 on one node, using 16 of its 52 cores. To re-check on development.
What happens
The annulus with rotated free-slip walls has a rigid-rotation null mode. The custom FMG therefore solves its coarsest level by a dense SVD on one rank. That cost does not fall with the rank count, and the gather to one rank makes it rise:
coarse level
np 16
np 52
np 104
124 cells
20-25 s per Newton iteration
448 cells
70-80 s per Newton iteration
178 s
did not finish
So more ranks make the solve slower.
Ruling and design so far
Louis, 2026-10-28:
handle the rotation null space explicitly;
let PETSc's defaults choose the coarse-level solver;
MUMPS is not the default (it breaks on the Mac).
A prototype with three sweeps (null space with sparse direct against SVD, then MUMPS with null pivots against SVD) and a proposed design are on feature/coarse-solve-nullspace, hyperion's branch, unfinished since the reimage. The options named there are an explicit null space plus a redundant or telescoped sparse LU on a gathered coarse communicator.
Done when
The coarse solve's cost per Newton iteration is flat or falling from np 16 to np 52 on kaiju's annulus.
The rotation mode is removed exactly. The answer matches the SVD path to solver tolerance.
The solve passes on macOS.
Underworld development team with AI support from Claude Code
Direction (Louis, 2026-10-31) and what the code does today
Louis: np 16 cannot be the ceiling, since no 3-D problem is reachable from there. SVD being slow is why the coarse solve moved to redundant LU. The coarse level was also found not to be coarse enough, and GAMG may serve as the coarse solve where no coarser mesh is available.
What development (fc67b65) does. The move to redundant LU applies only where the rotated problem has no rigid-rotation mode. rotated_bc.py around line 2305 picks coarse="svd" whenever _rotated_velocity_null_modes is non-zero, because redundant LU zero-pivots on the mode (#306). That covers the annulus (one mode) and the spherical shell (three). So the cases that need scale still gather a dense SVD onto one rank, and every 3-D shell will too.
Options to measure. Same fixture, np 4 to 8 locally, then kaiju at np 16, 32 and 52:
The rotation mode removed explicitly, then redundant LU. Either a nonzero shift with the null space attached to the coarse KSP, or the coarse system bordered by the rotation constraint so it is nonsingular. The prototype on feature/coarse-solve-nullspace measured the first (sweep 2).
GAMG as the coarse solve. A Krylov coarse KSP with GAMG, given the rigid-body near-null space and the exact rotation mode as a null space. It stays distributed, with no gather. This is for coarse levels that cannot be made coarser.
A coarser bottom level where the geometry allows it: the hierarchy extended down, so a gathered direct solve stays small.
PCTELESCOPE on the coarse level, combined with 1 or 2, so that only a subset of ranks takes part.
Done when: the coarse cost per Newton iteration is flat or falling from np 16 to np 52 on the rollback rig; the answer matches the SVD path to solver tolerance; macOS passes; and the choice is a default selected by the presence of null modes, not another user-facing option.
Underworld development team with AI support from Claude Code
The ruling already in place (2026-10-28) is to handle the null space explicitly and use direct solves.
SVD is fine if the coarse level is coarse enough. The defect is a bottom level of 124-448 cells gathered to one rank, not SVD as such.
GAMG on the coarse mesh with SVD at GAMG's own base is worth investigating, as an option and not a commitment.
The order of work is therefore:
A coarser bottom level wherever the geometry allows it, so the gathered SVD or direct solve stays small at any rank count. Measure how far the annulus and shell hierarchies can be extended downward, and what that does to iterations.
The null space handled explicitly, with a direct solve. Use this where a coarser mesh is not available, or as the general default if it is cheaper than SVD at the same size.
Investigation: GAMG below the geometric coarse level, with SVD at GAMG's base. The rigid-body near-null space and the exact rotation mode are supplied. This is for coarse meshes that cannot be coarsened. Report it whether it wins or loses.
Telescope only if a gathered solve still dominates after 1-3.
Underworld development team with AI support from Claude Code
Scope of option 3 (Louis, 2026-10-31): GAMG only as the coarse-level solve of the geometric FMG (mg_coarse), with SVD at GAMG's base. It does not replace geometric multigrid on any level, and it is not a general preconditioner choice.
Underworld development team with AI support from Claude Code
GAMG as the coarse solve: kept for one case (Louis, 2026-10-31)
GAMG as the geometric FMG's coarse solve stays available for one case only: when the coarsest mesh we can reach is too large for an efficient gathered redundant LU. It is not a default and not chosen automatically.
What was measured (np 4; the answer matches the redundant-LU default to 1e-9):
GAMG's own base is at most 6 % of its coarse work, whether SVD, LU or pinned. Plain LU at the base hit no zero pivot and was cheapest.
Its cost is 15-40 GAMG V-cycles per geometric coarse solve: 4-10 times a gathered LU at 600-cell bottom levels (shell 4.9 s of coarse work against about 1.25 s).
It goes in as an explicit, tested variant (coarse="gamg"), so it cannot rot. Settings: coarse rtol 1e-2, an LU base, and the rigid-body near-null space attached to the coarse operator. The guide states when to use it.
Underworld development team with AI support from Claude Code
Activity
lmoresi commentedon Oct 31, 2026
Direction (Louis, 2026-10-31) and what the code does today
Louis: np 16 cannot be the ceiling, since no 3-D problem is reachable from there. SVD being slow is why the coarse solve moved to redundant LU. The coarse level was also found not to be coarse enough, and GAMG may serve as the coarse solve where no coarser mesh is available.
What development (fc67b65) does. The move to redundant LU applies only where the rotated problem has no rigid-rotation mode.
rotated_bc.pyaround line 2305 pickscoarse="svd"whenever_rotated_velocity_null_modesis non-zero, because redundant LU zero-pivots on the mode (#306). That covers the annulus (one mode) and the spherical shell (three). So the cases that need scale still gather a dense SVD onto one rank, and every 3-D shell will too.Options to measure. Same fixture, np 4 to 8 locally, then kaiju at np 16, 32 and 52:
feature/coarse-solve-nullspacemeasured the first (sweep 2).PCTELESCOPEon the coarse level, combined with 1 or 2, so that only a subset of ranks takes part.Done when: the coarse cost per Newton iteration is flat or falling from np 16 to np 52 on the rollback rig; the answer matches the SVD path to solver tolerance; macOS passes; and the choice is a default selected by the presence of null modes, not another user-facing option.
Underworld development team with AI support from Claude Code
lmoresi commentedon Oct 31, 2026
Refinement (Louis, 2026-10-31)
The order of work is therefore:
Underworld development team with AI support from Claude Code
lmoresi commentedon Oct 31, 2026
Scope of option 3 (Louis, 2026-10-31): GAMG only as the coarse-level solve of the geometric FMG (
mg_coarse), with SVD at GAMG's base. It does not replace geometric multigrid on any level, and it is not a general preconditioner choice.Underworld development team with AI support from Claude Code
#901: the rotated FMG's coarse solve handles the rotation modes, then…
CI reaches test_1111 (#901)
lmoresi commentedon Oct 31, 2026
GAMG as the coarse solve: kept for one case (Louis, 2026-10-31)
GAMG as the geometric FMG's coarse solve stays available for one case only: when the coarsest mesh we can reach is too large for an efficient gathered redundant LU. It is not a default and not chosen automatically.
What was measured (np 4; the answer matches the redundant-LU default to 1e-9):
It goes in as an explicit, tested variant (
coarse="gamg"), so it cannot rot. Settings: coarse rtol 1e-2, an LU base, and the rigid-body near-null space attached to the coarse operator. The guide states when to use it.Underworld development team with AI support from Claude Code
#901: test that a rotated solve sets its coarse level up once
#901: the rotated route no longer sets its coarse level up twice per …
#901: GAMG as the multigrid coarse solve, when asked for
#901: the rotated coarse solve is redundant LU with a zero-pivot shif…
#901 review round 2: the shift on the live PC, tests that read it, ho…
#906: only an exact rotation mode selects the SVD coarse solve