ESPResSo
Extensible Simulation Package for Research on Soft Matter Systems
|
Implementation of errorhandling.hpp. More...
#include "errorhandling.hpp"
#include "MpiCallbacks.hpp"
#include "error_handling/RuntimeErrorCollector.hpp"
#include <boost/mpi/collectives.hpp>
#include <boost/mpi/communicator.hpp>
#include <cstdlib>
#include <functional>
#include <memory>
#include <string>
#include <utility>
#include <vector>
Go to the source code of this file.
Namespaces | |
namespace | ErrorHandling |
Functions | |
void | ErrorHandling::init_error_handling (std::weak_ptr< Communication::MpiCallbacks > callbacks) |
Initialize the error collection system. | |
RuntimeErrorStream | ErrorHandling::_runtimeMessageStream (RuntimeError::ErrorLevel level, const std::string &file, const int line, const std::string &function) |
static void | ErrorHandling::mpi_gather_runtime_errors_local () |
std::vector< RuntimeError > | ErrorHandling::mpi_gather_runtime_errors () |
Gather messages on main rank. | |
std::vector< RuntimeError > | ErrorHandling::mpi_gather_runtime_errors_all (bool is_head_node) |
Gather messages on main rank. | |
void | errexit () |
exit ungracefully, core dump if switched on. | |
int | check_runtime_errors_local () |
Count runtime errors on the local node. | |
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. | |
Variables | |
static std::unique_ptr< RuntimeErrorCollector > | ErrorHandling::runtimeErrorCollector |
RuntimeErrorCollector instance. | |
static std::weak_ptr< Communication::MpiCallbacks > | ErrorHandling::m_callbacks |
The callback loop we are on. | |
Implementation of errorhandling.hpp.
Definition in file errorhandling.cpp.
int check_runtime_errors | ( | boost::mpi::communicator const & | comm | ) |
Count runtime errors on all nodes.
This has to be called on all nodes synchronously.
Definition at line 95 of file errorhandling.cpp.
References check_runtime_errors_local().
Referenced by System::System::integrate().
int check_runtime_errors_local | ( | ) |
Count runtime errors on the local node.
This has to be called on all nodes synchronously.
Definition at line 90 of file errorhandling.cpp.
Referenced by check_runtime_errors().
void errexit | ( | ) |
exit ungracefully, core dump if switched on.
Definition at line 84 of file errorhandling.cpp.
References ErrorHandling::m_callbacks.
Referenced by Mpiio::fatal_error(), and cuda_fatal_error::terminate().
void flush_runtime_errors_local | ( | ) |
Flush runtime errors to standard error on the local node.
This is used to clear pending runtime error messages when the call site is handling an exception that needs to be re-thrown instead of being queued as an additional runtime error message.
Definition at line 100 of file errorhandling.cpp.
References ErrorHandling::runtimeErrorCollector.