2005-03-14 23:57:21 +03:00
|
|
|
/*
|
2005-11-05 22:57:48 +03:00
|
|
|
* 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
|
|
|
|
* of Tennessee Research Foundation. All rights
|
|
|
|
* reserved.
|
2005-03-14 23:57:21 +03:00
|
|
|
* 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"
|
2008-02-28 04:57:57 +03:00
|
|
|
#include "orte/constants.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>
|
|
|
|
|
2005-09-19 19:29:14 +04:00
|
|
|
#include "opal/util/trace.h"
|
2009-02-14 05:26:12 +03:00
|
|
|
#include "opal/util/output.h"
|
2008-02-28 04:57:57 +03:00
|
|
|
#include "opal/util/error.h"
|
|
|
|
|
|
|
|
#include "orte/runtime/orte_globals.h"
|
|
|
|
#include "orte/util/name_fns.h"
|
|
|
|
#include "orte/util/session_dir.h"
|
|
|
|
#include "orte/mca/ess/ess.h"
|
2005-03-14 23:57:21 +03:00
|
|
|
|
2006-09-15 01:29:51 +04:00
|
|
|
#include "orte/mca/errmgr/errmgr.h"
|
|
|
|
#include "orte/mca/errmgr/base/errmgr_private.h"
|
2005-03-14 23:57:21 +03:00
|
|
|
|
|
|
|
|
|
|
|
void orte_errmgr_base_log(int error_code, char *filename, int line)
|
|
|
|
{
|
2005-09-19 19:29:14 +04:00
|
|
|
OPAL_TRACE(1);
|
|
|
|
|
2006-12-11 21:07:07 +03:00
|
|
|
if (ORTE_ERR_SILENT == error_code) {
|
|
|
|
/* if the error is silent, say nothing */
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
2008-06-09 18:53:58 +04:00
|
|
|
opal_output(0, "%s ORTE_ERROR_LOG: %s in file %s at line %d",
|
2009-03-06 00:14:18 +03:00
|
|
|
orte_util_print_name_args(ORTE_PROC_MY_NAME),
|
2007-07-20 06:34:29 +04:00
|
|
|
ORTE_ERROR_NAME(error_code), filename, line);
|
2005-03-14 23:57:21 +03:00
|
|
|
}
|
|
|
|
|
2008-02-28 04:57:57 +03:00
|
|
|
void orte_errmgr_base_proc_aborted_not_avail(orte_process_name_t *name, int exit_code)
|
2005-03-14 23:57:21 +03:00
|
|
|
{
|
2008-02-28 04:57:57 +03:00
|
|
|
return;
|
2005-03-14 23:57:21 +03:00
|
|
|
}
|
|
|
|
|
2008-02-28 04:57:57 +03:00
|
|
|
void orte_errmgr_base_incomplete_start_not_avail(orte_jobid_t job, int exit_code)
|
2005-03-14 23:57:21 +03:00
|
|
|
{
|
2008-02-28 04:57:57 +03:00
|
|
|
return;
|
2005-03-14 23:57:21 +03:00
|
|
|
}
|
|
|
|
|
2008-02-28 04:57:57 +03:00
|
|
|
void orte_errmgr_base_error_abort(int error_code, char *fmt, ...)
|
2005-03-14 23:57:21 +03:00
|
|
|
{
|
2008-02-28 04:57:57 +03:00
|
|
|
va_list arglist;
|
|
|
|
|
|
|
|
/* If there was a message, output it */
|
|
|
|
va_start(arglist, fmt);
|
|
|
|
if( NULL != fmt ) {
|
|
|
|
char* buffer = NULL;
|
|
|
|
vasprintf( &buffer, fmt, arglist );
|
2008-06-09 18:53:58 +04:00
|
|
|
opal_output( 0, buffer );
|
2008-02-28 04:57:57 +03:00
|
|
|
free( buffer );
|
|
|
|
}
|
|
|
|
va_end(arglist);
|
|
|
|
|
|
|
|
/* cleanup my session directory */
|
|
|
|
orte_session_dir_finalize(ORTE_PROC_MY_NAME);
|
|
|
|
|
|
|
|
/* abnormal exit */
|
|
|
|
orte_ess.abort(error_code, false);
|
2005-03-14 23:57:21 +03:00
|
|
|
}
|
|
|
|
|
2008-02-28 04:57:57 +03:00
|
|
|
int orte_errmgr_base_register_cb_not_avail(orte_jobid_t job,
|
|
|
|
orte_job_state_t state,
|
|
|
|
orte_errmgr_cb_fn_t cbfunc,
|
|
|
|
void *cbdata)
|
2005-03-14 23:57:21 +03:00
|
|
|
{
|
2006-09-15 01:29:51 +04:00
|
|
|
return ORTE_ERR_NOT_AVAILABLE;
|
2005-03-14 23:57:21 +03:00
|
|
|
}
|