#include #ifdef __cplusplus #include #else #include #endif int main(int argc, char* argv[]) { char mpilibver_str[MPI_MAX_LIBRARY_VERSION_STRING]; int mpilibver_len; MPI_Get_library_version(mpilibver_str, &mpilibver_len); #ifdef __cplusplus std::puts(mpilibver_str); #else puts(mpilibver_str); #endif }