Skip to content

Commit 3b662db

Browse files
committed
fp-stability: refresh --help description for case.py usage + sig-bits/cancellation reframe
The --help prose was stale: it claimed 'PASS/FAIL against per-case thresholds' (now scale-free sig-bits), didn't mention the case.py positional / its serial-CPU constraints / the feasibility guard, and listed an outdated case set. Rewrote the description to cover: running on a built-in suite or a user case .py (with constraints + guard), the >= 24-bit scale-free pass criterion, and the analysis passes (dd confirmation/ranking, cancellation origins by digits lost). Also updated the module-docstring Usage. The positional INPUT and a case.py example were already shown in --help; this fixes the surrounding prose.
1 parent 2276eb1 commit 3b662db

2 files changed

Lines changed: 20 additions & 13 deletions

File tree

toolchain/mfc/cli/commands.py

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -898,23 +898,25 @@
898898
name="fp-stability",
899899
help="Run floating-point stability tests using Verrou.",
900900
description=(
901-
"Runs each registered test case N times under Verrou's random IEEE-754 "
902-
"rounding mode and compares against a nearest-rounding reference run. "
903-
"Reports the max L∞ deviation and PASS/FAIL against per-case thresholds.\n\n"
901+
"Runs Verrou random-rounding stability analysis on a built-in suite of small "
902+
"1-D cases, or — given a case .py (positional INPUT) — on your own case. Each "
903+
"case is run N times under Verrou's random IEEE-754 rounding and compared "
904+
"against a nearest-rounding reference. PASS/FAIL is scale-free: a case must "
905+
"retain at least ~24 significant bits (single precision) under random rounding "
906+
"(no per-case thresholds).\n\n"
907+
"With a case .py, that case is run as a SINGLE serial CPU process under Verrou "
908+
"(~30x slower, and run many times), so it must be a small, short proxy — large "
909+
"grids or long runs are rejected with guidance; serial .dat I/O is forced. "
910+
"Example: ./mfc.sh fp-stability my_case.py\n\n"
904911
"Requires a Verrou-enabled Valgrind at $VERROU_HOME/bin/valgrind "
905912
"(defaults to $HOME/.local/verrou). The simulation and pre_process "
906913
"binaries must be serial (no-MPI, no-GPU) debug builds.\n\n"
907-
"Test cases:\n"
908-
" sod_standard 1-D standard Sod, p_L/p_R=10 (well-conditioned baseline)\n"
909-
" sod_strong 1-D Sod, p_L/p_R=100,000 — HLLC xi-factor cancellation\n"
910-
" water_stiffened 1-D water shock (pi_inf=4046) — pressure-recovery cancellation\n"
911-
" air_water_interface 1-D air/water contact (two-fluid) — mixed-cell cancellation\n\n"
912-
"Additional features (skip with --no-* flags):\n"
914+
"Analysis passes (skip with --no-* flags):\n"
913915
" float proxy One run with --rounding-mode=float (single-precision sensitivity)\n"
914916
" vprec sweep Runs at mantissa bits [52, 23, 16, 10] (precision floor curve)\n"
915-
" dd_sym verrou_dd_sym bisection to responsible functions (on failure)\n"
916-
" dd_line verrou_dd_line bisection to responsible source lines (on failure)\n"
917-
" cancellation --check-cancellation detection of catastrophic cancellation sites\n"
917+
" dd_sym/dd_line verrou_dd bisection to responsible functions/lines, then a\n"
918+
" --source positive control confirms + ranks them by sensitivity\n"
919+
" cancellation --check-cancellation origins, ranked by significant digits lost\n"
918920
" mca-sigbits Monte Carlo Arithmetic (mcaquad) significant-bits lower bound\n"
919921
" float-max --check-max-float detection of double→float overflow sites\n"
920922
),

toolchain/mfc/fp_stability.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,9 +59,14 @@
5959
- A serial pre_process binary (to generate initial conditions)
6060
6161
Usage:
62-
./mfc.sh fp-stability
62+
./mfc.sh fp-stability # built-in 1-D suite
63+
./mfc.sh fp-stability my_case.py # your own case (small/short, serial, CPU)
6364
./mfc.sh fp-stability --no-vprec --no-dd-line
6465
./mfc.sh fp-stability --sim-binary PATH --pre-binary PATH
66+
67+
A user case .py is run as a single serial CPU process under Verrou, so it must be
68+
a small, short proxy (a feasibility guard rejects large grids / long runs); output
69+
is forced to serial .dat I/O and the files to diff are auto-detected.
6570
"""
6671

6772
import math

0 commit comments

Comments
 (0)