Skip to content

Disable legacy MPI C++ bindings for SuperLU_DIST - #367

Closed
zwx19961130 wants to merge 1 commit into
GEOS-DEV:masterfrom
zwx19961130:fix-superlu-mpi-cxx-bindings
Closed

zwx19961130 wants to merge 1 commit into
GEOS-DEV:masterfrom
zwx19961130:fix-superlu-mpi-cxx-bindings

Conversation

@zwx19961130

Copy link
Copy Markdown

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() and ompi_mpi_cxx_op_intercept into the static SuperLU_DIST library, causing downstream static linking failures.

Set MPI_CXX_SKIP_MPICXX=ON for the SuperLU_DIST CMake configuration. CMake's FindMPI then supplies the appropriate definitions for the MPI implementation instead of hard-coding OpenMPI-specific compiler definitions.

Testing

Built and installed the superlu_dist target successfully with OpenMPI.

Verified that CMake configured:

MPI_CXX_SKIP_MPICXX:BOOL=ON

and generated:

MPI_CXX_COMPILE_DEFINITIONS=MPICH_SKIP_MPICXX;OMPI_SKIP_MPICXX;_MPICC_H

Also 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.

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

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 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=ON in the SuperLU_DIST ExternalProject_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.

@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