Skip to content

CMake: Remove FindPEXSI.cmake#7615

Open
Growl1234 wants to merge 1 commit into
deepmodeling:developfrom
Growl1234:cmake
Open

CMake: Remove FindPEXSI.cmake#7615
Growl1234 wants to merge 1 commit into
deepmodeling:developfrom
Growl1234:cmake

Conversation

@Growl1234

@Growl1234 Growl1234 commented Jul 8, 2026

Copy link
Copy Markdown

This PR removes the legacy FindPEXSI.cmake module and switches PEXSI discovery to the CMake config package provided by PEXSI itself.

The main changes are:

  • Require PEXSI 2.0.0 or newer for CMake builds with ENABLE_PEXSI=ON.
  • Use find_package(PEXSI 2.0.0 REQUIRED CONFIG) instead of the custom find module.
  • Link ABACUS against the imported PEXSI::PEXSI target, so PEXSI include directories, compile definitions, and transitive dependencies are propagated through target usage requirements.
  • Remove the manual PEXSI / SuperLU_DIST / ParMETIS / METIS library and include variables from the CMake build.
  • Update CI setup to provide the required package prefixes through CMAKE_PREFIX_PATH.
  • Update the installation documentation to describe the new CMAKE_PREFIX_PATH based workflow, and mention that Spack can be used to install PEXSI and its dependencies.

This fundamentally resolves #7572, as all environment variables except CMAKE_PREFIX_PATH are removed.

Possible breaking change

For CMake builds, the old variables PEXSI_DIR, ParMETIS_DIR, and SuperLU_DIST_DIR are no longer available for ABACUS CMake, because the custom module has been removed. Users building ABACUS with PEXSI support should now make sure that the PEXSI CMake config package is discoverable by adding PEXSI and its dependency prefixes to CMAKE_PREFIX_PATH if they're not installed at standard place like /usr or /usr/local.

Copilot AI review requested due to automatic review settings July 8, 2026 14:06

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@ZhouXY-PKU ZhouXY-PKU added the Compile & CICD & Docs & Dependencies Issues related to compiling ABACUS label Jul 9, 2026

@ZhouXY-PKU ZhouXY-PKU 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.

Dockerfile.intel is also need to get modified.

Comment thread CMakeLists.txt Outdated
@Growl1234

Copy link
Copy Markdown
Author

Dockerfile.intel is also need to get modified.

Thanks for the hint. Since CI test "Build extra component with Intel toolchain" has passed, I don't think it really needs modification due to the change here.

@Growl1234 Growl1234 force-pushed the cmake branch 2 times, most recently from 6966772 to 15da1aa Compare July 9, 2026 05:02

@QuantumMisaka QuantumMisaka 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.

PEXSI config-package compatibility review.

Comment thread CMakeLists.txt Outdated
@Growl1234 Growl1234 force-pushed the cmake branch 4 times, most recently from 7bffec9 to 462a1f8 Compare July 10, 2026 14:08
Comment thread CMakeLists.txt

@QuantumMisaka QuantumMisaka 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, and cmake_dependent_option fix need another PR

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.

[Code scan] Use the same SuperLU_DIST32_ROOT variable in CI path exports

4 participants