2005-07-20 01:04:22 +04: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.
|
|
|
|
* Copyright (c) 2004-2005 The Regents of the University of California.
|
|
|
|
* All rights reserved.
|
|
|
|
* $COPYRIGHT$
|
|
|
|
*
|
|
|
|
* Additional copyrights may follow
|
|
|
|
*
|
|
|
|
* $HEADER$
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef MCA_BTL_BASE_ERROR_H
|
|
|
|
#define MCA_BTL_BASE_ERROR_H
|
|
|
|
|
2005-08-02 17:20:50 +04:00
|
|
|
#include "ompi_config.h"
|
|
|
|
#include <stdio.h>
|
2005-09-13 06:00:28 +04:00
|
|
|
#include "orte/util/proc_info.h"
|
2005-07-20 19:17:18 +04:00
|
|
|
|
2005-08-02 17:20:50 +04:00
|
|
|
extern int mca_btl_base_debug;
|
|
|
|
|
|
|
|
extern int mca_btl_base_err(const char*, ...);
|
|
|
|
extern int mca_btl_base_out(const char*, ...);
|
|
|
|
|
|
|
|
#define BTL_OUTPUT(args) \
|
|
|
|
do { \
|
|
|
|
mca_btl_base_out("[%lu,%lu,%lu][%s:%d:%s] ", \
|
|
|
|
ORTE_NAME_ARGS(orte_process_info.my_name), \
|
|
|
|
__FILE__, __LINE__, __func__); \
|
|
|
|
mca_btl_base_out args; \
|
|
|
|
mca_btl_base_out("\n"); \
|
|
|
|
} while(0);
|
|
|
|
|
|
|
|
|
|
|
|
#define BTL_ERROR(args) \
|
|
|
|
do { \
|
|
|
|
mca_btl_base_err("[%lu,%lu,%lu][%s:%d:%s] ", \
|
|
|
|
ORTE_NAME_ARGS(orte_process_info.my_name), \
|
|
|
|
__FILE__, __LINE__, __func__); \
|
|
|
|
mca_btl_base_err args; \
|
|
|
|
mca_btl_base_out("\n"); \
|
|
|
|
} while(0);
|
|
|
|
|
|
|
|
|
|
|
|
#if OMPI_ENABLE_DEBUG
|
|
|
|
#define BTL_DEBUG(args) \
|
|
|
|
do { \
|
|
|
|
if(mca_btl_base_debug) { \
|
|
|
|
mca_btl_base_err("[%lu,%lu,%lu][%s:%d:%s] ", \
|
|
|
|
ORTE_NAME_ARGS(orte_process_info.my_name), \
|
|
|
|
__FILE__, __LINE__, __func__); \
|
|
|
|
mca_btl_base_err args; \
|
2005-08-09 20:24:48 +04:00
|
|
|
mca_btl_base_err("\n"); \
|
2005-08-02 17:20:50 +04:00
|
|
|
} \
|
|
|
|
} while(0);
|
2005-08-09 20:22:55 +04:00
|
|
|
#define BTL_VERBOSE(args) \
|
|
|
|
do { \
|
|
|
|
if(mca_btl_base_debug > 1) { \
|
|
|
|
mca_btl_base_err("[%lu,%lu,%lu][%s:%d:%s] ", \
|
|
|
|
ORTE_NAME_ARGS(orte_process_info.my_name), \
|
|
|
|
__FILE__, __LINE__, __func__); \
|
|
|
|
mca_btl_base_err args; \
|
2005-08-09 20:24:48 +04:00
|
|
|
mca_btl_base_err("\n"); \
|
2005-08-09 20:22:55 +04:00
|
|
|
} \
|
|
|
|
} while(0);
|
2005-07-20 19:17:18 +04:00
|
|
|
#else
|
2005-08-02 17:20:50 +04:00
|
|
|
#define BTL_DEBUG(args)
|
2005-08-09 20:22:55 +04:00
|
|
|
#define BTL_VERBOSE(args)
|
2005-08-02 17:20:50 +04:00
|
|
|
#endif
|
|
|
|
|
2005-07-20 01:04:22 +04:00
|
|
|
#endif
|
2005-09-30 08:39:44 +04:00
|
|
|
|
|
|
|
|
|
|
|
#if defined(c_plusplus) || defined(__cplusplus)
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
|
|
|
extern void mca_btl_base_error_no_nics(const char* transport,
|
|
|
|
const char* nic_name);
|
|
|
|
|
|
|
|
#if defined(c_plusplus) || defined(__cplusplus)
|
|
|
|
}
|
|
|
|
#endif
|