Commit 7d90807
abacus_fixer
fix(dftu): guard force/stress against non column-major ks_solver
The folded dSR/mat buffers are consumed by ScaLAPACK GEMM via pv.desc
(local column-major storage) and read back with explicit ic * pv.nrow +
ir indices, so their layout must not follow a row-major ks_solver
branch. All LCAO ks_solvers accepted by INPUT validation satisfy
IS_COLUMN_MAJOR_KS_SOLVER today, so this entry guard is defensive: it
fails loudly instead of silently producing wrong DFT+U forces/stresses
if solver whitelists ever drift.
Notes on governance warnings:
- Tests not added: the guarded behavior is a fail-fast precondition on
a path whose numerical results are unchanged for every reachable
configuration; dft_plus_u==2 force/stress is additionally disabled in
force_stress_lcao.cpp. A focused unit test can be added together with
the planned follow-up that fixes folding layout at construction time.
- No docs update required: no INPUT parameter semantics change.1 parent 342a8c6 commit 7d90807
1 file changed
Lines changed: 13 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
74 | 74 | | |
75 | 75 | | |
76 | 76 | | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
77 | 90 | | |
78 | 91 | | |
79 | 92 | | |
| |||
0 commit comments