First cut of MPI_ABORT. We might make it better someday (i.e., try to
honor killing only the procs in the comm, do something with the errorcode, etc.). This commit was SVN r2690.
Этот коммит содержится в:
родитель
67bf0036b4
Коммит
9bdf18443a
@ -2,12 +2,19 @@
|
|||||||
* $HEADERS$
|
* $HEADERS$
|
||||||
*/
|
*/
|
||||||
#include "ompi_config.h"
|
#include "ompi_config.h"
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
|
||||||
#include "mpi.h"
|
#include "mpi.h"
|
||||||
#include "mpi/c/bindings.h"
|
#include "mpi/c/bindings.h"
|
||||||
|
#include "util/show_help.h"
|
||||||
|
#include "util/proc_info.h"
|
||||||
|
#include "runtime/runtime.h"
|
||||||
#include "communicator/communicator.h"
|
#include "communicator/communicator.h"
|
||||||
#include "errhandler/errhandler.h"
|
#include "errhandler/errhandler.h"
|
||||||
|
#include "mca/ns/ns.h"
|
||||||
|
#include "mca/ns/base/base.h"
|
||||||
|
|
||||||
#if OMPI_HAVE_WEAK_SYMBOLS && OMPI_PROFILING_DEFINES
|
#if OMPI_HAVE_WEAK_SYMBOLS && OMPI_PROFILING_DEFINES
|
||||||
#pragma weak MPI_Abort = PMPI_Abort
|
#pragma weak MPI_Abort = PMPI_Abort
|
||||||
@ -22,11 +29,25 @@ static const char FUNC_NAME[] = "MPI_Abort";
|
|||||||
|
|
||||||
int MPI_Abort(MPI_Comm comm, int errorcode)
|
int MPI_Abort(MPI_Comm comm, int errorcode)
|
||||||
{
|
{
|
||||||
if (MPI_PARAM_CHECK) {
|
mca_ns_base_jobid_t jobid;
|
||||||
OMPI_ERR_INIT_FINALIZE(FUNC_NAME);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* This function is not yet implemented */
|
/* Don't even bother checking comm and errorcode values for
|
||||||
|
errors */
|
||||||
|
|
||||||
return OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_INTERN, FUNC_NAME);
|
if (MPI_PARAM_CHECK) {
|
||||||
|
OMPI_ERR_INIT_FINALIZE(FUNC_NAME);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Kill everyone in the job. We may make this better someday to
|
||||||
|
actually loop over ompi_rte_kill_proc() to only kill the procs
|
||||||
|
in comm, and additionally to somehow use errorcode. */
|
||||||
|
|
||||||
|
jobid = ompi_name_server.get_jobid(ompi_process_info.name);
|
||||||
|
ompi_rte_kill_job(jobid, 0);
|
||||||
|
|
||||||
|
/* If we return from this, then the selected PCM was unable to
|
||||||
|
kill the job (and the rte printed an error message). So just
|
||||||
|
die die die. */
|
||||||
|
|
||||||
|
abort();
|
||||||
}
|
}
|
||||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user