Changeset 8bec32 for src/comm/mpi/error_handler.cpp
- Timestamp:
- Apr 13, 2013, 1:19:18 PM (13 years ago)
- Children:
- 1e45786
- Parents:
- e5d779b
- File:
-
- 1 edited
-
src/comm/mpi/error_handler.cpp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
src/comm/mpi/error_handler.cpp
re5d779b r8bec32 42 42 #endif 43 43 44 #include <sstream> 45 44 46 #include "comm/mpi/error_handler.hpp" 45 47 46 48 void VMG::MPI::ConvertToException(MPI_Comm* comm, int* err, ...) 47 49 { 48 char error_string[MPI_MAX_ERROR_STRING]; 49 int resultlen; 50 MPI_Error_string(*err, error_string, &resultlen); 51 throw Exception(error_string); 50 int rank; 51 char error_string[MPI_MAX_ERROR_STRING+1], comm_name[MPI_MAX_OBJECT_NAME+1]; 52 int error_len, comm_name_len; 53 54 MPI_Comm_rank(*comm, &rank); 55 MPI_Error_string(*err, error_string, &error_len); 56 MPI_Comm_get_name(*comm, comm_name, &comm_name_len); 57 58 std::stringstream error_concat; 59 error_concat << "vmg: Rank " << rank << " on communicator \"" << comm_name << "\": " << error_string; 60 61 throw Exception(error_concat.str().c_str()); 52 62 } 53 63
Note:
See TracChangeset
for help on using the changeset viewer.
