27#ifdef DEAL_II_WITH_MPI
31#ifdef DEAL_II_TRILINOS_WITH_SEACAS
35#ifdef DEAL_II_HAVE_GLIBC_STACKTRACE
39#ifdef DEAL_II_HAVE_LIBSTDCXX_DEMANGLER
103 , n_stacktrace_frames(0)
106#ifdef DEAL_II_HAVE_GLIBC_STACKTRACE
116 , function(exc.function)
119 , n_stacktrace_frames(exc.n_stacktrace_frames)
123#ifdef DEAL_II_HAVE_GLIBC_STACKTRACE
127 std::copy(std::begin(
exc.raw_stacktrace),
128 std::end(
exc.raw_stacktrace),
153#ifdef DEAL_II_HAVE_GLIBC_STACKTRACE
184 out <<
"An error occurred in line <" <<
line <<
"> of file <" <<
file
185 <<
"> in function" << std::endl
187 <<
"The violated condition was: " << std::endl
188 <<
" " <<
cond << std::endl;
202 if (std::strstr(
cond,
"::ExcMessage") !=
nullptr)
203 out <<
"The name and call sequence of the exception was:" << std::endl
204 <<
" " <<
exc << std::endl;
207 out <<
"Additional information: " << std::endl;
215 out <<
" (none)" << std::endl;
230#ifdef DEAL_II_HAVE_GLIBC_STACKTRACE
240 out <<
"Stacktrace:" << std::endl <<
"-----------" << std::endl;
249 std::string::npos) ||
276#ifdef DEAL_II_HAVE_LIBSTDCXX_DEMANGLER
290 while (
realname.find(
", boost::tuples::null_type>") !=
293 std::string(
", boost::tuples::null_type").
size());
332 <<
"--------------------------------------------------------"
360 <<
"--------------------------------------------------------"
366 converter <<
"--------------------------------------------------------"
374 what_str =
"ExceptionBase::generate_message () failed";
382#ifdef DEAL_II_WITH_MPI
384 : error_code(error_code)
414 out <<
"deal.II encountered an error while calling an MPI function."
418 out <<
"The description of the error provided by MPI is \""
424 <<
"This error code is not equal to any of the standard MPI error codes."
427 out <<
"The numerical value of the original error code is " <<
error_code
434#ifdef DEAL_II_TRILINOS_WITH_SEACAS
436 : error_code(error_code)
441 "EX_NOERR is assumed to be zero in all versions of ExodusII");
447 ExcExodusII::print_info(std::ostream &out)
const
449 out <<
"Error code is " << error_code <<
'\n';
450 out <<
"String description: " <<
ex_strerror(error_code) <<
'\n';
463 std::cerr << exc.what() << std::endl;
477#ifdef DEAL_II_WITH_MPI
480 if (is_initialized != 0)
488 <<
"Calling MPI_Abort now.\n"
489 <<
"To break execution in a GDB session, execute 'break MPI_Abort' before "
490 <<
"running. You can also put the following into your ~/.gdbinit:\n"
491 <<
" set breakpoint pending on\n"
492 <<
" break MPI_Abort\n"
493 <<
" set breakpoint pending auto" << std::endl;
514 deallog <<
"Exception: " << exc.get_exc_name() << std::endl;
515 deallog << exc.what() << std::endl;
521#ifdef DEAL_II_WITH_CUDA
529 return "The cuSPARSE library was not initialized";
533 return "Resource allocation failed inside the cuSPARSE library";
537 return "An unsupported value of parameter was passed to the function";
541 return "The function requires a feature absent from the device architecture";
545 return "An access to GPU memory space failed";
549 return "The GPU program failed to execute";
553 return "An internal cuSPARSE operation failed";
557 return "The matrix type is not supported by this function";
561 return "Unknown error";
576 return "The cuSolver library was not initialized";
580 return "Resource allocation failed inside the cuSolver library";
584 return "An unsupported value of a parameter was passed to the function";
588 return "The function requires a feature absent from the device architecture";
592 return "The GPU program failed to execute";
596 return "An internal cuSolver operation failed";
600 return "The matrix type is not supported by this function";
604 return "Unknown error";
void generate_message() const
void print_stack_trace(std::ostream &out) const
const char * get_exc_name() const
void set_fields(const char *file, const int line, const char *function, const char *cond, const char *exc_name)
virtual void print_info(std::ostream &out) const
virtual const char * what() const noexcept override
void print_exc_data(std::ostream &out) const
void * raw_stacktrace[25]
virtual void print_info(std::ostream &out) const override
ExcMPI(const int error_code)
#define DEAL_II_NAMESPACE_OPEN
#define DEAL_II_NAMESPACE_CLOSE
unsigned int n_mpi_processes(const MPI_Comm mpi_communicator)
std::vector< std::string > break_text_into_lines(const std::string &original_text, const unsigned int width, const char delimiter=' ')
std::string get_cusolver_error_string(const cusolverStatus_t error_code)
std::string get_cusparse_error_string(const cusparseStatus_t error_code)
void abort(const ExceptionBase &exc) noexcept
std::string & get_additional_assert_output()
void do_issue_error_nothrow(const ExceptionBase &e) noexcept
bool allow_abort_on_exception
void enable_abort_on_exception()
void disable_abort_on_exception()
void set_additional_assert_output(const char *const p)
void suppress_stacktrace_in_exceptions()