https://github.com/Kitware/CMake
Raw File
Tip revision: 5676593be9bd3a26995f35b9db8fe5b9af8ea32e authored by Brad King on 30 November 2022, 13:57:03 UTC
CMake 3.25.1
Tip revision: 5676593
libver_mpi.c
#include <mpi.h>

#ifdef __cplusplus
#  include <cstdio>
#else
#  include <stdio.h>
#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
  return 0;
}
back to top