Commit 049e406
committed
fix: allocate 4x uom_array/uom_save size for nspin=4
Root cause: In dftu.cpp::init(), pot_index was not multiplied for nspin=4.
This caused eff_pot_pw, uom_array, and uom_save to be allocated with size
for nspin=1, while cal_occ_pw and copy_locale tried to write 4x that amount.
Fix: Add 'else if (nspin == 4) pot_index *= 4;' to match the interleaved
spinor storage requirement.
Also confirmed MPI-2 runs for 223/224/265 are stable (no crashes).1 parent 55b7dac commit 049e406
3 files changed
Lines changed: 504 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
170 | 170 | | |
171 | 171 | | |
172 | 172 | | |
173 | | - | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
174 | 176 | | |
175 | 177 | | |
176 | 178 | | |
| |||
0 commit comments