Skip to content

CMake: build serial unit tests without MPI - #7836

Merged
mohanchen merged 1 commit into
deepmodeling:developfrom
Stardust0831:serial-tests-no-mpi
Aug 19, 2026
Merged

CMake: build serial unit tests without MPI#7836
mohanchen merged 1 commit into
deepmodeling:developfrom
Stardust0831:serial-tests-no-mpi

Conversation

@Stardust0831

@Stardust0831 Stardust0831 commented Aug 18, 2026

Copy link
Copy Markdown
Collaborator

Linked Issue

No linked issue. This PR corrects the CMake conditions that prevent serial unit tests from being built without MPI.

Unit Tests and/or Case Tests for my changes

  • Commands run: cmake -S . -B build -DBUILD_TESTING=ON -DENABLE_MPI=OFF; built the affected serial test targets; ran the focused CTest selection; git diff --check; repository governance check.
  • Result summary: All eight affected serial tests passed with MPI disabled; one existing benchmark test was skipped by its own guard.
  • Checks not run, with reason: MPI-dependent suites were not run because this change targets their existing ENABLE_MPI gating.

What's changed?

  • Register source_io/test_serial and plane-wave test_serial whenever BUILD_TESTING is enabled, independent of MPI.
  • Keep parallel, kernel, GPU, and mpirun-based suites behind ENABLE_MPI.
  • Enter source_cell/test for serial builds so its existing test-only cell_info object is available, while returning before the MPI-only tests when MPI is disabled.
  • Keep test source ownership in the existing test directories and leave production targets unchanged.

Governance Notes

  • INPUT/docs changes: None.
  • Core module impact: CMake test registration only; production code and production targets are unchanged.
  • Exceptions requested: None.

@mohanchen mohanchen added the Compile & CICD & Docs & Dependencies Issues related to compiling ABACUS label Aug 19, 2026

@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 258314a into deepmodeling:develop Aug 19, 2026
19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Compile & CICD & Docs & Dependencies Issues related to compiling ABACUS

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants