1
1

Move the error name macro to the errmgr framework. Add a second level of tracing. Remove an obsolete file.

This commit was SVN r7445.
Этот коммит содержится в:
Ralph Castain 2005-09-20 17:09:11 +00:00
родитель e4985c2a07
Коммит 5686e8119e
5 изменённых файлов: 37 добавлений и 62 удалений

Просмотреть файл

@ -38,16 +38,23 @@ extern "C" {
__func__, __FILE__, __LINE__); \
} while (0)
#define OPAL_TRACE_ARG(verbose, foo) \
#define OPAL_TRACE_ARG1(verbose, foo) \
do { \
opal_output_verbose(verbose, opal_trace_handle, "TRACE: %s @ %s:%d arg: %lu", \
__func__, __FILE__, __LINE__, (unsigned long)foo); \
} while (0)
#define OPAL_TRACE_ARG2(verbose, foo, foo2) \
do { \
opal_output_verbose(verbose, opal_trace_handle, "TRACE: %s @ %s:%d arg: %lu\n\t0x%x", \
__func__, __FILE__, __LINE__, (unsigned long)foo, (unsigned long)foo2); \
} while (0)
#else
#define OPAL_TRACE(verbose)
#define OPAL_TRACE_ARG(verbose, foo)
#define OPAL_TRACE_ARG1(verbose, foo)
#define OPAL_TRACE_ARG2(verbose, foo, foo2)
#endif /* ENABLE_TRACE */

Просмотреть файл

@ -1,32 +0,0 @@
/*
* 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.
* Copyright (c) 2004-2005 The Regents of the University of California.
* All rights reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
*
* $HEADER$
*/
#include "ompi_config.h"
#include "opal/util/output.h"
#include "runtime/runtime.h"
#include "mca/ns/ns.h"
#include "mca/errmgr/base/base.h"
void mca_errmgr_base_log(char *msg, char *filename, int line)
{
opal_output(0, "[%lu,%lu,%lu] ORTE_ERROR_LOG: %s in file %s at line %d",
ORTE_NAME_ARGS(orte_process_info.my_name),
msg, filename, line);
}

Просмотреть файл

@ -39,6 +39,13 @@ extern "C" {
/*
* Macro definitions
*/
/*
* Thess macros and associated error name array are used to output intelligible error
* messages.
*/
#define ORTE_ERROR_NAME(n) opal_strerror(n)
#define ORTE_ERROR_LOG(n) \
orte_errmgr.log((n), __FILE__, __LINE__)

Просмотреть файл

@ -21,13 +21,6 @@
#include "mca/ns/ns_types.h"
#include "opal/util/error.h"
/*
* This macro and array are used to output intelligible error
* messages.
*/
#define ORTE_ERROR_NAME(n) opal_strerror(n)
/*
* Standard names used across the system
*/

Просмотреть файл

@ -436,7 +436,7 @@ static void dump_aborted_procs(orte_jobid_t jobid)
NULL
};
OPAL_TRACE_ARG(1, jobid);
OPAL_TRACE_ARG1(1, jobid);
/* query the job segment on the registry */
if(ORTE_SUCCESS != (rc = orte_schema.get_job_segment_name(&segment, jobid))) {
@ -538,7 +538,7 @@ static void dump_aborted_procs(orte_jobid_t jobid)
static void job_state_callback(orte_jobid_t jobid, orte_proc_state_t state)
{
OPAL_TRACE_ARG(1, jobid);
OPAL_TRACE_ARG2(1, jobid, state);
OPAL_THREAD_LOCK(&orterun_globals.lock);