Skip to content

Fix WT KEDF CUDA reciprocal-space indexing - #7763

Merged
mohanchen merged 1 commit into
deepmodeling:developfrom
Stardust0831:fix/wt-kedf-gpu-numerics
Aug 2, 2026
Merged

Fix WT KEDF CUDA reciprocal-space indexing#7763
mohanchen merged 1 commit into
deepmodeling:developfrom
Stardust0831:fix/wt-kedf-gpu-numerics

Conversation

@Stardust0831

@Stardust0831 Stardust0831 commented Aug 2, 2026

Copy link
Copy Markdown
Collaborator

Reminder

  • I have read AGENTS.md and docs/developers_guide/agent_governance.md.
  • I have linked an issue or explained why this PR does not need one.
  • I have added adequate unit tests and/or case tests, or explained why not.
  • I have listed the exact verification commands run and their results.
  • I have described user-visible behavior changes, including INPUT parameter changes.
  • I have explained core-module impact for ESolver, HSolver, ElecState, Hamilt, Operator, Psi, or other source/ changes.
  • I have requested any needed governance exception below.

Linked Issue

No separate issue. This fixes the WT KEDF CUDA numerical regression introduced by #7448.

Unit Tests and/or Case Tests for my changes

  • Existing coverage: tests/07_OFDFT/31_OF_KE_WT_GPU directly compares GPU WT energy, force, stress, and symmetry results with the CPU reference, so no new case or reference change is needed.
  • Verification: CUDA build passed on Slurm job 748919. The single-rank 07_OFDFT/31_OF_KE_WT_GPU case passed all seven checks on Slurm job 748921: total energy -57.9338551428 eV, total force 0, and total stress 29.613417 kbar.
  • Checks not run, with reason: no non-cubic or nspin > 1 WT CUDA integration case currently exists. The FFT dimension order was checked against the established FFT_CUDA and ig2ixyz_gpu layout.

What's changed?

  • Apply each WT kernel value to its mapped full-box FFT coefficient through ig2ixyz_gpu, instead of assuming plane waves occupy the first npw FFT entries.
  • Zero coefficients outside the selected plane-wave basis before the inverse FFT.
  • Use the same (nx, ny, nz) cuFFT dimension order as ABACUS FFT_CUDA.

Governance Notes

  • INPUT/docs changes: none. This restores the documented device gpu WT result and changes no parameter or interface.
  • Core module impact: limited to the CUDA implementation of the WT KEDF convolution. CPU and other KEDF paths are unchanged.
  • Exceptions requested: none.

@Stardust0831
Stardust0831 requested a review from sunliang98 August 2, 2026 10:34
@mohanchen mohanchen added Bugs Bugs that only solvable with sufficient knowledge of DFT Refactor Refactor ABACUS codes labels Aug 2, 2026
@mohanchen
mohanchen merged commit 4261f5e into deepmodeling:develop Aug 2, 2026
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Bugs Bugs that only solvable with sufficient knowledge of DFT Refactor Refactor ABACUS codes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants