| 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 |
|
|---|
| 22 | void 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.