diff --git a/ompi/errhandler/errhandler.h b/ompi/errhandler/errhandler.h index 9b6bc37ee2..a08fb94692 100644 --- a/ompi/errhandler/errhandler.h +++ b/ompi/errhandler/errhandler.h @@ -239,7 +239,7 @@ struct ompi_request_t; */ #define OMPI_ERRHANDLER_RETURN(rc, mpi_object, err_code, message) \ OPAL_CR_EXIT_LIBRARY() \ - if (rc != OMPI_SUCCESS) { \ + if ( OPAL_UNLIKELY(OMPI_SUCCESS != rc) ) { \ int __mpi_err_code = (err_code < 0 ? (ompi_errcode_get_mpi_code(err_code)) : err_code); \ ompi_errhandler_invoke((mpi_object)->error_handler, \ (mpi_object), \