feat(linear-static-3d-euler-beam): step 20 - mkl-pardiso-solver-review-fix

This commit is contained in:
KOKO\Mimi
2026-08-09 20:20:37 +09:00
parent 4678472326
commit be5f4eb86d
4 changed files with 139 additions and 25 deletions
@@ -923,3 +923,49 @@
depending on MKL types.
- concerns: none; no critical implementation, environment, backend, or
upstream-contract conflict was found.
### Step 20 Review Fix Round 1 — fully constrained lifecycle and normalized validation
- review_classification: Important integration/correctness fixes. Step 19
intentionally produces a valid `0x0 Kff` for an all-constrained model, so
rejecting that matrix contradicted the accumulated solver workflow.
- test_scope: the existing six `MklPardisoSolver` test names were retained.
The invalid-state test now covers trivial factorize/solve followed by a
nonempty refactor, unchanged caller output on failed solves, and a
small-scale asymmetric matrix. Numerical helpers now divide by the actual
nonzero RHS/expected norm and fail closed for zero or nonfinite norms.
| stage | exact command | exit_code | observed_result |
| --- | --- | ---: | --- |
| RED-zero-equation | `cmake --build .harness/build --config Debug; ctest --test-dir .harness/build -C Debug --output-on-failure -R MklPardisoSolver` | 1 | Build passed; 5/6 tests passed and `RejectsInvalidCsrStateAndDimensions` failed because valid `0x0 Kff` factorization returned failure |
| TEST-hardening | same targeted command after replacing unit-floor norm helpers | 1 | The same zero-equation production defect remained the only failure; no artificial RED was claimed for already-correct numerical results |
| GREEN-zero-equation | same targeted command after the minimum production change | 0 | 6/6 passed; empty factorize/solve avoids PARDISO and a following nonempty refactor solves correctly |
| RED-scaled-symmetry | `cmake --build .harness/build --config Debug; ctest --test-dir .harness/build -C Debug --output-on-failure -R MklPardisoSolver` | 1 | Build passed; 5/6 tests passed and the existing invalid-state test showed that a scaled asymmetric matrix was incorrectly accepted |
| GREEN-scaled-symmetry | same targeted command after the minimum production change | 0 | 6/6 passed with symmetry normalized by the matrix's actual maximum absolute entry and no unit-size floor |
| VERIFY-configure | `cmake -S . -B .harness/build -A x64 -DFESA_GTEST_SOURCE_DIR=C:/git/googletest "-DMKL_DIR=C:/Program Files (x86)/Intel/oneAPI/mkl/2026.1/lib/cmake/mkl" "-DTBB_DIR=C:/Program Files (x86)/Intel/oneAPI/tbb/2023.1/lib/cmake/tbb" "-DHDF5_DIR=C:/Program Files/HDF_Group/HDF5/2.1.1/cmake"` | 0 | Explicit MSVC x64 dependencies configured and generated successfully |
| VERIFY-build/targeted | `cmake --build .harness/build --config Debug; ctest --test-dir .harness/build -C Debug --output-on-failure -R MklPardisoSolver` | 0 | Debug build completed without a new warning; exact Step 20 suite passed 6/6 |
| VERIFY-discovery/full | `ctest --test-dir .harness/build -C Debug --show-only=json-v1; ctest --test-dir .harness/build -C Debug --output-on-failure` | 0 | 57 tests discovered and 57/57 passed |
| VERIFY-contract | backend API leak scan, exact-test count, forbidden fallback/regularization scan, `git diff --check`, and reference diff/status | 0 | backend API leaks 0; exact tests 6; forbidden implementation matches 0; whitespace clean; `reference/` unchanged |
- production_fix: a successful zero-equation factorization is represented as
trivial private state without allocating or calling PARDISO; empty solve
succeeds only after that observable factorization. The ordinary `release()`
path safely clears this state before later refactorization or destruction.
- production_fix: symmetry requires every reverse structural pair and compares
`abs(aij-aji)` to `1e-12 * max(abs(A))`. An exactly zero matrix uses an exact
zero difference check; SparseMatrix validation remains responsible for
rejecting nonfinite values.
- failure_atomicity: solve-before-factorize, dimension mismatch, and nonfinite
RHS failures are asserted to leave the caller's solution values unchanged;
successful backend output is still copied from a private candidate only
after phase 33 and finite-result validation.
- evidence_hygiene: two intermediate symmetry RED attempts were discarded
because a concurrent clean build locked MSBuild files. The uncontended RED
above reproduced the production defect deterministically and is the recorded
evidence.
- phase_index: intentionally unchanged during this review fix; hash
`2cfb6ee5e0c49fbf6b06d27cb33ec9ac2c34dbc4`.
- supersession: this review section supersedes the original Step 20 statements
that the factorized CSR must be nonempty or that empty input is rejected.
- concerns: none; the transient build contention was resolved before recorded
RED/GREEN/VERIFY runs and no critical or upstream blocker remains.