27#include <boost/mpi/collectives.hpp>
28#include <boost/serialization/string.hpp>
39void ParallelExceptionHandler::handle_impl(std::exception
const *error)
const {
43 enum :
unsigned char {
54 auto const fail_flag = boost::mpi::all_reduce(
55 m_comm,
static_cast<unsigned char>(
this_fail_flag), std::bit_or<>());
73 std::string error_message{
"an error occurred on one or more MPI ranks:"};
74 for (std::size_t i = 0; i <
messages.size(); ++i) {
75 error_message +=
"\n rank " + std::to_string(i) +
": " +
messages[i];
77 throw std::runtime_error(error_message.c_str());
int this_node
The number of this node.
void flush_runtime_errors_local()
Flush runtime errors to standard error on the local node.
This file contains the errorhandling code for severe errors, like a broken bond or illegal parameter ...
T get_value(Variant const &v)
Extract value of specific type T from a Variant.