ESPResSo
Extensible Simulation Package for Research on Soft Matter Systems
Loading...
Searching...
No Matches
ErrorHandling Namespace Reference

Classes

struct  RuntimeError
 A runtime error. More...
 
class  RuntimeErrorCollector
 
class  RuntimeErrorStream
 Create a runtime error message via the streaming operator. More...
 

Functions

void init_error_handling (boost::mpi::communicator const &comm)
 Initialize the error collection system.
 
void deinit_error_handling ()
 
RuntimeErrorStream _runtimeMessageStream (RuntimeError::ErrorLevel level, const std::string &file, const int line, const std::string &function)
 
static void mpi_gather_runtime_errors_local ()
 
std::vector< RuntimeErrormpi_gather_runtime_errors ()
 Gather messages on main rank.
 
std::vector< RuntimeErrormpi_gather_runtime_errors_all (bool is_head_node)
 Gather messages on main rank.
 
static void mpi_poll_runtime_messages_local ()
 
bool mpi_poll_runtime_messages ()
 Check whether there is at least 1 flying runtime messages on any node.
 

Variables

static std::unique_ptr< RuntimeErrorCollectorruntimeErrorCollector
 RuntimeErrorCollector instance.
 

Function Documentation

◆ _runtimeMessageStream()

RuntimeErrorStream ErrorHandling::_runtimeMessageStream ( RuntimeError::ErrorLevel  level,
const std::string &  file,
const int  line,
const std::string &  function 
)

Definition at line 54 of file errorhandling.cpp.

References runtimeErrorCollector.

◆ deinit_error_handling()

void ErrorHandling::deinit_error_handling ( )

◆ init_error_handling()

void ErrorHandling::init_error_handling ( boost::mpi::communicator const comm)

Initialize the error collection system.

Definition at line 48 of file errorhandling.cpp.

References runtimeErrorCollector.

Referenced by CommunicationEnvironment::CommunicationEnvironment().

◆ mpi_gather_runtime_errors()

std::vector< RuntimeError > ErrorHandling::mpi_gather_runtime_errors ( )

Gather messages on main rank.

Only call from main rank.

Definition at line 67 of file errorhandling.cpp.

References mpi_gather_runtime_errors_local(), Communication::mpiCallbacks(), and runtimeErrorCollector.

◆ mpi_gather_runtime_errors_all()

std::vector< RuntimeError > ErrorHandling::mpi_gather_runtime_errors_all ( bool  is_head_node)

Gather messages on main rank.

Call on all ranks.

Definition at line 72 of file errorhandling.cpp.

References runtimeErrorCollector.

◆ mpi_gather_runtime_errors_local()

static void ErrorHandling::mpi_gather_runtime_errors_local ( )
static

Definition at line 61 of file errorhandling.cpp.

References runtimeErrorCollector.

Referenced by mpi_gather_runtime_errors().

◆ mpi_poll_runtime_messages()

bool ErrorHandling::mpi_poll_runtime_messages ( )

Check whether there is at least 1 flying runtime messages on any node.

This has to be called on the head node.

Returns
true if at least one message was found.

Definition at line 90 of file errorhandling.cpp.

References mpi_poll_runtime_messages_local(), Communication::mpiCallbacks(), runtimeErrorCollector, stream, and ErrorHandling::RuntimeError::WARNING.

◆ mpi_poll_runtime_messages_local()

static void ErrorHandling::mpi_poll_runtime_messages_local ( )
static

Variable Documentation

◆ runtimeErrorCollector

std::unique_ptr<RuntimeErrorCollector> ErrorHandling::runtimeErrorCollector
static