Skip to content

extract_region hangs at np>=2: the annulus submesh never returns (np=1 is fine) #699

Closed

Description

@lmoresi

Found while trying to build a zero-cell-rank reproducer for #698. A region submesh is the realistic way a rank owns no cells, so this blocks testing that.

Reproduce

parent = uw.meshing.AnnulusInternalBoundary(
    radiusInner=0.4, radiusInternal=0.7, radiusOuter=1.0, cellSize=0.1)
sub = parent.extract_region("Inner")
print("cells:", sub.dm.getHeightStratum(0))
np result
1 parent 702 cells, submesh 278 cells, returns
2 hangs — no output at all, so it never gets past construction/extract
4, 8 hangs the same way

Under the #678 supervisor the ranks go quiet with rank 0 in <module>(), i.e. still inside the top-level construction, so this is before any of the submesh's own methods are called.

Why it matters beyond the hang

extract_region is only covered in parallel by test_0770. If that passes while this does not, the difference is worth knowing — it may be the internal-boundary annulus specifically, or cellSize=0.1 (702 cells) rather than the coarser fixtures the tests use.

It also means the zero-cell-rank path through cell_size() (#698) cannot currently be exercised the realistic way. The fix there is argued from the code — var.data's first access calls dm.createSubDM and createGlobalVector, both collective, from behind an early return that only starved ranks take — but not demonstrated.

Same family as #691 (isSimplex rank-local on empty ranks), #679/#680 (empty-rank swarm save), #698.

Underworld development team with AI support from Claude Code

Activity

  1. lmoresi commented on Sep 7, 2026

    @lmoresi
    MemberAuthor

    Withdrawn — this was my measurement error, not a defect.

    extract_region works at every rank count I tried:

    np parent cells/rank submesh cells/rank
    1 [702] [278]
    2 [352, 350] [126, 152]
    4 [169, 175, 184, 174] [67, 72, 69, 70]
    8 [91, 90, 89, 90, 88, 86, 83, 85] [30, 57, 38, 22, 31, 27, 35, 38]

    It returns cleanly in all of them.

    What actually happened: the annulus at cellSize=0.1 takes a while to generate, and I had two runs sharing one time budget. The np=1 run consumed most of it and my cap killed np=2 before gmsh finished. I read 'no output' as 'hang' when it meant 'not started yet'.

    I should have checked whether the process was making progress before filing. The supervisor prints exactly that — it reports whether ranks have moved between samples — and I did not run it on this until afterwards.

    No change needed. #698's zero-cell path still needs a reproducer; the annulus 'Inner' region is a full ring, so every angular partition owns some of it and this route does not starve a rank anyway.

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