Repository navigation
Conversation
ABACUS-PR-BOT
left a comment
There was a problem hiding this comment.
Static inspection of 7a45cb7 found no additional actionable defect in the Davidson residual/threshold change, workspace reuse or downloader prerequisite. The threshold remains a cancellation heuristic; arbitrary scaling and backend behavior are not established by this source review. The existing dependency-order and threshold-invariant suggestions remain in their original threads.
Static review only; no builds or runtime tests were run.
|
@Cstandardlib Thanks for the review. #8456 has merged, and this branch is now synchronized with All 18 checks on the current head have now passed, including CUDA, CPU integration tests, abacuslite, and the complete build matrix. Could you please take another look when you have time? Thank you! |
Cstandardlib
left a comment
There was a problem hiding this comment.
LGTM. Thank you for your fix!
A single-precision Davidson-subspace GPU test can turn a small rounding residual into a direction that duplicates the existing basis, causing the reduced generalized eigenproblem to fail. This was exposed when #8264 began running the shared HSolver GPU tests; it is a follow-up to #8142 / #8127, independent of the PPCG implementation.
Reproducer and cause
The CUDA failure on #8264 starts in
DavSubspaceTest/1.MixedConvergedBandsAndOverlap, withheevd: failed to invert matrix; the subsequent six timer exceptions follow that first failure. The original scale-4 fixture passes locally on RTX 3090/CUDA 13.5, but scaling H and S together to 5 reproduces the cuSolver failure while preserving eigenvalues, initial vector directions, S condition number (1.9), and both test tolerances.Local diagnostics show residuals of
4.77e-7and2.38e-7: above the old eigenvalue-only roundoff guard but below the configured1e-6threshold. Normalization creates a duplicate direction; the projected overlap contains the singular block[[1.25,-2.5],[-2.5,5]]. A diagnostic cuSolver interceptor recordsinfo=10for the six-dimensional generalized solve. Diagnostic instrumentation is not included in this PR.Change
epsilon * (||Hx|| + |lambda| ||Sx||), keeping the existing small-residual floor and the cap at the requested band threshold.1e-6and2e-5.No INPUT parameter, application reference, timer infrastructure or PPCG numerical implementation changes. No performance improvement is claimed. No user documentation update is needed: the INPUT interface and intended convergence behavior are unchanged; this fixes premature expansion of rounding residuals in an existing solver.
Verification
Fresh local verification used the two-file patch in the existing build trees at PPCG branch
be642ec73, withOMP_NUM_THREADS=1 OPENBLAS_NUM_THREADS=1:Results: CUDA 10/10 tests, repeated 30/30 suites (300 executions); CPU 12/12, existing two-rank MPI 8/8 per rank, and non-MPI 12/12. The strict-threshold, loose-energy-tolerance and small-preconditioned-direction regressions still pass. A fresh independent build of the original Davidson commit
6cbad6bd6, based on upstream5064965fa, subsequently passed GPU CTest 2/2 registrations (LOBPCG 43/43 and Davidson 10/10) and CPU/MPI CTest 2/2 registrations (12 serial cases and 8 per MPI rank). A Compute Sanitizer memcheck of the 10 Davidson GPU cases reported zero errors. Changed-line formatting preserves the verified source after whitespace removal. Staged governance has no blockers; its documentation warning is addressed by the no-documentation-change rationale above. Whitespace and actionlint checks pass. Logs and exact source/binary hashes are retained in/mnt/data/Cheerly/ppcg-review-20261201/and/mnt/data/Cheerly/ppcg-ci-20261201/.Limits
The hosted CUDA workflow on
7a45cb703subsequently passed, including the Davidson GPU tests and all six GPU integration steps: run 46595572954. Local tests used RTX 3090/CUDA 13.5. That hosted result belongs to the earlier head containing the downloader prerequisite; it is not a completed check of the current scope-cleanup commit. The new expression estimates cancellation error; it is not a general rank-recovery algorithm. An extra 15-scale diagnostic scan improved from 3 passing cases to 12, but scales 32, 100 and 1000 still fail. In those cases residuals can exceed the configured threshold (for example1.156e-6 > 1e-6at scale 100). This patch preserves that threshold and does not discard those directions as converged; broader rank recovery remains follow-up work.Related: #8264. The shared GPU test entry point is identical to the one currently on that branch so it can be reviewed and merged with this independent Davidson fix.
Review follow-up and merge order (2026-12-02)
Commit
5e02dcaffremoves the downloader changes from this PR's final diff, following the review request. The remaining three files are the Davidson implementation, its regression test, and the common HSolver CUDA test entry point. All downloader changes remain independently in #8456. PR #8456 has now merged. This branch has been synchronized with the resultingdevelop; its toolchain files match the merged versions byte-for-byte. The Davidson implementation and regression test are unchanged. The previous prerequisite merge commits remain in branch history; the toolchain files and precommit workflow are restored byte-for-byte to the pre-dependency state, with no force push.The same commit documents that
residual_thresholdsis populated and queried only for bands in the incomingunconvlist. In-place compaction retains a subset of that list; entries for other bands are unused. This is a comment-only change to the numerical source; no thresholds or algorithm behavior changed.Verification of this follow-up: exact source comparison after removing the two added comment lines passed; toolchain/precommit files match the original
6cbad6bd6state;git diff --cached --checkpassed; staged governance had no blockers (its documentation warning is covered by the unchanged-user-behavior rationale above). The development merge was rebuilt locally:MODULE_HSOLVER_dav_subspace,MODULE_HSOLVER_dav_subspace_parallel,MODULE_HSOLVER_lobpcg_gpu, andMODULE_HSOLVER_dav_subspace_gpuall passed (CTest 4/4). All three unit-test executables rebuilt successfully. Downloader files matched merged develop; the Davidson implementation and test matched the pre-merge PR head exactly. Full hosted checks for the synchronized head are now running.