diff --git a/ompi/errhandler/errhandler.c b/ompi/errhandler/errhandler.c index 1adf27d5d1..b0d8b45902 100644 --- a/ompi/errhandler/errhandler.c +++ b/ompi/errhandler/errhandler.c @@ -3,7 +3,7 @@ * Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana * University Research and Technology * Corporation. All rights reserved. - * Copyright (c) 2004-2011 The University of Tennessee and The University + * Copyright (c) 2004-2014 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, @@ -225,7 +225,7 @@ int ompi_errhandler_runtime_callback(opal_pointer_array_t *errors) { errcode = err->errcode; } - ompi_mpi_abort(MPI_COMM_WORLD, errcode, false); + ompi_mpi_abort(MPI_COMM_WORLD, errcode); return OMPI_SUCCESS; } diff --git a/ompi/errhandler/errhandler_predefined.c b/ompi/errhandler/errhandler_predefined.c index 2807af491d..1d42afeffc 100644 --- a/ompi/errhandler/errhandler_predefined.c +++ b/ompi/errhandler/errhandler_predefined.c @@ -2,7 +2,7 @@ * Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana * University Research and Technology * Corporation. All rights reserved. - * Copyright (c) 2004-2005 The University of Tennessee and The University + * Copyright (c) 2004-2014 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, @@ -336,15 +336,17 @@ static void backend_fatal(char *type, struct ompi_communicator_t *comm, backend_fatal_no_aggregate(type, comm, name, error_code, arglist); } - /* Should we do something more intelligent than just using - COMM_SELF? */ + /* In most instances the communicator will be valid. If not, we are either early in + * the initialization or we are dealing with a window. Thus, it is good enough to abort + * on MPI_COMM_SELF, the error will propagate. + */ if (comm == NULL) { comm = &ompi_mpi_comm_self.comm; } if (NULL != error_code) { - ompi_mpi_abort(comm, *error_code, false); + ompi_mpi_abort(comm, *error_code); } else { - ompi_mpi_abort(comm, 1, false); + ompi_mpi_abort(comm, 1); } } diff --git a/ompi/mca/bcol/iboffload/bcol_iboffload_component.c b/ompi/mca/bcol/iboffload/bcol_iboffload_component.c index 8c5a1e1e93..f11d08123c 100644 --- a/ompi/mca/bcol/iboffload/bcol_iboffload_component.c +++ b/ompi/mca/bcol/iboffload/bcol_iboffload_component.c @@ -1,7 +1,10 @@ /* * Copyright (c) 2009-2012 Oak Ridge National Laboratory. All rights reserved. * Copyright (c) 2009-2012 Mellanox Technologies. All rights reserved. - * Copyright (c) 2012 Cisco Systems, Inc. All rights reserved. + * Copyright (c) 2012 Cisco Systems, Inc. All rights reserved. + * Copyright (c) 2014 The University of Tennessee and The University + * of Tennessee Research Foundation. All rights + * reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -773,7 +776,7 @@ mca_bcol_iboffload_free_tasks_frags_resources( static void fatal_error(char *mesg) { IBOFFLOAD_ERROR(("FATAL ERROR: %s", mesg)); - ompi_mpi_abort(&ompi_mpi_comm_world.comm, MPI_ERR_INTERN, true); + ompi_mpi_abort(&ompi_mpi_comm_world.comm, MPI_ERR_INTERN); } #define RELEASE_COLLFRAG(cf) \ diff --git a/ompi/mca/coll/ml/coll_ml_component.c b/ompi/mca/coll/ml/coll_ml_component.c index 3e682e471b..0a5ff633d9 100644 --- a/ompi/mca/coll/ml/coll_ml_component.c +++ b/ompi/mca/coll/ml/coll_ml_component.c @@ -4,6 +4,9 @@ * Copyright (c) 2009-2012 Mellanox Technologies. All rights reserved. * Copyright (c) 2013-2014 Los Alamos National Security, LLC. All rights * reserved. + * Copyright (c) 2014 The University of Tennessee and The University + * of Tennessee Research Foundation. All rights + * reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -97,7 +100,7 @@ void mca_coll_ml_abort_ml(char *message) { ML_ERROR(("ML Collective FATAL ERROR: %s", message)); /* shutdown the MPI */ - ompi_mpi_abort(&ompi_mpi_comm_world.comm, MPI_ERR_INTERN, true); + ompi_mpi_abort(&ompi_mpi_comm_world.comm, MPI_ERR_INTERN); } /* * progress function diff --git a/ompi/mca/coll/ml/coll_ml_custom_utils.c b/ompi/mca/coll/ml/coll_ml_custom_utils.c index b9bd6d442f..6a7b26c28a 100644 --- a/ompi/mca/coll/ml/coll_ml_custom_utils.c +++ b/ompi/mca/coll/ml/coll_ml_custom_utils.c @@ -4,6 +4,9 @@ * Copyright (c) 2009-2012 Mellanox Technologies. All rights reserved. * Copyright (c) 2014 Los Alamos National Security, LLC. All rights * reserved. + * Copyright (c) 2014 The University of Tennessee and The University + * of Tennessee Research Foundation. All rights + * reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -70,7 +73,7 @@ int mca_coll_ml_check_if_bcol_is_used(const char *bcol_name, const mca_coll_ml_m ranks_in_comm = (int *) malloc(comm_size * sizeof(int)); if (OPAL_UNLIKELY(NULL == ranks_in_comm)) { ML_ERROR(("Memory allocation failed.")); - ompi_mpi_abort(&ompi_mpi_comm_world.comm, MPI_ERR_NO_MEM, true); + ompi_mpi_abort(&ompi_mpi_comm_world.comm, MPI_ERR_NO_MEM); /* not reached but causes a clang warning to not return here */ return OMPI_ERR_OUT_OF_RESOURCE; } @@ -107,7 +110,7 @@ int mca_coll_ml_check_if_bcol_is_used(const char *bcol_name, const mca_coll_ml_m if (OPAL_UNLIKELY(OMPI_SUCCESS != rc)) { ML_ERROR(("comm_allreduce_pml failed.")); - ompi_mpi_abort(&ompi_mpi_comm_world.comm, MPI_ERR_OP, true); + ompi_mpi_abort(&ompi_mpi_comm_world.comm, MPI_ERR_OP); } free(ranks_in_comm); diff --git a/ompi/mca/pml/bfo/pml_bfo_recvreq.h b/ompi/mca/pml/bfo/pml_bfo_recvreq.h index ca12b0baee..09094d6362 100644 --- a/ompi/mca/pml/bfo/pml_bfo_recvreq.h +++ b/ompi/mca/pml/bfo/pml_bfo_recvreq.h @@ -176,7 +176,7 @@ recv_request_pml_complete(mca_pml_bfo_recv_request_t *recvreq) OPAL_THREAD_LOCK(&ompi_request_lock); if(true == recvreq->req_recv.req_base.req_free_called) { if( MPI_SUCCESS != recvreq->req_recv.req_base.req_ompi.req_status.MPI_ERROR ) { - ompi_mpi_abort(&ompi_mpi_comm_world.comm, MPI_ERR_REQUEST, true); + ompi_mpi_abort(&ompi_mpi_comm_world.comm, MPI_ERR_REQUEST); } MCA_PML_BFO_RECV_REQUEST_RETURN(recvreq); } else { diff --git a/ompi/mca/pml/bfo/pml_bfo_sendreq.h b/ompi/mca/pml/bfo/pml_bfo_sendreq.h index a438d0ab32..d1e823507c 100644 --- a/ompi/mca/pml/bfo/pml_bfo_sendreq.h +++ b/ompi/mca/pml/bfo/pml_bfo_sendreq.h @@ -2,7 +2,7 @@ * Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana * University Research and Technology * Corporation. All rights reserved. - * Copyright (c) 2004-2013 The University of Tennessee and The University + * Copyright (c) 2004-2014 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, @@ -249,7 +249,7 @@ send_request_pml_complete(mca_pml_bfo_send_request_t *sendreq) MCA_PML_BFO_SEND_REQUEST_MPI_COMPLETE(sendreq, true); } else { if( MPI_SUCCESS != sendreq->req_send.req_base.req_ompi.req_status.MPI_ERROR ) { - ompi_mpi_abort(&ompi_mpi_comm_world.comm, MPI_ERR_REQUEST, true); + ompi_mpi_abort(&ompi_mpi_comm_world.comm, MPI_ERR_REQUEST); } } sendreq->req_send.req_base.req_pml_complete = true; diff --git a/ompi/mca/pml/ob1/pml_ob1_recvreq.h b/ompi/mca/pml/ob1/pml_ob1_recvreq.h index d548b43665..9e5625ea03 100644 --- a/ompi/mca/pml/ob1/pml_ob1_recvreq.h +++ b/ompi/mca/pml/ob1/pml_ob1_recvreq.h @@ -2,7 +2,7 @@ * Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana * University Research and Technology * Corporation. All rights reserved. - * Copyright (c) 2004-2013 The University of Tennessee and The University + * Copyright (c) 2004-2014 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. * Copyright (c) 2004-2007 High Performance Computing Center Stuttgart, @@ -164,7 +164,7 @@ recv_request_pml_complete(mca_pml_ob1_recv_request_t *recvreq) OPAL_THREAD_LOCK(&ompi_request_lock); if(true == recvreq->req_recv.req_base.req_free_called) { if( MPI_SUCCESS != recvreq->req_recv.req_base.req_ompi.req_status.MPI_ERROR ) { - ompi_mpi_abort(&ompi_mpi_comm_world.comm, MPI_ERR_REQUEST, true); + ompi_mpi_abort(&ompi_mpi_comm_world.comm, MPI_ERR_REQUEST); } MCA_PML_OB1_RECV_REQUEST_RETURN(recvreq); } else { diff --git a/ompi/mca/pml/ob1/pml_ob1_sendreq.h b/ompi/mca/pml/ob1/pml_ob1_sendreq.h index b833806ac4..49be5c65a9 100644 --- a/ompi/mca/pml/ob1/pml_ob1_sendreq.h +++ b/ompi/mca/pml/ob1/pml_ob1_sendreq.h @@ -3,7 +3,7 @@ * Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana * University Research and Technology * Corporation. All rights reserved. - * Copyright (c) 2004-2013 The University of Tennessee and The University + * Copyright (c) 2004-2014 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, @@ -258,7 +258,7 @@ send_request_pml_complete(mca_pml_ob1_send_request_t *sendreq) MCA_PML_OB1_SEND_REQUEST_MPI_COMPLETE(sendreq, true); } else { if( MPI_SUCCESS != sendreq->req_send.req_base.req_ompi.req_status.MPI_ERROR ) { - ompi_mpi_abort(&ompi_mpi_comm_world.comm, MPI_ERR_REQUEST, true); + ompi_mpi_abort(&ompi_mpi_comm_world.comm, MPI_ERR_REQUEST); } } sendreq->req_send.req_base.req_pml_complete = true; diff --git a/ompi/mca/vprotocol/pessimist/vprotocol_pessimist_sender_based.c b/ompi/mca/vprotocol/pessimist/vprotocol_pessimist_sender_based.c index c23dfc42eb..747e70927f 100644 --- a/ompi/mca/vprotocol/pessimist/vprotocol_pessimist_sender_based.c +++ b/ompi/mca/vprotocol/pessimist/vprotocol_pessimist_sender_based.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2004-2007 The Trustees of the University of Tennessee. + * Copyright (c) 2004-2014 The Trustees of the University of Tennessee. * All rights reserved. * $COPYRIGHT$ * @@ -54,7 +54,7 @@ static void sb_mmap_alloc(void) V_OUTPUT_ERR("pml_v: vprotocol_pessimist: sender_based_alloc: ftruncate: %s", strerror(errno)); close(sb.sb_fd); - ompi_mpi_abort(MPI_COMM_NULL, MPI_ERR_NO_SPACE, false); + ompi_mpi_abort(MPI_COMM_NULL, MPI_ERR_NO_SPACE); } sb.sb_addr = (uintptr_t) mmap((void *) sb.sb_addr, sb.sb_length, PROT_WRITE | PROT_READ, @@ -65,7 +65,7 @@ static void sb_mmap_alloc(void) V_OUTPUT_ERR("pml_v: vprotocol_pessimist: sender_based_alloc: mmap: %s", strerror(errno)); close(sb.sb_fd); - ompi_mpi_abort(MPI_COMM_NULL, MPI_ERR_NO_SPACE, false); + ompi_mpi_abort(MPI_COMM_NULL, MPI_ERR_NO_SPACE); } } diff --git a/ompi/mpi/c/abort.c b/ompi/mpi/c/abort.c index 6eaa0f9822..13746d942c 100644 --- a/ompi/mpi/c/abort.c +++ b/ompi/mpi/c/abort.c @@ -2,7 +2,7 @@ * Copyright (c) 2004-2007 The Trustees of Indiana University and Indiana * University Research and Technology * Corporation. All rights reserved. - * Copyright (c) 2004-2005 The University of Tennessee and The University + * Copyright (c) 2004-2014 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. * Copyright (c) 2004-2008 High Performance Computing Center Stuttgart, @@ -56,5 +56,5 @@ int MPI_Abort(MPI_Comm comm, int errorcode) ompi_comm_rank(comm), ('\0' != comm->c_name[0]) ? comm->c_name : "", errorcode); - return ompi_mpi_abort(comm, errorcode, true); + return ompi_mpi_abort(comm, errorcode); } diff --git a/ompi/runtime/mpiruntime.h b/ompi/runtime/mpiruntime.h index 9ff569fb25..f49b377130 100644 --- a/ompi/runtime/mpiruntime.h +++ b/ompi/runtime/mpiruntime.h @@ -2,7 +2,7 @@ * Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana * University Research and Technology * Corporation. All rights reserved. - * Copyright (c) 2004-2008 The University of Tennessee and The University + * Copyright (c) 2004-2014 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, @@ -186,7 +186,7 @@ int ompi_mpi_finalize(void); * Abort the processes of comm */ OMPI_DECLSPEC int ompi_mpi_abort(struct ompi_communicator_t* comm, - int errcode, bool kill_remote_of_intercomm); + int errcode); /** * Do a preconnect of MPI connections (i.e., force connections to diff --git a/ompi/runtime/ompi_mpi_abort.c b/ompi/runtime/ompi_mpi_abort.c index 9e15ade931..15e74df944 100644 --- a/ompi/runtime/ompi_mpi_abort.c +++ b/ompi/runtime/ompi_mpi_abort.c @@ -45,8 +45,7 @@ static bool have_been_invoked = false; int ompi_mpi_abort(struct ompi_communicator_t* comm, - int errcode, - bool kill_remote_of_intercomm) + int errcode) { int count = 0, i, ret; char *msg, *host, hostname[MAXHOSTNAMELEN]; @@ -141,11 +140,9 @@ ompi_mpi_abort(struct ompi_communicator_t* comm, that we abort the remote procs, then do that as well. */ nabort_procs = ompi_comm_size(comm); - if (kill_remote_of_intercomm) { - /* ompi_comm_remote_size() returns 0 if not an intercomm, so - this is cool */ - nabort_procs += ompi_comm_remote_size(comm); - } + /* ompi_comm_remote_size() returns 0 if not an intercomm, so + this is cool */ + nabort_procs += ompi_comm_remote_size(comm); abort_procs = (ompi_process_name_t*)malloc(sizeof(ompi_process_name_t) * nabort_procs); if (NULL == abort_procs) { @@ -167,18 +164,16 @@ ompi_mpi_abort(struct ompi_communicator_t* comm, } /* if requested, kill off remote procs too */ - if (kill_remote_of_intercomm) { - for (i = 0 ; i < ompi_comm_remote_size(comm) ; ++i) { - if (OPAL_EQUAL != ompi_rte_compare_name_fields(OMPI_RTE_CMP_ALL, - &comm->c_remote_group->grp_proc_pointers[i]->proc_name, - OMPI_PROC_MY_NAME)) { - assert(count <= nabort_procs); - abort_procs[count++] = - comm->c_remote_group->grp_proc_pointers[i]->proc_name; - } else { - /* don't terminate me just yet */ - nabort_procs--; - } + for (i = 0 ; i < ompi_comm_remote_size(comm) ; ++i) { + if (OPAL_EQUAL != ompi_rte_compare_name_fields(OMPI_RTE_CMP_ALL, + &comm->c_remote_group->grp_proc_pointers[i]->proc_name, + OMPI_PROC_MY_NAME)) { + assert(count <= nabort_procs); + abort_procs[count++] = + comm->c_remote_group->grp_proc_pointers[i]->proc_name; + } else { + /* don't terminate me just yet */ + nabort_procs--; } }