Skip to content

Resolve build error when scalapack isn't installed - #228

Merged
mgates3 merged 5 commits into
icl-utk-edu:masterfrom
axiomwang:master
Aug 27, 2026
Merged

mgates3 merged 5 commits into
icl-utk-edu:masterfrom
axiomwang:master

Conversation

@axiomwang

@axiomwang axiomwang commented Jul 23, 2026 •

Copy link
Copy Markdown
Contributor

Set SCALAPACK_LIBRARIES = "none" if ScaLapack isn't installed before building this library to prevent compiling error.

@mgates3

mgates3 commented Jul 27, 2026 •

Copy link
Copy Markdown
Collaborator

I don't think this PR is correct. The default should be to look for -lscalapack. If we look for scalapack and don't find it, then perhaps we can fall back to setting it to none.

@axiomwang

Copy link
Copy Markdown
Contributor Author

I don't this PR is correct. The default should be to look for -lscalapack. If we look for scalapack and don't find it, then perhaps we can fall back to setting it to none.

I see, I'll change the configuration logic as you mentioned.

Btw, since Slate's goal to replace Sealapack, why it needs sealapack to build?

@mgates3

mgates3 commented Jul 28, 2026

Copy link
Copy Markdown
Collaborator

SLATE doesn't need ScaLAPACK, but it's useful for comparison. Some routines (like norms) have no residual check, so the only way to check results is to compare with another implementation. Ironically, we've found bugs in ScaLAPACK by doing this.

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

Looks like a great addition. Just a minor change and a question.

Comment thread test/CMakeLists.txt Outdated
Comment thread test/CMakeLists.txt Outdated
Copilot AI lite review requested due to automatic review settings August 4, 2026 23:20

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR updates the CMake configuration for the test targets to better detect ScaLAPACK (and fall back to disabling it) so builds don’t fail on systems where ScaLAPACK isn’t installed.

Changes:

  • Add ScaLAPACK detection logic in test/CMakeLists.txt, falling back to SCALAPACK_LIBRARIES="none" when not found.
  • Enable CMAKE_EXPORT_COMPILE_COMMANDS globally in the top-level CMakeLists.txt.

Reviewed changes

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

File Description
test/CMakeLists.txt Adds ScaLAPACK discovery via find_package/find_library and disables ScaLAPACK when not present.
CMakeLists.txt Forces compile database generation via CMAKE_EXPORT_COMPILE_COMMANDS.

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

Comment thread test/CMakeLists.txt
Comment thread CMakeLists.txt Outdated
@axiomwang
axiomwang requested a review from mgates3 August 4, 2026 23:24
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@mgates3 mgates3 changed the title Resolve build error when sealapack isn't installed Resolve build error when scalapack isn't installed Aug 6, 2026
Comment thread CMakeLists.txt Outdated
Removed the setting for CMAKE_EXPORT_COMPILE_COMMANDS.
@axiomwang
axiomwang requested a review from mgates3 August 6, 2026 23:24
@mgates3
mgates3 merged commit 878439b into icl-utk-edu:master Aug 27, 2026
8 checks passed
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.

3 participants