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

Add simple mpi build info

parent 088af030
No related branches found
No related tags found
1 merge request!11Feature/mpi
#include <BuildInfo.hpp> #include <BuildInfo.hpp>
#include <pastis_config.hpp>
#include <pastis_build_info.hpp> #include <pastis_build_info.hpp>
std::string BuildInfo::type() std::string BuildInfo::type()
...@@ -15,3 +16,12 @@ std::string BuildInfo::kokkosDevices() ...@@ -15,3 +16,12 @@ std::string BuildInfo::kokkosDevices()
{ {
return PASTIS_BUILD_KOKKOS_DEVICES; return PASTIS_BUILD_KOKKOS_DEVICES;
} }
std::string BuildInfo::mpiLibrary()
{
#ifdef PASTIS_HAS_MPI
return "yes";
#else
return "no";
#endif // PASTIS_HAS_MPI
}
...@@ -8,6 +8,7 @@ struct BuildInfo ...@@ -8,6 +8,7 @@ struct BuildInfo
static std::string type(); static std::string type();
static std::string compiler(); static std::string compiler();
static std::string kokkosDevices(); static std::string kokkosDevices();
static std::string mpiLibrary();
}; };
#endif // BUILD_INFO_HPP #endif // BUILD_INFO_HPP
...@@ -14,6 +14,8 @@ ...@@ -14,6 +14,8 @@
#include <CLI/CLI.hpp> #include <CLI/CLI.hpp>
#include <pastis_config.hpp>
#ifdef PASTIS_HAS_MPI #ifdef PASTIS_HAS_MPI
#include <mpi.h> #include <mpi.h>
#endif // PASTIS_HAS_MPI #endif // PASTIS_HAS_MPI
...@@ -67,6 +69,7 @@ std::string initialize(int& argc, char* argv[]) ...@@ -67,6 +69,7 @@ std::string initialize(int& argc, char* argv[])
pout() << "type: " << rang::style::bold << BuildInfo::type() << rang::style::reset << '\n'; pout() << "type: " << rang::style::bold << BuildInfo::type() << rang::style::reset << '\n';
pout() << "compiler: " << rang::style::bold << BuildInfo::compiler() << rang::style::reset << '\n'; pout() << "compiler: " << rang::style::bold << BuildInfo::compiler() << rang::style::reset << '\n';
pout() << "devices: " << rang::style::bold << BuildInfo::kokkosDevices() << rang::style::reset << '\n'; pout() << "devices: " << rang::style::bold << BuildInfo::kokkosDevices() << rang::style::reset << '\n';
pout() << "mpi: " << rang::style::bold << BuildInfo::mpiLibrary() << rang::style::reset << '\n';
pout() << "-------------------------------------------------------\n"; pout() << "-------------------------------------------------------\n";
{ {
CLI::App app{"Pastis help"}; CLI::App app{"Pastis help"};
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment