Repository navigation
experiment(lcao): retain cuSOLVER eigenvectors for Gamma FP64 density matrices - #8392
Open
Stardust0831 wants to merge 22 commits into
Open
Stardust0831 wants to merge 22 commits into
Stardust0831 wants to merge 22 commits into
Conversation
Preserve the upstream LCAO diagonalization interface and reject device_dm gpu with a nonzero lcao_sk_cut. Update INPUT coverage, document the restriction, and format the affected CMake files.
Stardust0831
marked this pull request as ready for review
November 28, 2026 06:40
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What's changed?
Automatically form real FP64 Gamma LCAO density matrices from retained cuSOLVER eigenvectors and calculated occupations:
D = C diag(f) C^T. Reuse solver and host buffers, and distribute DM in column blocks to limit temporary memory. Host eigenvectors remain available to existing consumers.Applies to CUDA/MPI/LCAO builds with
device gpu,ks_solver cusolver,nspin 1,kpar 1,lcao_sk_cut 0, and charge updates on one node with one visible GPU per rank. Other configurations retain the existing path. GPU DM errors identify the failed operation and terminate. Full/partial eigensolver selection is unchanged.Performance
V100, four MPI ranks, one OMP/BLAS thread. DM times include download and distribution. CPU/GPU comparisons use the same executable and eigensolver; a measurement-only CPU-DM control is excluded from production, which is tested separately.
Si1080, one pair: total time 442.50→375.11 s (−15.2%); sampled host memory 20.831→20.814 GiB; GPU memory 10728→10736 MiB. The production cross-check takes 377.35 s with 20.789 GiB host memory. Si216 three-pair total-time medians are 39.65→40.22 s (+1.4%).
Small or EXX-dominated systems may see little overall benefit.
Unit Tests and/or Case Tests for my changes
Passed CUDA/MPI tests, H₂ Autotest on 1/4 ranks, CLI checks, and 1–4-rank DM/Tr(DS) comparisons. Si64 HSE with GPU EXX/Libxc agrees in energy, DM and forces. Coverage includes full/subset solves, fractional/signed occupations, buffer lifetime and aliasing, partial distribution blocks, and failure exits.
Verification commands
All passed; Autotest also passed with
-n 1(SELECTED.txtcontainsscf_dm_gpu). Full regression, MD/relax and other GPU architectures were outside this focused validation.Linked Issue
No separate issue; this extends the existing LCAO CUDA backend.
Governance Notes
No new INPUT parameter, CMake option or dependency. No documentation update required: this optimizes the existing GPU workflow. HSolver retains eigenvectors through occupation and DM construction. Added headers declare interface types; no global dependency increase or governance exception.