Skip to content

test: consolidate NAO GPU integration cases into 02 and 03 - #8198

Merged
mohanchen merged 2 commits into
deepmodeling:developfrom
GenZeal-Lin:chore/merge-nao-gpu-tests
Oct 23, 2026
Merged

mohanchen merged 2 commits into
deepmodeling:developfrom
GenZeal-Lin:chore/merge-nao-gpu-tests

Conversation

@GenZeal-Lin

@GenZeal-Lin GenZeal-Lin commented Oct 22, 2026 •

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.

Linked Issue

No separate issue is linked. This PR consolidates the existing NAO GPU integration tests following maintainer guidance, without introducing new numerical functionality.

Unit Tests and/or Case Tests for my changes

1. Full GPU integration validation

The full GPU integration tests were executed on an offline workstation with two NVIDIA GeForce RTX 4090 GPUs.

Tested source commit: 5db65e7bcd53cc496026b7cf87d58791bbaa1e6c

Executable SHA256: 4a5e6079253a5a5d3ecdb48eee3dcce6fb7c47eda937445f0f2b0e4554906a56

Execution environment:

  • MPI processes: 2
  • OpenMP threads: 1
  • CUDA_VISIBLE_DEVICES=0,1
  • CUDA-enabled abacus_basic_gpu executable

Input preparation:

Before running the tests, all selected INPUT files were explicitly configured with device gpu, following the preparation logic in .github/workflows/cuda.yml.

The tests were executed from an isolated validation copy of the 02/03 test suites, with the matching PP_ORB pseudopotential and orbital resources made available through a local symbolic link.

The validation script confirmed that all 93 selected cases had device gpu configured. No committed INPUT files or reference results were modified.

Commands run:

# Environment
export OMP_NUM_THREADS=1
export CUDA_VISIBLE_DEVICES=0,1

# Preflight and complete GPU validation
bash "$CHECK/run-gpu-confirmed.sh"

# Executed separately for each suite:
bash ../integrate/Autotest.sh \
  -n 2 -o 1 -a "$BIN" -f CASES_GPU.txt

Result summary:

Test suite Cases passed Property checks passed
02_NAO_Gamma (GPU) 31/31 226
03_NAO_multik (GPU) 62/62 675
Total 93/93 901

Both newly retained migration cases passed:

  • 02_NAO_Gamma/scf_si2_tzdp_neq_spin2_gpu
  • 03_NAO_multik/scf_bisecuo_gpu

All entries in the corresponding test.sum files report a successful result (1).

The full execution logs, test summaries, tested commit identity, executable checksum, and input-validation script have been archived for reproducibility.

2. Slurm unit tests

Command run:

python3 -m unittest discover \
  -s .ci/slurm \
  -p 'test_runner.py' -v

Result: 45/45 tests passed.

3. Git and documentation checks

Commands run:

git diff --check
git diff 5db65e7bc HEAD --name-only

The final follow-up commit 523c3ffaf updates only .ci/slurm/README.md, correcting a stale case-number reference after renumbering.

The GPU integration results were obtained from the preceding tested source commit; the subsequent change is documentation-only.

Checks not run:

  • The trusted-controls pre-merge Slurm configuration was not independently validated in its mixed-version setup. The PR updates the Slurm configuration, but pre-merge jobs may still load trusted controls from upstream develop.
  • No GPU performance or kernel-level benchmarking was performed. The validation focuses on integration test execution and numerical regression.

What's changed?

This PR consolidates the NAO GPU integration tests into their corresponding existing test suites.

Test-suite consolidation

  • Remove the standalone 12_NAO_Gamma_GPU and 13_NAO_multik_GPU test directories.
  • Retain the four-element BiSeCuO GPU case in 03_NAO_multik/scf_bisecuo_gpu.
  • Retain the Si2 TZDP, non-equilibrium, spin-polarized GPU case in 02_NAO_Gamma/scf_si2_tzdp_neq_spin2_gpu.
  • Remove the remaining redundant standalone GPU cases.
  • Register the retained cases in the existing 02/03 CASES_GPU.txt lists.

CI and Slurm integration

  • Keep the existing 02/03 CUDA test entry points.
  • Remove obsolete standalone 12/13 references from the affected CI configuration.
  • Update the Slurm case mappings to refer to the consolidated 02/03 suites.
  • Remove obsolete Slurm case entries and maintain consistent numbering.
  • Update the corresponding Slurm test expectations.
  • Update test documentation, including the corrected case.032 reference in .ci/slurm/README.md.

Behavior

The existing 02/03 GPU regression workflows now cover the retained cases without requiring separate 12/13 test suites.

