Skip to content

Refactor: Remove obsolete cg_in_lcao code - #7870

Merged
mohanchen merged 2 commits into
deepmodeling:developfrom
AsTonyshment:refactor/cg_in_lcao
Aug 28, 2026
Merged

Refactor: Remove obsolete cg_in_lcao code#7870
mohanchen merged 2 commits into
deepmodeling:developfrom
AsTonyshment:refactor/cg_in_lcao

Conversation

@AsTonyshment

@AsTonyshment AsTonyshment commented Aug 28, 2026

Copy link
Copy Markdown
Collaborator

What's changed?

ks_solver=cg_in_lcao was introduced in #3473 but was later removed in #5257. There are still some dead code, which is rather misleading. This PR aims to remove these obsolete cg_in_lcao code.

  • Reject the unsupported ks_solver=cg_in_lcao value during INPUT validation.
  • Remove its stale matrix-layout, SCF-label, density-matrix, and iterative-diagonalization branches.
  • Remove the unused LCAO CG thresholds and HSolverLCAO device template parameter left by the old implementation.
  • Restore the MPI/serial separation of density-matrix multiplication helpers.

User-visible behavior

LCAO inputs using cg_in_lcao now fail during input validation instead of reaching unsupported or unsafe downstream paths. Supported LCAO solvers are unaffected. The generated parameter documentation is unchanged because this value was never documented as supported.

@AsTonyshment
AsTonyshment requested a review from mohanchen August 28, 2026 04:09
@mohanchen mohanchen added Refactor Refactor ABACUS codes Diago Issues related to diagonalizaiton methods labels Aug 28, 2026
@mohanchen

Copy link
Copy Markdown
Collaborator

We may need CG iteration solvers for LCAO codes in future.

@mohanchen
mohanchen merged commit e461ffd into deepmodeling:develop Aug 28, 2026
18 checks passed
@AsTonyshment

Copy link
Copy Markdown
Collaborator Author

We may need CG iteration solvers for LCAO codes in future.

Yes, we can add related code back in the future when it's fully ready. As for now, I found it sometimes very misleading, especially for coding agents (they always tell me that cg_in_lcao is not considered, while I found that this method is not usable at all).

@AsTonyshment
AsTonyshment deleted the refactor/cg_in_lcao branch August 28, 2026 06:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Diago Issues related to diagonalizaiton methods Refactor Refactor ABACUS codes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants