Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[4.3.x] misc: fixes for C++ bindings and handle conversion ABI #7248

Open
wants to merge 2 commits into
base: 4.3.x
Choose a base branch
from

Conversation

raffenet
Copy link
Contributor

@raffenet raffenet commented Dec 20, 2024

Pull Request Description

Cherry picks from #7239 and #7244.

Author Checklist

  • Provide Description
    Particularly focus on why, not what. Reference background, issues, test failures, xfail entries, etc.
  • Commits Follow Good Practice
    Commits are self-contained and do not do two things at once.
    Commit message is of the form: module: short description
    Commit message explains what's in the commit.
  • Passes All Tests
    Whitespace checker. Warnings test. Additional tests via comments.
  • Contribution Agreement
    For non-Argonne authors, check contribution agreement.
    If necessary, request an explicit comment from your companies PR approval manager.

raffenet and others added 2 commits December 20, 2024 10:04
In C++ mode we try to include <cstdint> so we can annotate fixed-width
integer types, but doing so within an extern C block can cause an
error. Move these header includes outside of extern C to avoid the
issue. Observed on macOS with Xcode 16.2 and CXXFLAGS=-std=gnu++20:

/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/__assertion_handler:29:1: error: templates must have C++ linkage
   29 | template <class T>
      | ^~~~~~~~~~~~~~~~~~
./src/include/mpi.h:60:1: note: extern "C" language linkage specification begins here
   60 | extern "C" {
      | ^
1 error generated.
MPI 4.1 requires the f2c/c2f apis as real functions -- symbols in
libmpi.so. However, they are macros in the current MPICH ABI. Adding
these macros back into mpi.h allows the appliation build with MPICH to
be backward ABI compatible. Meantime, the real symbols are available for
applications that needs them.
@raffenet
Copy link
Contributor Author

test:mpich/ch4/most
test:mpich/ch3/most

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.

2 participants