30#include <boost/mpi/collectives.hpp>
31#include <boost/mpi/communicator.hpp>
54 std::make_unique<RuntimeErrorCollector>(
m_callbacks.lock()->comm());
58 const std::string &file,
60 const std::string &function) {
92 return runtimeErrorCollector->count(RuntimeError::ErrorLevel::ERROR);
Communication::MpiCallbacks manages MPI communication using a visitor pattern.
#define REGISTER_CALLBACK(cb)
Register a static callback without return value.
Create a runtime error message via the streaming operator.
int check_runtime_errors(boost::mpi::communicator const &comm)
Count runtime errors on all nodes.
void flush_runtime_errors_local()
Flush runtime errors to standard error on the local node.
int check_runtime_errors_local()
Count runtime errors on the local node.
void errexit()
exit ungracefully, core dump if switched on.
This file contains the errorhandling code for severe errors, like a broken bond or illegal parameter ...
RuntimeErrorStream _runtimeMessageStream(RuntimeError::ErrorLevel level, const std::string &file, const int line, const std::string &function)
std::vector< RuntimeError > mpi_gather_runtime_errors()
Gather messages on main rank.
std::vector< RuntimeError > mpi_gather_runtime_errors_all(bool is_head_node)
Gather messages on main rank.
static std::unique_ptr< RuntimeErrorCollector > runtimeErrorCollector
RuntimeErrorCollector instance.
static void mpi_gather_runtime_errors_local()
void init_error_handling(std::weak_ptr< Communication::MpiCallbacks > callbacks)
Initialize the error collection system.
static std::weak_ptr< Communication::MpiCallbacks > m_callbacks
The callback loop we are on.
ErrorLevel
The error level, warnings are only displayed to the user, errors are fatal.