Skip to content

refactor: use explicit types in INPUT, Wannier, LCAO radial tables and CUDA - #8391

Merged
mohanchen merged 5 commits into
deepmodeling:developfrom
Stardust0831:refactor/input-wannier-lcao-cuda-types
Nov 25, 2026
Merged

mohanchen merged 5 commits into
deepmodeling:developfrom
Stardust0831:refactor/input-wannier-lcao-cuda-types

Conversation

@Stardust0831

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

This local declaration cleanup has no separate issue.

Unit Tests and/or Case Tests for my changes

  • On both the base and this commit, OMP_NUM_THREADS=1 ./input-tests passed 53/53 and OMP_NUM_THREADS=1 OPENBLAS_NUM_THREADS=1 ./radial-tests passed 4/4 with FFTW3 enabled.
  • Compiled the eight affected CPU production translation units with the same source paths, flags and GCC 13.3 toolchain on both revisions. cmp found every object byte-identical. nm -C --defined-only to_w90_lcao_io.o confirmed all three write_spn specializations were present.
  • Compiled kedf_wt_gpu.cu with CUDA 12.9.86 and GCC 12.4 using nvcc -std=c++14 --gpu-architecture=sm_70 --frandom-seed=42 -D__CUDA -D__FFTW3. cmp base.ptx head.ptx and cmp base.stripped.o head.stripped.o passed after objcopy --strip-debug on the objects. Coverage was limited to host unit tests and code generation. A full MPI calculation, GPU execution and HIP build were outside these checks.

What's changed?

Spell out the existing C++ types in 50 local declarations across four commits. INPUT reading, validation, help and tests account for 33. Wannier spin output accounts for four, the LCAO two-center radial tables for 12, and the CUDA Wang-Teter filtered-buffer pointer for one. The declarations preserve value copies, references, iterator constness and shared ownership.

Governance Notes

No documentation update required because the change only spells out local types. INPUT metadata, output formats and interfaces retain their existing behavior. No governance exception is needed.

@mohanchen mohanchen added the Refactor Refactor ABACUS codes label Nov 25, 2026
@mohanchen
mohanchen merged commit 68da826 into deepmodeling:develop Nov 25, 2026
19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Refactor Refactor ABACUS codes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants