Skip to content

SCF results depend on the number of MPI processes (007_PW_UPF201_USPP_Fe, nspin=2, kpar>1) #7824

Description

@chengleizheng

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)

  • Verify the issue is not a duplicate.
  • Describe the bug.
  • Steps to reproduce.
  • Expected behavior.
  • Error message.
  • Environment details.
  • Additional context.
  • Assign a priority level (low, medium, high, urgent).
  • Assign the issue to a team member.
  • Label the issue with relevant tags.
  • Identify possible related issues.
  • Create a unit test or automated test to reproduce the bug (if applicable).
  • Fix the bug.
  • Test the fix.
  • Update documentation (if necessary).
  • Close the issue and inform the reporter (if applicable).

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugsBugs that only solvable with sufficient knowledge of DFT

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions