cmake/Modules/FindMPI/libver_mpi.c

21 lines
357 B
C
Raw Normal View History

2018-01-26 17:06:56 +01:00
#include <mpi.h>
#ifdef __cplusplus
2018-08-09 18:06:22 +02:00
# include <cstdio>
2018-01-26 17:06:56 +01:00
#else
2018-08-09 18:06:22 +02:00
# include <stdio.h>
2018-01-26 17:06:56 +01:00
#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
2019-11-11 23:01:05 +01:00
return 0;
2018-01-26 17:06:56 +01:00
}