Skip to content

test_1103: the serial driver launches at most three ranks; np 4 and up run in the parallel shard - #1155

Merged
lmoresi merged 2 commits into
developmentfrom
bugfix/test-1103-xdist-ranks
Nov 13, 2026
Merged

lmoresi merged 2 commits into
developmentfrom
bugfix/test-1103-xdist-ranks

Conversation

@lmoresi

@lmoresi lmoresi commented Nov 13, 2026 •

Copy link
Copy Markdown
Member

A test-only fix for an intermittent CI hang. Review: H1 (review and parallel test runs on a 96-thread Linux workstation).

What and why

tests/test_1103_facet_slip_matches_serial.py (from #1109) is a serial driver: it launches its own mpirun runs and compares them with serial. It runs inside an xdist worker (--dist loadfile). On a 4-vCPU CI runner its np 5 case launched five ranks beside the other three workers' tests. In run 43419515662 (shard 3) that case went quiet for the supervisor's 120 s and was killed. It passed on another run with the same code, so it is intermittent.

The driver now launches np 2 and 3 only.

The same cases run in-process in a new file, tests/parallel/test_1103_facet_slip_against_serial_parallel.py, at whatever rank count the parallel batch uses: np 2, and np 3 and 4 in the full-parallel pass. CI runs the parallel shard without --full-parallel, so scripts/test.sh also runs this file at np 4 on every run (about 60 s; the np 3 and 4 layouts are where #1109's 3-D seam defect showed). That shard runs without xdist. The serial baseline comes from a single-rank child in the same environment (serial_reference). The new file reuses the driver's own _move, so both build exactly the same case. np 5 is local-only: it is run by hand, not in CI.

Tests

On a 96-thread Linux workstation:

  • the serial driver under -n 4 --dist loadfile, pinned to 4 cores: 9 passed;
  • the new parallel file at np 2, 3, 4 and 5: 4 passed at each.

Checklist

  • Test-only change; no library code (S9)
  • Markers on both files (S8)
  • Parallel: the np 4 layouts keep their coverage in the parallel shard (S11)
  • AI attribution below

Underworld development team with AI support from Claude Code

…p run in the parallel shard

test_1103's serial driver ran inside an xdist worker and launched mpirun
-np 5 beside three other workers on a 4-vCPU runner, and in CI the np 5
case went quiet for the supervisor's 120 s and was killed (intermittent).
The driver now launches np 2 and 3 only. The same cases run in-process in
tests/parallel/test_1103_facet_slip_against_serial_parallel.py at the
parallel batch's rank count (2, and 3 and 4 in the full-parallel pass, 5 by
hand), against a single-rank serial child in the same environment.

Underworld development team with AI support from Claude Code
Copilot AI balanced review requested due to automatic review settings November 13, 2026 12:44

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

@lmoresi

lmoresi commented Nov 13, 2026

Copy link
Copy Markdown
Member Author

READY at 003d0fb, with one correction to the body: the np 4 layouts no longer run in CI. Measured by H1 (review and parallel test runs on a 96-thread Linux workstation (Intel Xeon Gold 6240R, AVX-512; MPICH)) on development 116fc45, the PR's base, with the PR's tests. MPI jobs ran under the supervisor on 4 logical CPUs, so np 5 is oversubscribed.

The new parallel file (tests/parallel/test_1103_facet_slip_against_serial_parallel.py, 4 cases):

np result (every rank) time
2 4 passed 38 s
3 4 passed 37 s
4 4 passed 36 s
5 4 passed 50 s

It still catches the defect #1109 fixed. With the seam drop made a no-op (a mutant, _drop_seam_facets returning its input), the file fails 2 of 4 at np 2 and at np 4: the two internal-boundary cases, as they should.

The serial driver, under -n 4 --dist loadfile on 4 logical CPUs (the CI shape): 9 passed in 132 s, with no case near the 120 s silence limit.

Coverage: scripts/check_test_coverage.py passes (457 files).

The correction. CI runs scripts/test.sh --p 2 --shard K/N, without --full-parallel (build_uw3_and_test.yaml). So the new file runs at np 2 only in CI. Its np 3 and 4 passes happen only when --full-parallel is given, by hand or in a nightly.

  • Before this PR, CI ran np 4 (and np 5) through the serial driver: facet_2d at 4 and 5, facet_2d_scattered at 4, internal_2d at 4, internal_2d_scattered at 4.
  • After it, CI runs these cases at np 2 and 3 only.

The body's "np 3 and 4 in the full-parallel pass" is right as far as it goes. It should say plainly that np 4 has left CI, so that the trade (an intermittent hang against np 4 coverage) is on record. The defect stays covered, since the mutant fails at np 2. If np 4 matters, the file could also be listed for a 4-rank pass in the nightly job (#573).

Underworld development team with AI support from Claude Code

CI runs the parallel shard at np 2 without --full-parallel, so after the
serial driver stopped launching four ranks, the np 4 seam layouts (where
#1109's 3-D defect showed) ran nowhere in CI. This file now runs at np 4
in the parallel shard on every run. np 5 is run locally only.

Underworld development team with AI support from Claude Code
@lmoresi
lmoresi merged commit 49db824 into development Nov 13, 2026
10 checks passed
lmoresi added a commit that referenced this pull request Nov 13, 2026
Brings in the cap on the ranks the serial facet-slip driver launches
(#1155), whose five-rank case stalled this branch's CI on a 4-vCPU
runner, and the two-call Jacobian (#1156). The two sides change
different parts of the solver file; the merge is automatic.

Underworld development team with AI support from Claude Code
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants