Skip to content

TESTING: scale the RFP xTFSM forward error by the solution norm - #1398

Open
ACSimon33 wants to merge 1 commit into
Reference-LAPACK:masterfrom
ACSimon33:rfp-tfsm-test-normalization
Open

TESTING: scale the RFP xTFSM forward error by the solution norm#1398
ACSimon33 wants to merge 1 commit into
Reference-LAPACK:masterfrom
ACSimon33:rfp-tfsm-test-normalization

Conversation

@ACSimon33

@ACSimon33 ACSimon33 commented Sep 9, 2026

Copy link
Copy Markdown
Collaborator

Fixes #679

Problem

stest_rfp reports STFSM: 1 out of 7776 tests failed to pass the threshold on the x86-64 gfortran CI jobs (static and shared, plain and OpenMP).

Cause

xDRVRF3 checks xTFSM against xTRSM with an absolute forward error:

RESULT(1) = |X_tfsm - X_trsm|_inf / sqrt(eps) / max(M,N)

Nothing in that refers to the size of the solution, and the driver deliberately builds ill-conditioned systems — see its own comment, "Forcing main diagonal of test matrix to be unit makes it ill-conditioned for some test cases". When the solution grows large the test fails on a difference that is negligible in relative terms.

Measured on the failing case (CFORM='T' SIDE='L' UPLO='U' TRANS='T' DIAG='N' M=N=50): |X|_inf = 3.88e6, |dX|_inf = 0.788, i.e. a relative difference of 2.03e-07 — under 2 single-precision ulp — reported as test = 45.665 against a threshold of 30. The two routines agree to rounding; only the measure is wrong.

Change

Divide by MAX(SOLNRM, 1), where SOLNRM is the norm of the xTRSM solution.

Applied identically in all four precisions.

The unnormalised difference against xTRSM failed the threshold at a
relative error under 2 ulp, on a solve whose solution reaches 4e6.  The
floor of 1 covers ALPHA = 0, where the solution is exactly zero.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@codecov

codecov Bot commented Sep 9, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 68.99%. Comparing base (64ca1ef) to head (4a31fcf).
⚠️ Report is 35 commits behind head on master.
✅ All tests successful. No failed tests found.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1398      +/-   ##
==========================================
- Coverage   68.99%   68.99%   -0.01%     
==========================================
  Files        6122     6122              
  Lines      486386   486402      +16     
  Branches    23286    23286              
==========================================
+ Hits       335575   335583       +8     
- Misses     150622   150630       +8     
  Partials      189      189              
Components Coverage Δ
BLAS 97.94% <ø> (ø)
CBLAS 96.98% <ø> (ø)
LAPACK 82.37% <ø> (-0.01%) ⬇️
LAPACKE 0.10% <ø> (ø)
TMGLIB 55.69% <ø> (ø)
BLAS testing 88.33% <ø> (ø)
CBLAS testing 89.63% <ø> (ø)
LAPACK testing 82.24% <100.00%> (+<0.01%) ⬆️
LAPACKE testing ∅ <ø> (∅)
Files with missing lines Coverage Δ
TESTING/LIN/cdrvrf3.f 90.69% <100.00%> (+0.10%) ⬆️
TESTING/LIN/ddrvrf3.f 90.47% <100.00%> (+0.11%) ⬆️
TESTING/LIN/sdrvrf3.f 90.47% <100.00%> (+0.11%) ⬆️
TESTING/LIN/zdrvrf3.f 90.69% <100.00%> (+0.10%) ⬆️

... and 6 files with indirect coverage changes


Continue to review full report in Codecov by Harness.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 64ca1ef...4a31fcf. Read the comment docs.

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.

stest_rfp: STFSM test is very sensitive to small numeric errors in BLAS STRSM

2 participants