Disable legacy MPI C++ bindings for SuperLU_DIST - #367
Closed
zwx19961130 wants to merge 1 commit into
Closed
zwx19961130 wants to merge 1 commit into
zwx19961130 wants to merge 1 commit into
Conversation
There was a problem hiding this comment.
🟢 Approval recommended
The change is minimal, localized to SuperLU_DIST’s external CMake configuration, and directly addresses the documented OpenMPI static-linking failure mode without introducing broader behavioral risk.
Pull request overview
This PR updates the SuperLU_DIST external build configuration to avoid linking against the legacy MPI C++ bindings (notably affecting OpenMPI static-link scenarios), by ensuring CMake’s FindMPI injects the correct “skip MPICXX” compile definitions during configuration.
Changes:
- Set
MPI_CXX_SKIP_MPICXX=ONin the SuperLU_DISTExternalProject_Add()CMake configuration to disable legacy MPI C++ bindings during SuperLU_DIST builds.
File summaries
| File | Description |
|---|---|
| CMakeLists.txt | Adds -D MPI_CXX_SKIP_MPICXX=ON to the SuperLU_DIST external CMake configuration to prevent legacy MPI C++ binding symbols from entering the static library. |
Review details
- Files reviewed: 1/1 changed files
- Comments generated: 0
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Contributor
|
Fixed in #362, thank you! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Disable the legacy MPI C++ bindings when building SuperLU_DIST.
SuperLU_DIST uses MPI from C++ sources. With OpenMPI, the legacy MPI C++ bindings can introduce references such as
MPI::Comm::Comm()andompi_mpi_cxx_op_interceptinto the static SuperLU_DIST library, causing downstream static linking failures.Set
MPI_CXX_SKIP_MPICXX=ONfor the SuperLU_DIST CMake configuration. CMake'sFindMPIthen supplies the appropriate definitions for the MPI implementation instead of hard-coding OpenMPI-specific compiler definitions.Testing
Built and installed the
superlu_disttarget successfully with OpenMPI.Verified that CMake configured:
MPI_CXX_SKIP_MPICXX:BOOL=ONand generated:
MPI_CXX_COMPILE_DEFINITIONS=MPICH_SKIP_MPICXX;OMPI_SKIP_MPICXX;_MPICC_HAlso verified that the resulting static library contains no legacy MPI C++ binding references with:
nm -C libsuperlu_dist.a | grep -E 'MPI::|ompi_mpi_cxx'which produced no output.