Skip to content

Placement gathers far more than the surgery needs, onto one rank for the whole network, and never sends it back #670

Description

@lmoresi

Measured on the crossing-patches fixture of test_0863 (unit box, h_far = 0.24 refined once so base edges are about 0.126, h = 0.08, w = 0.04, two patches spanning 0.3 to 0.7).

The fill is small; the gather is not. The base has 5592 cells and the placed mesh 8405, of which 1663 are band. So the placement adds the band plus about 1150 fill cells, all within a cell of the patches. But at np=2 the gather moved 5087 of the 5592 base cells onto one rank before any surgery happened, and at np=4 the surgery rank ends with 8012 of 8405 cells. The imbalance is the gather, not the fill.

Cause, in place_thin_volume. The gather mark claims every vertex within reach + 2 h_vertex of the band's skin, and _gather_region then takes the star of the marked vertices and one further layer. Counted on the base:

region cells share
carve reach (0.038) 334 6%
reach + 1 h 1313 23%
reach + 2 h (the mark) 3486 62%
mark + star + layer 5592 100%

The seam rule the gather exists for (nothing the surgery deletes or creates may be shared) needs the carve victims, their vertex star, and one layer. The distance blanket of two cell widths looks like an earlier stand-in for the two topological layers, and both survive, so the margin is paid twice. On a large domain it is a shell two cells thicker than needed; on a small one it is the whole mesh.

One target for the whole network. The placer takes the network as one assembly and gathers the union of every patch's region to the single rank holding the most marked cells. Two faults each interior to a different rank are both moved to one of them. The split's _redistribute_fault_interior has the same one-target rule for the union of labels (its mark is topological, so it does not over-reach).

No return. The moved cells stay on the surgery rank. The moved region is exactly the neighbourhood the base's partition had balanced, so the extra load lands on the rank that was already heaviest there: anti-balanced, and paid for with a redistribution.

Direction (discussion with Louis, 2026-09-02): keep gather-first as the mechanism and make it hit the design: (1) a region whose star is already unshared on one rank is placed there with no move; (2) mark the victims only and let the star-plus-layer growth supply the seam freedom; (3) one region per connected cluster of patches, each to its own rank, surgeries concurrent; a move only for a region that actually straddles a seam. The accepted trade is extra load on the owning rank in exchange for no communication.

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