Skip to content

Fix HypreDrive linking with static HYPRE - #366

Closed
zwx19961130 wants to merge 1 commit into
GEOS-DEV:masterfrom
zwx19961130:fix-hypredrive-static-hypre-deps
Closed

zwx19961130 wants to merge 1 commit into
GEOS-DEV:masterfrom
zwx19961130:fix-hypredrive-static-hypre-deps

Conversation

@zwx19961130

Copy link
Copy Markdown

Summary

Fix HypreDrive linking when HYPRE is built as a static library with SuperLU_DIST support.

When SuperLU_DIST is enabled, HYPRE's static library requires additional transitive dependencies that are not currently passed to HypreDrive. This causes the hypredrive-cli link step to fail.

Add SuperLU_DIST, ParMETIS, METIS, and the C++ standard library to HYPREDRV_HYPRE_LIBRARIES when MPI and SuperLU_DIST are enabled.

Testing

Built the hypredrive target with MPI and SuperLU_DIST enabled.

Without these additional libraries, the HypreDrive executable fails during linking due to unresolved dependencies from static HYPRE.

With the additional dependencies, hypredrive-cli links successfully and the hypredrive target builds and installs successfully.

Copilot AI lite review requested due to automatic review settings September 7, 2026 23:25

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.

🟡 Changes recommended

The new link list hard-codes stdc++ and duplicates ParMETIS/METIS path construction, which can break portability and maintainability and should be adjusted before approval.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Pull request overview

This PR updates the superbuild configuration so HypreDrive can link successfully when HYPRE is built as a static library with SuperLU_DIST enabled, by ensuring HypreDrive receives the additional transitive link dependencies required by static HYPRE in that configuration.

Changes:

  • Extend HYPREDRV_HYPRE_LIBRARIES to include SuperLU_DIST, ParMETIS, METIS, and the C++ standard library when ENABLE_MPI and ENABLE_SUPERLU_DIST are enabled.
File summaries
File Description
CMakeLists.txt Adds additional transitive link libraries to the HypreDrive external project configuration for static HYPRE + SuperLU_DIST builds
Review details
  • Files reviewed: 1/1 changed files
  • Comments generated: 1
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread CMakeLists.txt

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.

🟢 Approval recommended

The change is narrowly scoped to the HypreDrive link library list and aligns with the stated goal of fixing static-HYPRE transitive dependency linkage for MPI+SuperLU_DIST builds.

Review details
  • Files reviewed: 1/1 changed files
  • Comments generated: 0 new
  • Review effort level: Lite

@victorapm

Copy link
Copy Markdown
Contributor

Fixed in #362, thank you!

@victorapm victorapm closed this Sep 8, 2026
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