Commit 6d818532 authored by Kenneth Raffenetti's avatar Kenneth Raffenetti
Browse files

modify fatal error handler



If a fatal error occurs, pass the MPI error code to MPID_Abort. To ensure
non-zero exit status with dynamic error codes, we set the first available
dynamic error class to 1. #Refs 1537
Signed-off-by: Pavan Balaji's avatarPavan Balaji <balaji@anl.gov>
parent b1e89abf
......@@ -46,7 +46,7 @@
static int not_initialized = 1; /* This allows us to use atomic decr */
static const char *(user_class_msgs[ERROR_MAX_NCLASS]) = { 0 };
static const char *(user_code_msgs[ERROR_MAX_NCODE]) = { 0 };
static int first_free_class = 0;
static int first_free_class = 1; /* class 0 is reserved */
static int first_free_code = 1; /* code 0 is reserved */
static const char empty_error_string[1] = { 0 };
......
......@@ -455,9 +455,9 @@ static void handleFatalError( MPID_Comm *comm_ptr,
MPIU_Snprintf(error_msg, MAX_ERRMSG_STRING, "Fatal error in %s: ", fcname);
len = (int)strlen(error_msg);
MPIR_Err_get_string(errcode, &error_msg[len], MAX_ERRMSG_STRING-len, NULL);
/* The third argument is a return code, a value of 1 usually indicates
an error */
MPID_Abort(comm_ptr, MPI_SUCCESS, 1, error_msg);
/* The third argument is a return code. We simply pass the error code. */
MPID_Abort(comm_ptr, MPI_SUCCESS, errcode, error_msg);
}
/* --END ERROR HANDLING-- */
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment