Skip to content

Commit

Permalink
ROMIO: Abort the comm associated with a file on error
Browse files Browse the repository at this point in the history
Pass the comm associated with the MPI_File to MPIR_Abort in the event of
fatal error. Previous versions of this code passed either NULL or
MPI_COMM_WORLD, but the comm used to create the file is a more accurate
scope for the error.

Signed-off-by: Pavan Balaji <balaji@anl.gov>
  • Loading branch information
raffenet committed Jan 17, 2017
1 parent 43a403e commit f35b5f2
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/mpi/romio/mpi-io/glue/mpich/mpio_err.c
Original file line number Diff line number Diff line change
Expand Up @@ -74,10 +74,12 @@ int MPIO_Err_return_file(MPI_File mpi_fh, int error_code)
/* --BEGIN ERROR HANDLING-- */
if (MPIR_Err_is_fatal(error_code) || kind == 0)
{
ADIO_File fh = MPIO_File_resolve(mpi_fh);

MPL_snprintf(error_msg, 4096, "I/O error: ");
len = (int)strlen(error_msg);
MPIR_Err_get_string(error_code, &error_msg[len], 4096-len, NULL);
MPIR_Abort(MPI_COMM_WORLD, MPI_SUCCESS, error_code, error_msg);
MPIR_Abort(fh->comm, MPI_SUCCESS, error_code, error_msg);
}
/* --END ERROR HANDLING-- */
else if (kind == 2) {
Expand Down

0 comments on commit f35b5f2

Please sign in to comment.