23#include <kassert/kassert.hpp>
33#define THROW_IF_MPI_ERROR(error_code, function) \
34 THROWING_KASSERT_SPECIFIED( \
35 error_code == MPI_SUCCESS, \
36 #function << " failed!", \
37 kamping::MpiErrorException, \
57 _what =
message +
"Failed with the following error message:\n" + std::string(
errorString.data()) +
"\n";
59 _what =
message +
"Error message could not be retrieved\n";
72 return _mpi_error_code;
STL-compatible allocator for requesting memory using the builtin MPI allocator.
Definition allocator.hpp:32
The exception type used when an MPI call did not return MPI_SUCCESS.
Definition error_handling.hpp:47
char const * what() const noexcept final
Gets a description of this exception.
Definition error_handling.hpp:65
int mpi_error_class() const
Gets the error class corresponding to the error code.
Definition error_handling.hpp:77
MpiErrorException(std::string message, int mpi_error_code)
Constructs the exception.
Definition error_handling.hpp:52
int mpi_error_code() const
Gets the error code returned by the mpi call.
Definition error_handling.hpp:71