Skip to content

Add gtest support for Sunway builds#7197

Open
A-006 wants to merge 7 commits intodeepmodeling:developfrom
A-006:scal
Open

Add gtest support for Sunway builds#7197
A-006 wants to merge 7 commits intodeepmodeling:developfrom
A-006:scal

Conversation

@A-006
Copy link
Copy Markdown
Collaborator

@A-006 A-006 commented Mar 31, 2026

Summary:

  • Add a Sunway-specific gtest build script and documentation under tools.
  • Update CMake test definitions to better handle Sunway constraints and selective test enabling.
  • Register additional unit test CMakeLists for hsolver and LCAO RT modules.

Files Changed:

  • CMakeLists.txt
  • source/source_base/module_container/ATen/kernels/test/CMakeLists.txt
  • source/source_base/module_container/test/CMakeLists.txt
  • source/source_hsolver/test/CMakeLists.txt
  • source/source_lcao/module_rt/test/CMakeLists.txt
  • tools/README.md
  • tools/gtest_on_sunway/gtest_on_sunway.sh

Testing:

  • Not run (please confirm if you ran any tests)

Copilot AI review requested due to automatic review settings March 31, 2026 11:43
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds infrastructure to enable building/running GoogleTest-based unit tests on Sunway (USE_SW) builds, while selectively disabling known-problematic tests and aligning link dependencies for the platform.

Changes:

  • Add a Sunway-focused script and tooling docs for building ABACUS with a local/offline GoogleTest.
  • Adjust CMake test registration to skip specific unit test targets on USE_SW.
  • Refactor USE_SW math/ScaLAPACK linkage setup to better unify dependencies across main targets and tests.

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
CMakeLists.txt Appends Sunway math libs to math_libs and introduces a USE_SW ScaLAPACK::ScaLAPACK fallback target.
source/source_base/module_container/ATen/kernels/test/CMakeLists.txt Skips container kernel unit tests on USE_SW.
source/source_base/module_container/test/CMakeLists.txt Skips container unit tests on USE_SW.
source/source_hsolver/test/CMakeLists.txt Skips a subset of HSOLVER tests on USE_SW (with a warning).
source/source_lcao/module_rt/test/CMakeLists.txt Skips RT-TDDFT unit tests on USE_SW.
tools/README.md Documents the new gtest_on_sunway tooling directory.
tools/gtest_on_sunway/gtest_on_sunway.sh New script to build/install local GoogleTest and configure ABACUS tests offline.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

A-006 and others added 5 commits March 31, 2026 19:49
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
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.

2 participants