Skip to content

test: add LibXC and noncollinear Gint CUDA regression cases - #8217

Merged
mohanchen merged 1 commit into
deepmodeling:developfrom
GenZeal-Lin:test/add-nao-libxc-gint-gpu-regression
Oct 25, 2026
Merged

mohanchen merged 1 commit into
deepmodeling:developfrom
GenZeal-Lin:test/add-nao-libxc-gint-gpu-regression

Conversation

@GenZeal-Lin

Copy link
Copy Markdown

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 (none required).

Linked Issue

No new issue is required. This PR extends GPU regression coverage for existing NAO integration cases.

Related PRs:

The changes build on these previously merged contributions without modifying their implementation.

Unit Tests and/or Case Tests for my changes

Local GPU validation environment

  • GPU: 2 × NVIDIA GeForce RTX 4090
  • ABACUS: CUDA-enabled build with LibXC enabled
  • MPI processes: 2
  • OpenMP threads: 1
  • Concurrent test cases: 1

Commands run

The existing 02_NAO_Gamma and 03_NAO_multik GPU regression suites were executed separately in an isolated validation directory using:

export OMP_NUM_THREADS=1
export CUDA_VISIBLE_DEVICES=0,1

bash ../integrate/Autotest.sh \
  -n 2 -o 1 -a "$BIN" -f CASES_GPU.txt

Here, BIN points to the previously validated CUDA/LibXC-enabled ABACUS executable. All registered test INPUT files in the validation directory were configured with device gpu.

Result summary

Test suite Cases passed Numerical checks passed
02_NAO_Gamma 32/32 230
03_NAO_multik 65/65 689
Total 97/97 919

All four newly registered cases passed:

  • 02_NAO_Gamma/scf_metagga
  • 03_NAO_multik/scf_out_chg_tau
  • 03_NAO_multik/scf_nspin4_nsoc_hr
  • 03_NAO_multik/scf_nspin4_soc_hr

The final test.sum files were checked to confirm that all 97 registered cases had successful results, including all four new entries.

Checks not run, with reason

  • The GitHub CUDA CI container build and GPU regression workflow have not yet been verified for this PR. These checks will be validated by GitHub Actions.
  • The local validation reused an existing CUDA/LibXC-enabled executable rather than rebuilding inside the GitHub CI container.

What's changed?

This PR extends CUDA regression coverage for four existing numerical atomic orbital (NAO) integration cases.

1. Register existing NAO cases for GPU regression

Add scf_metagga to:

  • tests/02_NAO_Gamma/CASES_GPU.txt

Add the following cases to:

  • tests/03_NAO_multik/CASES_GPU.txt
    • scf_out_chg_tau
    • scf_nspin4_nsoc_hr
    • scf_nspin4_soc_hr

These additions cover SCAN/meta-GGA calculations, charge/kinetic-energy-density output, and noncollinear Hamiltonian output with and without spin-orbit coupling.

2. Enable LibXC in the CUDA workflow

Add -DENABLE_LIBXC=ON to the CMake configuration in .github/workflows/cuda.yml.

This is required for running the SCAN/meta-GGA regression cases in the CUDA workflow, since LibXC is disabled by default in the ABACUS CMake configuration.

3. Reuse the existing GPU test infrastructure

The CUDA workflow already prepares NAO test INPUT files with device gpu and invokes Autotest.sh using CASES_GPU.txt. No additional workflow jobs or test directories are introduced.

4. Preserve existing reference data

No test INPUT files, physical parameters, numerical reference values, or property comparison tools are modified by this PR.

Governance Notes

INPUT/docs changes

  • No committed INPUT parameter changes.
  • No changes to INPUT parsing, defaults, or user-facing parameter behavior.
  • Existing CUDA workflow preparation sets device gpu for the registered test cases.
  • No INPUT documentation regeneration is required.

Core module impact

  • No changes to source/.
  • No changes to ESolver, HSolver, ElecState, Hamilt, Operator, Psi, or other core computational modules.
  • The impact is limited to GPU test registration and CUDA CI build configuration.

Exceptions requested

None.

Expected outcome

The existing CUDA CI workflow will continuously check the four additional NAO regression cases, helping detect future regressions in LibXC/meta-GGA support and noncollinear Gint Hamiltonian assembly on GPU.

The GitHub-hosted CUDA workflow result remains subject to PR CI verification.

@mohanchen mohanchen left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@mohanchen mohanchen added Tests/Examples Issues/PR related to unit tests and integrate tests GPU & DCU & HPC GPU and DCU and HPC related any issues labels Oct 25, 2026
@mohanchen
mohanchen merged commit 8e20175 into deepmodeling:develop Oct 25, 2026
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

GPU & DCU & HPC GPU and DCU and HPC related any issues Tests/Examples Issues/PR related to unit tests and integrate tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants