Skip to content

cell_size() diverges on a rank that owns no cells (np=8, tiny mesh) — and that mesh already hangs in construction on development #698

Description

@lmoresi

Found while adversarially reviewing #697; not caused by it, filed so it is not lost.

What happens

A 14-cell UnstructuredSimplexBox at np=8 gives cells per rank [2,2,2,2,0,2,2,2]. Calling mesh.cell_size() then diverges — per-rank stacks from the #678 supervisor:

ranks 0,1,2,3,5,6,7   inside _assemble_cell_size   (discretisation_mesh.py:3296)
rank 4                already past it, in the next statement

Rank 4 is the starved one. _assemble_cell_size short-circuits on radii.size == 0 and returns before touching var.data, which its peers do evaluate.

Why this is not #697

At realistic mesh sizes np=8 is green: both partition-independence guards pass at np=2/4/8, and test_1069 passes at np=2 and np=8 on the default local_h=True path.

What needs deciding

Two separate things, and they may have different owners:

  1. Whether a rank owning zero cells is a supported state for cell_size(), or whether the early return needs to be paired with whatever its peers do. The rank-local claim in the docstring is the thing to check, not assume.
  2. Why a 14-cell mesh at np=8 hangs during construction at all. That is the same family as Fix cell-family detection on empty MPI ranks #691 (isSimplex rank-local on an empty rank) and Passive swarm save/advection hangs or crashes on empty MPI ranks #679/fix: swarm empty-rank save deadlock (MPIO dtype) and estimate_dt reshape crash #680 (empty-rank swarm save), all found in the last week.

Reproduce with the supervisor so a hang reports instead of sitting:

pixi run -e amr-dev python scripts/mpi_supervisor.py --silence 60 -- \
  mpirun -n 8 python -u probe.py

Underworld development team with AI support from Claude Code

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions