cmake (3.27.7)
1 #include <mpi.h>
2
3 #ifdef __cplusplus
4 # include <cstdio>
5 #else
6 # include <stdio.h>
7 #endif
8
9 int main(int argc, char* argv[])
10 {
11 char mpilibver_str[MPI_MAX_LIBRARY_VERSION_STRING];
12 int mpilibver_len;
13 MPI_Get_library_version(mpilibver_str, &mpilibver_len);
14 #ifdef __cplusplus
15 std::puts(mpilibver_str);
16 #else
17 puts(mpilibver_str);
18 #endif
19 return 0;
20 }