Skip to content

Commit f1e129a

Browse files
skilledwolfclaude
andcommitted
fix(scf): FullPivLU has no info() — use isInvertible() for the DIIS guard
The DIIS coefficient solve in solve_scf checked `lu.info() == Eigen::Success` on an Eigen::FullPivLU, which has no info() member. It slipped through local builds (newer system Eigen found via find_package) but breaks the CI wheel build against the pinned Eigen 3.4.0 (the FetchContent fallback): solver_scf.hpp:299: 'Eigen::FullPivLU<...>' has no member named 'info' Introduced by ddee430 (experimental SCF solvers), after v1.0.3 — so CI never exercised it until the pipeline was re-armed. isInvertible() is the correct, portable check: reject the DIIS extrapolation when the residual overlap matrix B is singular and fall back to the plain step. SCF regression tests green. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
1 parent 43835e9 commit f1e129a

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

cpp/include/cpp_hf/solver_scf.hpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -296,7 +296,9 @@ inline SCFResult solve_scf(const HFKernel& K, const c64* P0, f32 n_e,
296296
{
297297
Eigen::FullPivLU<decltype(B)> lu(B);
298298
sol = lu.solve(rhs);
299-
diis_ok = lu.info() == Eigen::Success;
299+
// FullPivLU has no info(); isInvertible() is the right check
300+
// (reject DIIS when the residual matrix B is singular).
301+
diis_ok = lu.isInvertible();
300302
for (std::size_t i = 0; i < m; ++i)
301303
diis_ok = diis_ok && std::isfinite(static_cast<double>(sol[i]));
302304
}

0 commit comments

Comments
 (0)