Skip to content

[GPU] Stress deviates 9-16 kbar from CPU during cell relaxation (063-071_PW_CR_*) #7769

Description

@chengleizheng

Describe the bug

Cell-relaxation calculations (calculation = cell-relax, PW basis) produce incorrect stress on GPU, deviating 9-16 kbar from the CPU reference values. All 8 affected Autotest cases fail the fatal stress threshold (1.0 kbar), while the same cases pass on CPU. The total energy is also slightly off (~0.07-0.12 eV, below the energy threshold).

-----AUTO TESTS OF ABACUS ------
ABACUS path: /home/chenglei/abacus-develop/build/abacus_basic_gpu
Number of processes: 1
Number of threads: 32
Test accuracy totenergy: 0.0000001 eV
Test accuracy force: 0.0001
Test accuracy stress: 0.001
Test accuracy descriptor mean: 0.00001
Check accuaracy: 8
Test cases file: /dev/fd/63
Test cases regex: ^[^#].*_.*$
Generate reference:
--------------------------------

[ RUN      ] 063_PW_CR/
[----------] test cell-relax for atom can't move
[WARNING   ]  etotref cal=-211.70534065 ref=-211.82472548 deviation=-0.11938483
[WARNING   ]  etotperatomref cal=-105.85267033 ref=-105.91236274 deviation=-0.05969241
[      OK  ]  totalforceref
[WARNING   ]  totalstressref cal=326.37258000 ref=342.18834900 deviation=15.81576900
[ERROR      ]  An unacceptable deviation occurs.
[----------] Time elapsed: 6.899 seconds

[WARNING]    1 test cases out of 5 failed.
063_PW_CR/
[ERROR     ] 1 test cases out of 5 produced fatal error.
063_PW_CR/
[ERROR     ] Fatal deviation details:
063_PW_CR/: totalstressref cal=326.37258000 ref=342.18834900 deviation=15.81576900

Expected behavior

GPU cell-relaxation should reproduce the CPU stress within the Autotest tolerance (1.0 kbar), like the atomic-relaxation-only case 066_PW_CR_fix_abc does.

To Reproduce

No response

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 DFTGPU & DCU & HPCGPU and DCU and HPC related any issues

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions