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
A VE Stokes solve with only Dirichlet BCs deadlocks on the firstsolve() under MPI for specific (np, mesh) combinations. The hang is deterministic (5/5 trials) for the cases marked below, distinct from #96 (which was a PETSc coordinate-DM bug, fixed), and reproducible against a clean checkout of origin/development.
Failure surface (5 trials per cell, 45s timeout)
np \ mesh
8×4
16×8
16×16
24×12
32×16
1
OK 5.6s
OK 4.4s
—
—
OK 4.9s
2
OK 4.8s
OK 5/5
—
—
OK 5.7s
3
OK 5.9s
HANG 5/5
—
—
HANG 5/5
4
OK 5/5
HANG 5/5
OK 3.0s
OK 3.2s
OK 5/5
5
—
OK 3.6s
—
—
—
6
OK 7.8s
OK 9.3s
—
—
OK 8.3s
7
—
OK 4.7s
—
—
—
8
OK 11.7s
OK 5/5
—
—
OK 12.0s
12
—
OK 8.9s
—
—
—
16
—
HANG 4/5 (1 trial finished at 43s, near the 45s timeout)
—
—
—
Cells without a 5/5 marker were tested once.
Notable observations:
Doubling the mesh (16×8 → 32×16) at np=4 fixes the hang (it was the np=4 16×8 case specifically). So this is not a load-per-rank or memory-pressure issue.
#96 (BdIntegral parallel hang) was a PETSc coordinate-DM bug triggered by DMSetCoordinateDisc clearing the coordinate field cache; fixed via UW_DMForceCoordinateField and the createCoordinateSpace switch in nuke_coords_and_rebuild. The reproducer there involved boundary integrals and HDF5 mesh loading.
This bug:
Triggers on a fresh in-memory mesh (no checkpointing).
Uses only Dirichlet BCs — no add_natural_bc, no surface integrals.
Hangs on the first solve, before any DM rebuild path is exercised.
Stack-trace the hung ranks (lldb -p <pid> on macOS, or compile with py-spy/gdb-py). Are all ranks in the same MPI collective, or is one rank in a different code path?
Print the PETSc partitioning (-dm_view or mesh.dm.viewFromOptions) for the failing vs working configs — what does the rank topology look like at np=3 16×8 vs np=4 16×16?
Try a plain (non-VE) Stokes solver with the same BC layout to localise whether the trigger is in the VE / SemiLagrangian_DDt machinery or in the base Stokes assembly.
Bisect into _setup_solver — if the hang is during PETSc DS/DM setup, the rank-asymmetry will be near a MPI_Allreduce or MPI_Bcast that some ranks skip.
Environment
macOS 15.2 (Apple Silicon)
OpenMPI 5.0.10
PETSc arch petsc-325-uw-openmpi
underworld3 bugfix/jit-c-cache (PR JIT cache: key on generated C source (closes #121, #123) #129) — but the bug also reproduces on a clean origin/development checkout (verified by reverting _jitextension.py and petsc_generic_snes_solvers.pyx and rebuilding).
Underworld development team with AI support from Claude Code
Summary
A VE Stokes solve with only Dirichlet BCs deadlocks on the first
solve()under MPI for specific(np, mesh)combinations. The hang is deterministic (5/5 trials) for the cases marked below, distinct from #96 (which was a PETSc coordinate-DM bug, fixed), and reproducible against a clean checkout oforigin/development.Failure surface (5 trials per cell, 45s timeout)
Cells without a 5/5 marker were tested once.
Notable observations:
Reproducer
The hang is at the first
stokes.solve().[about to solve]prints,[DONE]does not.Distinct from #96
#96 (BdIntegral parallel hang) was a PETSc coordinate-DM bug triggered by
DMSetCoordinateDiscclearing the coordinate field cache; fixed viaUW_DMForceCoordinateFieldand thecreateCoordinateSpaceswitch innuke_coords_and_rebuild. The reproducer there involved boundary integrals and HDF5 mesh loading.This bug:
add_natural_bc, no surface integrals.Suggested next investigations
lldb -p <pid>on macOS, or compile withpy-spy/gdb-py). Are all ranks in the same MPI collective, or is one rank in a different code path?-dm_viewormesh.dm.viewFromOptions) for the failing vs working configs — what does the rank topology look like at np=3 16×8 vs np=4 16×16?Stokessolver with the same BC layout to localise whether the trigger is in the VE / SemiLagrangian_DDt machinery or in the base Stokes assembly._setup_solver— if the hang is during PETSc DS/DM setup, the rank-asymmetry will be near aMPI_AllreduceorMPI_Bcastthat some ranks skip.Environment
petsc-325-uw-openmpibugfix/jit-c-cache(PR JIT cache: key on generated C source (closes #121, #123) #129) — but the bug also reproduces on a cleanorigin/developmentcheckout (verified by reverting_jitextension.pyandpetsc_generic_snes_solvers.pyxand rebuilding).Underworld development team with AI support from Claude Code