diff options
Diffstat (limited to 'Modules/FindMPI/libver_mpi.c')
-rw-r--r-- | Modules/FindMPI/libver_mpi.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/Modules/FindMPI/libver_mpi.c b/Modules/FindMPI/libver_mpi.c new file mode 100644 index 0000000..be9d19d --- /dev/null +++ b/Modules/FindMPI/libver_mpi.c @@ -0,0 +1,19 @@ +#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 +} |