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

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

vmg: Use MPI error handler only when compiled with --enable-debug.

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

  • Property mode set to 100644
File size: 754 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 DEBUG
17
18#ifdef HAVE_MPI
19
20#include <mpi.h>
21#ifdef HAVE_MARMOT
22#include <enhancempicalls.h>
23#include <sourceinfompicalls.h>
24#endif
25
26#include "comm/mpi/error_handler.hpp"
27
28void VMG::MPI::ConvertToException(MPI_Comm* comm, int* err, ...)
29{
30 char error_string[MPI_MAX_ERROR_STRING];
31 int resultlen;
32 MPI_Error_string(*err, error_string, &resultlen);
33 throw Exception(error_string);
34}
35
36#endif /* DEBUG */
37
38#endif /* HAVE_MPI */
Note: See TracBrowser for help on using the repository browser.