25#include "kamping/kassert/kassert.hpp"
34#define THROW_IF_MPI_ERROR(error_code, function) \
35 THROWING_KAMPING_ASSERT_SPECIFIED( \
36 error_code == MPI_SUCCESS, \
37 #function << " failed!", \
38 kamping::MpiErrorException, \
59 _what =
message +
"Failed with the following error message:\n" + std::string(
errorString.data()) +
"\n";
61 _what =
message +
"Error message could not be retrieved\n";
74 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:49
char const * what() const noexcept final
Gets a description of this exception.
Definition error_handling.hpp:67
int mpi_error_class() const
Gets the error class corresponding to the error code.
Definition error_handling.hpp:79
MpiErrorException(std::string message, int mpi_error_code)
Constructs the exception.
Definition error_handling.hpp:54
int mpi_error_code() const
Gets the error code returned by the mpi call.
Definition error_handling.hpp:73