Repository navigation
test_0858: build the partition instead of relying on the platform's partitioner - #1113
Conversation
The test launched np 3 and np 5 and required some parent DOF on the region's edge to be owned by a rank with no child copy of it. On macOS the default partitioner left none, so the test failed its precondition before testing anything (W1, on wombat). A shell partition now puts the region's cells (r < 1) on rank 0 and deals the rest to ranks 1 to n-1 by angle; PETSc gives a shared point to the highest rank sharing it, so the edge at r = 1 is owned by ranks with no child cell, on any platform. Measured: 104 such DOFs at np 3 and 5; the transfer exact. On the code before #1095 the replace error is 8.0 and the add error 1.0. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Review of #1113 (test_0858 builds its own partition)Verdict: READY at c78bf26. One non-blocking finding: this file no longer catches the no-division mutant. test_1087 at np 2 still catches it, and a one-line change, tested below, restores the catch here. Reviewed head Build: Tests ran from Mutants in the workerstest_0858 runs its check in I also added H5's 1. The test passes serially
2. The partition it buildserrors.json for the plain run:
A probe (
3. The test still guards the fix
Findings
4. Platform independence and determinism
5. Rest of the diff
CI at c78bf26
Not testedmacOS; Open MPI; np other than 3 and 5 for the test itself. Underworld development team with AI support from Claude Code |
What and why
tests/test_0858_submesh_injection_odd_ranks.py(from #1095) launches np 3 and np 5 runs. As its precondition, it requires some parent DOF on the extracted region's edge to be owned by a rank with no child copy of it. On macOS (W1, on wombat, development 613ed1e) the default partitioner left no such DOF:{'add': 0.0, 'orphans': 0, 'replace': 0.0}. Both cases failed the precondition before testing anything.The partition is now built, not left to the partitioner:
The test asserts both the layout (child cells only on rank 0) and the precondition, so it can't pass vacuously.
Tests
The code before #1095 also ignores the built layout (its child cells end up on every rank), which fails the layout assert as well.
Only the test changes.
Checklist
Underworld development team with AI support from Claude Code
🤖 Generated with Claude Code