There are no changes to ABACUS numerical algorithms, physical models, or user-facing INPUT parameters.

Governance Notes

INPUT/docs changes:

  • Two representative GPU cases are retained under the existing 02/03 suites.
  • No new user-facing INPUT parameters are introduced.
  • Obsolete test-suite documentation is removed or updated.
  • The Slurm README case-number example is corrected.

Core module impact:

  • None. This PR does not modify source/, including ESolver, HSolver, ElecState, Hamilt, Operator, or Psi.

Slurm transition limitation:

  • Pre-merge GPU validation may use trusted Slurm controls from upstream develop with the PR source checkout.
  • The upstream controls may still refer to the removed 12/13 paths and therefore may not work with this PR checkout during the transition.
  • Matching-version Slurm configuration and the ordinary CUDA workflow are not affected by this specific mismatch.
  • A backward-compatible trusted-controls update may need to be coordinated separately with maintainers.

Smoke-test coverage:

  • The Slurm configuration intentionally keeps a reduced representative test matrix.
  • Broader NAO GPU regression coverage is provided through the existing CUDA workflows and 02/03 GPU case lists.
  • Additional Slurm representatives for real nspin=1 and complex nspin=2 calculations can be considered separately.

Exceptions requested:

  • None.

@ABACUS-PR-BOT ABACUS-PR-BOT 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.

Static review of 5db65e7. Both migrated cases preserve their inputs and references; the comments below are nonblocking. Static checks passed; no builds or GPU/runtime tests were performed for this review.

Non-blocking verification note: please include the device=gpu preparation used before the two reported Autotest commands. On the committed inputs, CASES_GPU.txt selects cases but does not change their device: 91 of the 93 entries otherwise use CPU. If inputs were prepared as in cuda.yml, recording that step and the tested SHA/executable identity would make the GPU result reproducible.

Comment thread .ci/slurm/config.ini
Comment thread .ci/slurm/config.ini
Comment thread .ci/slurm/config.ini
@GenZeal-Lin

Copy link
Copy Markdown
Author

Static review of 5db65e7. Both migrated cases preserve their inputs and references; the comments below are nonblocking. Static checks passed; no builds or GPU/runtime tests were performed for this review.

Non-blocking verification note: please include the device=gpu preparation used before the two reported Autotest commands. On the committed inputs, CASES_GPU.txt selects cases but does not change their device: 91 of the 93 entries otherwise use CPU. If inputs were prepared as in cuda.yml, recording that step and the tested SHA/executable identity would make the GPU result reproducible.

Thanks for catching this. You're right that the original manual integration runs did not reproduce the device gpu preparation step from cuda.yml, so the reported 93 passing cases do not by themselves establish full GPU-path coverage.

I will rerun both suites with device gpu explicitly set for every selected case, using the CUDA-enabled executable from the tested commit. I will also record the commit SHA, executable SHA256, exact commands, and updated test results in the PR description.

@mohanchen mohanchen added GPU & DCU & HPC GPU and DCU and HPC related any issues Tests/Examples Issues/PR related to unit tests and integrate tests labels Oct 23, 2026
@GenZeal-Lin

Copy link
Copy Markdown
Author

Static review of 5db65e7. Both migrated cases preserve their inputs and references; the comments below are nonblocking. Static checks passed; no builds or GPU/runtime tests were performed for this review.

Non-blocking verification note: please include the device=gpu preparation used before the two reported Autotest commands. On the committed inputs, CASES_GPU.txt selects cases but does not change their device: 91 of the 93 entries otherwise use CPU. If inputs were prepared as in cuda.yml, recording that step and the tested SHA/executable identity would make the GPU result reproducible.

Thanks for catching the missing GPU input preparation step.

I have rerun the complete 02/03 NAO GPU integration suites using the CUDA-enabled executable from commit 5db65e7bc, with device gpu explicitly set in all 93 selected INPUT files, following the preparation logic in cuda.yml.

The rerun completed successfully:

  • 02_NAO_Gamma: 31/31 cases, 226 property checks passed.
  • 03_NAO_multik: 62/62 cases, 675 property checks passed.
  • Total: 93/93 cases, 901 property checks passed.

The validation was performed on a workstation with two RTX 4090 GPUs, using 2 MPI processes and 1 OpenMP thread.

I have updated the PR description with the tested commit, executable SHA256, input preparation, exact commands, and results. The full logs and test summaries have also been archived.

Thanks again for helping improve the reproducibility of this PR.

@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 merged commit 89595dd into deepmodeling:develop Oct 23, 2026
19 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.

3 participants