feat: add fp-stability command for Verrou-based FP instability testing#1403
feat: add fp-stability command for Verrou-based FP instability testing#1403sbryngelson wants to merge 4 commits intoMFlowCode:masterfrom
Conversation
Adds ./mfc.sh fp-stability — a persistent floating-point stability test
suite using Verrou's random IEEE-754 rounding mode.
For each registered test case the runner:
1. Generates initial conditions via pre_process
2. Runs simulation once with --rounding-mode=nearest (reference)
3. Runs simulation N times with --rounding-mode=random
4. Reports max L-inf deviation vs threshold (PASS/FAIL)
Two cases probe known ill-conditioning in MFC:
- sod_strong: 1-D Sod p_L/p_R=100,000 — HLLC xi-factor cancellation
(s_L - vel_L)/(s_L - s_S) near sonic contact
- water_stiffened: 1-D water shock pi_inf=4046 — pressure recovery
p=(E-pi_inf)/gamma loses ~4 decimal digits on low-pressure side
Requires a Verrou-enabled Valgrind at $VERROU_HOME/bin/valgrind
(default: $HOME/.local/verrou). Silently skips if not found.
Binaries are auto-discovered from build/install/ or passed explicitly.
Claude Code ReviewHead SHA: 5c8eaab Files changed:
Findings1.
|
Closes #650
Summary
./mfc.sh fp-stability— a persistent floating-point stability test suite using Verrou's random IEEE-754 rounding mode.github/workflows/fp-stability.yml) that builds Verrou and runs the suite on every pushWhat it tests
For each case the runner executes 1 nearest-rounding reference run + N random-rounding runs under Verrou, then reports the max L∞ deviation vs. a threshold:
sod_strong(s_L−vel_L)/(s_L−s_S)cancels near sonic contactwater_stiffenedp=(E−pi_inf)/gammaloses ~4 decimal digits (pi_inf/p_right ≈ 40,000)CI
Verrou (Valgrind 3.26.0 + edf-hpc/verrou@a58d434) is built from source and cached by commit hash. First run ~25 min uncached; subsequent runs ~10–12 min with cache hit.
Test plan