Repository navigation
Conversation
…D 44) A DM with every cell on one rank reads as not distributed (DMPlexIsDistributed), and the Mesh constructor distributed it afresh. At np 2, a refined base with every cell on rank 0 lost the nesting of its coarse wraps (Mesh._wrap_coarse_level), and add_fault refused: "84 fine cell(s) have no local parent cell on the level below; the add-on levels are not co-partitioned". With the wraps fixed, the cut mesh fault_split builds was distributed afresh the same way. np 3 with one rank empty worked, since two ranks then held cells. The coarse-level wrap and fault_split's three Mesh constructions (the cut, the second-fault child, and the split child) now pass _preserve_partition=True, as extracted submeshes already do: each wraps a DM derived from an existing mesh's partition, which it must keep. Underworld development team with AI support from Claude Code
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A fix for a finding with no issue (UNFILED 44 in the dev hub's list). Review: H1, the session that reviews pull requests and runs the parallel tests on a 96-thread Linux workstation (single system image; Intel Xeon Gold 6240R, AVX-512; MPICH).
The failure
At np 2, take a refined base (
UnstructuredSimplexBox, cellSize 0.25,refinement=1) whose cells all sit on rank 0 (cells 168 / 0, from a shell partition of the loaded gmsh DM).add_faulton (0.3, 0.45)–(0.7, 0.55) then refused on both ranks with:At np 3 with one rank empty (80 / 88 / 0) the same call worked, and so did np 2 with cells on both ranks.
The cause
A DM with every cell on one rank reads as not distributed (
DMPlexIsDistributedis false on every level). TheMeshconstructor distributes such a DM afresh unless_preserve_partitionis set.Mesh._wrap_coarse_levelwraps each coarse level of the hierarchy as aMeshfor the add-on partition. Wrapping it redistributed the level, so the wrap no longer nested under the finer one.fault_split.add_faultbuilds was distributed afresh the same way (88 cells this time).DMPlex.distributecaught exactly these two calls, and no others.The change
Four
Mesh(...)constructions now pass_preserve_partition=True, asextract_regionandextract_surfacealready do:fault_split's cut mesh;fault_split's second-fault child;fault_split's split child.Each wraps a DM derived from an existing mesh's partition, which it must keep. When the DM is distributed, the flag changes nothing. At np 1 every DM reads as not distributed, and
distribute()there is a no-op.Test
tests/parallel/test_1300_add_fault_on_a_base_one_rank_holds_parallel.pyuses a fixture that puts every cell of the loaded gmsh DM on rank 0. Its three cases check:add_faultpartitions the add-on (fault pairs > 0);Regression
These runs used a Python overlay of this change on a current build.
add_fault,fault_mg,custom_mgorrefinement=: 993 passed, 5 skipped, 1 xpassed, 1 failed.test_0949_refinement_says_which_walls_are_left_off::test_a_crease_that_holds_vertices_back_names_the_walls_and_the_remedy. It fails identically without this change (the message no longer names['Lower']), so it is not this PR's; it is reported separately.Underworld development team with AI support from Claude Code