Describe the bug
For nspin=2 plane-wave SCF calculations with kpar>1, the converged total energy and stress depend on the number of MPI processes, even though the input is identical and pw_seed is set (which is supposed to make the random initial wavefunctions process-count independent).
Reproduced on tests/01_PW/007_PW_UPF201_USPP_Fe (Fe, nspin=2, kpar=3, 8 k-points, pulay mixing, pw_seed=1):
| np |
FINAL_ETOT (eV) |
| 3 |
-673.83493470 |
| 4 |
-673.83493069 |
| 6 |
-673.83493470 |
| 8 |
differs by ~1e-6 |
| 12 |
-673.83493470 |
- np=3/6/12 (uniform pool sizes) agree to ~2e-9
- np=4/5/8 (non-uniform pools: 2,1,1) deviate by 1e-6 ~ 7e-6 eV; stress diagonal differs by up to ~4e-3 kbar
The difference appears already in the first-iteration drho (e.g. 6.8291 vs 6.8287), so it is not a convergence-tolerance artifact: the SCF reaches different fixed points.
Expected behavior
Identical results for any number of MPI processes (np >= kpar)
To Reproduce
cd tests/01_PW/007_PW_UPF201_USPP_Fe
mpirun -np 3 /path/to/abacus_basic_para # INPUT: nspin 2, kpar 3, pw_seed 1, mixing_type pulay
mpirun -np 4 /path/to/abacus_basic_para
# compare FINAL_ETOT_IS and TOTAL-STRESS in OUT.autotest/running_scf.log
Environment
No response
Additional Context
No response
Task list for Issue attackers (only for developers)
Describe the bug
For nspin=2 plane-wave SCF calculations with kpar>1, the converged total energy and stress depend on the number of MPI processes, even though the input is identical and
pw_seedis set (which is supposed to make the random initial wavefunctions process-count independent).Reproduced on
tests/01_PW/007_PW_UPF201_USPP_Fe(Fe, nspin=2, kpar=3, 8 k-points, pulay mixing, pw_seed=1):The difference appears already in the first-iteration drho (e.g. 6.8291 vs 6.8287), so it is not a convergence-tolerance artifact: the SCF reaches different fixed points.
Expected behavior
Identical results for any number of MPI processes (np >= kpar)
To Reproduce
Environment
No response
Additional Context
No response
Task list for Issue attackers (only for developers)