2005-03-14 23:57:21 +03:00
|
|
|
/*
|
|
|
|
* Copyright (c) 2004-2005 The Trustees of Indiana University.
|
|
|
|
* All rights reserved.
|
|
|
|
* Copyright (c) 2004-2005 The Trustees of the University of Tennessee.
|
|
|
|
* All rights reserved.
|
|
|
|
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
|
|
|
|
* University of Stuttgart. All rights reserved.
|
2005-03-24 15:43:37 +03:00
|
|
|
* Copyright (c) 2004-2005 The Regents of the University of California.
|
|
|
|
* All rights reserved.
|
2005-03-14 23:57:21 +03:00
|
|
|
* $COPYRIGHT$
|
|
|
|
*
|
|
|
|
* Additional copyrights may follow
|
|
|
|
*
|
|
|
|
* $HEADER$
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
#include "orte_config.h"
|
2005-04-11 22:43:57 +04:00
|
|
|
#ifdef HAVE_UNISTD_H
|
2005-03-14 23:57:21 +03:00
|
|
|
#include <unistd.h>
|
2005-04-11 08:47:58 +04:00
|
|
|
#endif
|
2005-03-14 23:57:21 +03:00
|
|
|
#include <stdlib.h>
|
|
|
|
#include "include/orte_constants.h"
|
2005-05-01 04:53:00 +04:00
|
|
|
#include "mca/schema/schema.h"
|
2005-03-14 23:57:21 +03:00
|
|
|
|
|
|
|
#include "runtime/runtime.h"
|
|
|
|
#include "runtime/orte_wait.h"
|
2005-07-04 03:31:27 +04:00
|
|
|
#include "opal/util/output.h"
|
2005-03-14 23:57:21 +03:00
|
|
|
#include "util/proc_info.h"
|
|
|
|
#include "mca/ns/ns.h"
|
|
|
|
|
|
|
|
#include "mca/rmgr/rmgr.h"
|
|
|
|
|
|
|
|
#include "mca/errmgr/base/base.h"
|
|
|
|
|
|
|
|
|
|
|
|
void orte_errmgr_base_log(int error_code, char *filename, int line)
|
|
|
|
{
|
|
|
|
if (NULL == orte_process_info.my_name) {
|
2005-07-04 03:31:27 +04:00
|
|
|
opal_output(0, "[NO-NAME] ORTE_ERROR_LOG: %s in file %s at line %d",
|
2005-03-14 23:57:21 +03:00
|
|
|
ORTE_ERROR_NAME(error_code), filename, line);
|
|
|
|
} else {
|
2005-07-04 03:31:27 +04:00
|
|
|
opal_output(0, "[%lu,%lu,%lu] ORTE_ERROR_LOG: %s in file %s at line %d",
|
2005-03-14 23:57:21 +03:00
|
|
|
ORTE_NAME_ARGS(orte_process_info.my_name),
|
|
|
|
ORTE_ERROR_NAME(error_code), filename, line);
|
|
|
|
}
|
|
|
|
/* orte_errmgr_base_error_detected(error_code); */
|
|
|
|
}
|
|
|
|
|
|
|
|
void orte_errmgr_base_proc_aborted(orte_process_name_t *proc)
|
|
|
|
{
|
|
|
|
orte_jobid_t job;
|
|
|
|
int rc;
|
|
|
|
|
|
|
|
if (ORTE_SUCCESS != (rc = orte_ns.get_jobid(&job, proc))) {
|
|
|
|
ORTE_ERROR_LOG(rc);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
orte_rmgr.terminate_job(job);
|
|
|
|
}
|
|
|
|
|
|
|
|
void orte_errmgr_base_incomplete_start(orte_jobid_t job)
|
|
|
|
{
|
|
|
|
orte_rmgr.terminate_job(job);
|
|
|
|
}
|
|
|
|
|
|
|
|
void orte_errmgr_base_error_detected(int error_code)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
void orte_errmgr_base_abort()
|
|
|
|
{
|
|
|
|
/* kill and reap all children */
|
|
|
|
orte_wait_kill(9);
|
|
|
|
|
|
|
|
/* abnormal exit */
|
2005-08-27 00:36:11 +04:00
|
|
|
orte_abort(-1, NULL);
|
2005-03-14 23:57:21 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
int orte_errmgr_base_register_job(orte_jobid_t job)
|
|
|
|
{
|
|
|
|
/* register subscription for process_status values
|
|
|
|
* changing to abnormal termination codes
|
|
|
|
*/
|
|
|
|
|
|
|
|
return ORTE_SUCCESS;
|
|
|
|
}
|