Skip to content

Linux accuracy anchors for the parallel rotated and constrained tests; a stale strict xfail goes - #981

Merged
lmoresi merged 4 commits into
developmentfrom
tests/linux-accuracy-anchors
Nov 7, 2026
Merged

lmoresi merged 4 commits into
developmentfrom
tests/linux-accuracy-anchors

Conversation

@lmoresi

@lmoresi lmoresi commented Nov 6, 2026

Copy link
Copy Markdown
Member

The parallel accuracy anchors now check the absolute answer on CI's Linux runners too, instead of skipping there every time.

The gap

test_1063, test_1064 (box, annulus, annulus_fmg, the spherical shells) and test_1066 assert their answer against a recorded value, gated on the mesh fingerprint. The values were recorded on macOS. Linux's gmsh builds those meshes differently, so on CI every anchor without a matching fingerprint skipped, and the absolute answer was never checked there. Only partition independence was.

The change

  • accuracy_anchor (tests/parallel/serial_reference.py) takes a list of anchors, one per host mesh, and uses the one whose fingerprint matches. When none matches, the skip names the fingerprints on record. It also prints this host's fingerprint and values in a paste-ready form, so a CI log or one run gives the values to record.
  • Linux anchors were recorded on hyperion at np 2 with the conda-forge stack CI uses:
    • test_1063: iso, ti and raw-gauge (430-cell annulus);
    • test_1064: annulus (612), shell (1395) and internal-boundary shell (1991);
    • test_1066: datum (612).
      The Linux values agree with the macOS ones as two triangulations of one domain should: velocity L2 within about 0.02 %, topography within 0.5 to 2 %.
  • The two shells are recorded as development builds them. Refining a spherical shell folds cells at the inner wall: SphericalShell and CubedSphere snap new wall nodes outward through coarse cells that lie on the wall #946's wall flips (PR #946: refining a spherical mesh no longer folds cells; a missing label moves nothing (#903) #952) change those meshes; after that merges, a skip will print the values to add.
  • test_1064_constrained_spherical_shell_response: the LU-subsolve field-split case was a strict xfail. It now passes on Linux (hyperion) and on macOS, so XPASS(strict) failed it, and the agreement is asserted instead. The fast grouped-Schur case still fails on macOS and keeps its xfail. The file is tier C and not in CI.

Tests only; no library change.

Evidence

On this branch at np 2 (hyperion), before the Linux values were added: 7 passed and 7 skipped. The 7 skip messages gave the values above. With them added, those cases are compared on Linux.

Issues

Underworld development team with AI support from Claude Code

…he values to record

The parallel accuracy anchors (test_1063, test_1064's box, annulus and
annulus_fmg, test_1066's datum) were recorded on macOS, and Linux's gmsh
builds those meshes differently, so on CI every one of them skipped and the
absolute answer was never checked there. An anchor can now be a list, one per
mesh a host builds; the one whose fingerprint matches is used. A skip names
the fingerprints on record and prints this host's fingerprint and values in
the form to paste, so CI's own log (or one run on hyperion) gives the Linux
anchors.

Underworld development team with AI support from Claude Code
Recorded on hyperion at np 2 with the conda-forge stack CI uses, from the
skip messages of 27df1f3: test_1063's iso, ti and raw-gauge annulus (430
cells), test_1064's annulus (612), shell (1395) and internal-boundary shell
(1991), and test_1066's datum (612). Each sits beside its macOS anchor; the
one whose fingerprint matches is used. The two shells are as development
builds them; #952's wall flips change those meshes, and a skip will then
print the values to add.

Underworld development team with AI support from Claude Code
…-split case passes now

It was a strict xfail ("LU sub-solves in the velocity | [p,h] preconditioner
still do not reproduce the validated Nitsche/default velocity response").
It passes on Linux (hyperion, both builds) and on macOS arm64 at
development eddab70, so XPASS(strict) failed it; the agreement within 1 %
is now asserted. The fast grouped-Schur case still fails on macOS and keeps
its strict xfail. The file is tier C.

Underworld development team with AI support from Claude Code
Copilot AI balanced review requested due to automatic review settings November 6, 2026 11:09

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 6, 2026

Copy link
Copy Markdown
Member Author

Adversarial review of #981

Verdict: ready. Tests only, ec8d064 against eddab70. Nothing broke.

Run on hyperion at np 2: test_1063, test_1064 and test_1066 give 14 passed, 0 skipped, rc=0. The seven cases that skipped now assert their anchors. Each Linux value in the files was checked against the recorded dicts.

Attacks that failed

  • Fingerprint matching: _same_mesh is the cell count exactly and the volume to rtol 1e-12. A volume perturbed by 1e-13 still matches; a mesh differing in volume does not. The paired fingerprints differ in cell count (434/430, 600/612, 1417/1395, 2016/1991), so no anchor can match the other host's mesh.
  • Callers with one anchor: a single dict and a tuple both work. accuracy_anchor is used only in serial_reference.py and these three files.
  • A 1e-2 anchor can fail: on a matching mesh, a value 2% high and one 2% low each raised "has MOVED". The Linux anchors are live gates.
  • Same verdict on every rank: the match rests on the allreduced fingerprint and reduced diagnostics.
  • np 2 anchors against an np 1 reference: compare runs first with a far tighter partition tolerance.
  • serial_reference shared state: nothing added.
  • Removed xfail: the test's module is level_3, slow, tier_c, so it cannot turn tier A or B red. The fast grouped-Schur case keeps its strict xfail. CI's tier C report will now enforce 1% LU-subsolve agreement.

Could not test

The removed test in CI, and a real multi-rank skip. #952's flips will send the shell cases back to a skip that prints the values to add, as the PR says.

Underworld development team with AI support from Claude Code

Underworld development team with AI support from Claude Code
@lmoresi
lmoresi merged commit a92355e into development Nov 7, 2026
8 checks passed
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.

2 participants