From 1581a8feb4b9bd740e8494611f7767406c203333 Mon Sep 17 00:00:00 2001 From: Jeff Squyres Date: Fri, 15 Apr 2005 16:38:44 +0000 Subject: [PATCH] If MPI_INIT hasn't been called or MPI_FINALIZE has been called, then just abort(). This commit was SVN r5391. --- src/mpi/runtime/ompi_mpi_abort.c | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/src/mpi/runtime/ompi_mpi_abort.c b/src/mpi/runtime/ompi_mpi_abort.c index c80520f490..23a77468e9 100644 --- a/src/mpi/runtime/ompi_mpi_abort.c +++ b/src/mpi/runtime/ompi_mpi_abort.c @@ -78,25 +78,25 @@ ompi_mpi_abort(struct ompi_communicator_t* comm, /* Corner case: if we're being called as a result of the OMPI_ERR_INIT_FINALIZE macro (meaning that this is before - MPI_INIT or after MPI_FINALIZE), then comm is not setup yet / - has already been cleaned up. */ + MPI_INIT or after MPI_FINALIZE), then just abort nothing MPI or + ORTE has been setup yet. */ - if (ompi_mpi_initialized && !ompi_mpi_finalized) { + if (!ompi_mpi_initialized || ompi_mpi_finalized) { + abort(); + } - /* kill everyone in the remote group execpt our jobid, if - requested */ - if (kill_remote_of_intercomm && OMPI_COMM_IS_INTER(comm)) { - abort_procs(comm->c_remote_group->grp_proc_pointers, - comm->c_remote_group->grp_proc_count, - my_jobid); - } - - /* kill everyone in the local group, except our jobid. */ - abort_procs(comm->c_local_group->grp_proc_pointers, - comm->c_local_group->grp_proc_count, + /* kill everyone in the remote group execpt our jobid, if + requested */ + if (kill_remote_of_intercomm && OMPI_COMM_IS_INTER(comm)) { + abort_procs(comm->c_remote_group->grp_proc_pointers, + comm->c_remote_group->grp_proc_count, my_jobid); } + /* kill everyone in the local group, except our jobid. */ + abort_procs(comm->c_local_group->grp_proc_pointers, + comm->c_local_group->grp_proc_count, + my_jobid); ret = orte_rmgr.terminate_job(my_jobid);