Skip to content
Snippets Groups Projects
Commit 208e4840 authored by Stéphane Del Pino's avatar Stéphane Del Pino
Browse files

Print MPI version

Just testing functionality, needs clean-up
parent 072a4c3e
No related branches found
No related tags found
1 merge request!11Feature/mpi
...@@ -2,6 +2,11 @@ ...@@ -2,6 +2,11 @@
#include <pastis_config.hpp> #include <pastis_config.hpp>
#include <pastis_build_info.hpp> #include <pastis_build_info.hpp>
#ifdef PASTIS_HAS_MPI
#include <sstream>
#include <mpi.h>
#endif // PASTIS_HAS_MPI
std::string BuildInfo::type() std::string BuildInfo::type()
{ {
return PASTIS_BUILD_TYPE; return PASTIS_BUILD_TYPE;
...@@ -20,8 +25,13 @@ std::string BuildInfo::kokkosDevices() ...@@ -20,8 +25,13 @@ std::string BuildInfo::kokkosDevices()
std::string BuildInfo::mpiLibrary() std::string BuildInfo::mpiLibrary()
{ {
#ifdef PASTIS_HAS_MPI #ifdef PASTIS_HAS_MPI
return "yes"; return [](){
int length;
char mpi_version[MPI_MAX_LIBRARY_VERSION_STRING];
MPI_Get_library_version(mpi_version, &length);
return std::string(mpi_version);
}();
#else #else
return "no"; return "none";
#endif // PASTIS_HAS_MPI #endif // PASTIS_HAS_MPI
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment