sandialabs / portals4

Portals is a low-level network API for high-performance networking on high-performance computing systems developed by Sandia National Laboratories, Intel Corporation, and the University of New Mexico. The Portals 4 Reference Implementation is a complete implementation of Portals 4, with transport over InfiniBand VERBS and UDP. Shared memory transport is available as an optimization, including Linux KNEM support. The Portals 4 reference implementation is supported on both modern 64 bit Linux and 64 bit Mac OS X. The reference implementation has been developed by Sandia National Laboratories, Intel Corporation, and System Fabric Works. For more information on the Portals 4 standard, please see the Portals 4 page.
https://www.sandia.gov/portals/
Other
36 stars 17 forks source link

Make portals4.h c++ compatible by default #86

Closed EloWork closed 2 years ago

EloWork commented 2 years ago

Trying to compile c++ with portals in it will result in an undefined reference error during link-time because the symbol names are different in C than C++. One can fix that by wrapping the #include in an extern C statement. However, it takes some digging to find that out. Usually, libraries take care of that themselves by wrapping their headers with

#ifdef __cplusplus
extern "C" {
#endif

#ifdef __cplusplus
}
#endif
tkordenbrock commented 2 years ago

Thanks for posting an issue. I will create a PR for this shortly.

tkordenbrock commented 2 years ago

Fixed in #87