source: src/comm/mpi/error_handler.cpp@ dfed1c

Last change on this file since dfed1c was dfed1c, checked in by Julian Iseringhausen <isering@…>, 14 years ago

Major vmg update.

git-svn-id: https://svn.version.fz-juelich.de/scafacos/trunk@1136 5161e1c8-67bf-11de-9fd5-51895aff932f

  • Property mode set to 100644
File size: 633 bytes
Line 
1/**
2 * @file error_handler.cpp
3 * @author Julian Iseringhausen <isering@ins.uni-bonn.de>
4 * @date Mon Nov 21 13:27:22 2011
5 *
6 * @brief Convert MPI errors to C++ exceptions. Used to be
7 * able to call a debugger when MPI crashes
8 * internally.
9 *
10 */
11
12#ifdef HAVE_CONFIG_H
13#include <config.h>
14#endif
15
16#ifdef HAVE_MPI
17
18#include <mpi.h>
19
20#include "comm/mpi/error_handler.hpp"
21
22void VMG::MPI::ConvertToException(MPI_Comm* comm, int* err, ...)
23{
24 char error_string[MPI_MAX_ERROR_STRING];
25 int resultlen;
26 MPI_Error_string(*err, error_string, &resultlen);
27 throw Exception(error_string);
28}
29
30#endif /* HAVE_MPI */
Note: See TracBrowser for help on using the repository browser.