Skip to content

CMake: build serial unit tests without MPI - #7836

Open
Stardust0831 wants to merge 1 commit into
deepmodeling:developfrom
Stardust0831:serial-tests-no-mpi
Open

CMake: build serial unit tests without MPI#7836
Stardust0831 wants to merge 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant