summaryrefslogtreecommitdiffstats
path: root/Modules/FindMPI/libver_mpi.c
blob: d89328a01e9b528ab213f92d73d36200c20a029d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#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;
}