1
1

Added BTL_VERBOSE and OMPI_MCA_btl_base_debug , if set to 1 DEBUG output if

set to 2 VERBOSE output.. 

This commit was SVN r6783.
Этот коммит содержится в:
Galen Shipman 2005-08-09 17:49:39 +00:00
родитель 0dc0e78289
Коммит 73757b300c
9 изменённых файлов: 42 добавлений и 38 удалений

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

@ -21,10 +21,7 @@
#include "btl_base_error.h"
#if OMPI_ENABLE_DEBUG
int mca_btl_base_debug = 1;
#endif
int mca_btl_base_debug;
int mca_btl_base_err(const char* fmt, ...)
{

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

@ -72,5 +72,4 @@ do { \
#define BTL_VERBOSE(args)
#endif
#endif

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

@ -59,7 +59,7 @@ OBJ_CLASS_INSTANCE(
*/
#include "ompi/mca/btl/base/static-components.h"
#include "btl_base_error.h"
/*
* Global variables
@ -81,8 +81,16 @@ int mca_btl_base_open(void)
if (already_opened) return OMPI_SUCCESS;
already_opened = true;
/* Open up all available components */
mca_base_param_reg_int_name(
"btl",
"base_debug",
"If btl_base_debug is 1 standard debug is output, if > 1 verbose debug is output",
false, false,
0,
&mca_btl_base_debug);
/* Open up all available components */
if (OMPI_SUCCESS !=
mca_base_components_open("btl", 0, mca_btl_base_static_components,
&mca_btl_base_components_opened, true)) {

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

@ -127,7 +127,7 @@ int mca_btl_mvapi_del_procs(struct mca_btl_base_module_t* btl,
struct mca_btl_base_endpoint_t ** peers)
{
/* Stub */
BTL_DEBUG(("Stub\n"));
BTL_VERBOSE(("Stub\n"));
return OMPI_SUCCESS;
}
@ -388,7 +388,7 @@ mca_btl_base_descriptor_t* mca_btl_mvapi_prepare_src(
mca_mpool_mvapi_registration_t* old_reg =
(mca_mpool_mvapi_registration_t*)
opal_list_remove_first(&mvapi_btl->reg_mru_list);
opal_list_remove_last(&mvapi_btl->reg_mru_list);
if( NULL == old_reg) {
BTL_ERROR(("error removing item from reg_mru_list"));
@ -636,7 +636,7 @@ mca_btl_base_descriptor_t* mca_btl_mvapi_prepare_dst(
mca_mpool_mvapi_registration_t* old_reg =
(mca_mpool_mvapi_registration_t*)
opal_list_remove_first(&mvapi_btl->reg_mru_list);
opal_list_remove_last(&mvapi_btl->reg_mru_list);
if( NULL == old_reg) {
BTL_ERROR(("error removing item from reg_mru_list"));
@ -822,7 +822,7 @@ static void async_event_handler(VAPI_hca_hndl_t hca_hndl,
case VAPI_SEND_QUEUE_DRAINED:
case VAPI_PORT_ACTIVE:
{
BTL_DEBUG(("Got an asynchronous event: %s\n", VAPI_event_record_sym(event_p->type)));
BTL_VERBOSE(("Got an asynchronous event: %s\n", VAPI_event_record_sym(event_p->type)));
break;
}
case VAPI_CQ_ERROR:

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

@ -520,7 +520,7 @@ int mca_btl_mvapi_component_progress()
case VAPI_CQE_RQ_SEND_DATA:
/* Process a RECV */
BTL_DEBUG(("Got a recv completion"));
BTL_VERBOSE(("Got a recv completion"));
frag = (mca_btl_mvapi_frag_t*) comp.id;
endpoint = (mca_btl_mvapi_endpoint_t*) frag->endpoint;
@ -577,7 +577,7 @@ int mca_btl_mvapi_component_progress()
case VAPI_CQE_RQ_SEND_DATA:
BTL_DEBUG(("Got a recv completion"));
BTL_VERBOSE(("Got a recv completion"));
frag = (mca_btl_mvapi_frag_t*) comp.id;
endpoint = (mca_btl_mvapi_endpoint_t*) frag->endpoint;
frag->rc=OMPI_SUCCESS;

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

@ -184,7 +184,7 @@ static int mca_btl_mvapi_endpoint_send_connect_req(mca_btl_base_endpoint_t* endp
mca_btl_mvapi_endpoint_send_cb, NULL);
BTL_DEBUG(("Sending High Priority QP num = %d, Low Priority QP num = %d, LID = %d",
BTL_VERBOSE(("Sending High Priority QP num = %d, Low Priority QP num = %d, LID = %d",
endpoint->lcl_qp_prop_high.qp_num,
endpoint->lcl_qp_prop_low.qp_num,
endpoint->endpoint_btl->port.lid));
@ -260,7 +260,7 @@ static int mca_btl_mvapi_endpoint_set_remote_info(mca_btl_base_endpoint_t* endpo
ORTE_ERROR_LOG(rc);
return rc;
}
BTL_DEBUG(("Received High Priority QP num = %d, Low Priority QP num %d, LID = %d",
BTL_VERBOSE(("Received High Priority QP num = %d, Low Priority QP num %d, LID = %d",
endpoint->rem_qp_num_high,
endpoint->rem_qp_num_low,
endpoint->rem_lid));
@ -312,7 +312,7 @@ static int mca_btl_mvapi_endpoint_start_connect(mca_btl_base_endpoint_t* endpoin
return rc;
}
BTL_DEBUG(("Initialized High Priority QP num = %d, Low Priority QP num = %d, LID = %d",
BTL_VERBOSE(("Initialized High Priority QP num = %d, Low Priority QP num = %d, LID = %d",
endpoint->lcl_qp_prop_high.qp_num,
endpoint->lcl_qp_prop_low.qp_num,
endpoint->endpoint_btl->port.lid));
@ -362,7 +362,7 @@ static int mca_btl_mvapi_endpoint_reply_start_connect(mca_btl_mvapi_endpoint_t *
return rc;
}
BTL_DEBUG(("Initialized High Priority QP num = %d, Low Priority QP num = %d, LID = %d",
BTL_VERBOSE(("Initialized High Priority QP num = %d, Low Priority QP num = %d, LID = %d",
endpoint->lcl_qp_prop_high.qp_num,
endpoint->lcl_qp_prop_low.qp_num,
endpoint->endpoint_btl->port.lid));
@ -519,7 +519,7 @@ int mca_btl_mvapi_endpoint_send(
switch(endpoint->endpoint_state) {
case MCA_BTL_IB_CONNECTING:
BTL_DEBUG(("Queing because state is connecting"));
BTL_VERBOSE(("Queing because state is connecting"));
opal_list_append(&endpoint->pending_send_frags,
(opal_list_item_t *)frag);
@ -529,7 +529,7 @@ int mca_btl_mvapi_endpoint_send(
case MCA_BTL_IB_CONNECT_ACK:
BTL_DEBUG(("Queuing because waiting for ack"));
BTL_VERBOSE(("Queuing because waiting for ack"));
opal_list_append(&endpoint->pending_send_frags,
(opal_list_item_t *)frag);
@ -539,7 +539,7 @@ int mca_btl_mvapi_endpoint_send(
case MCA_BTL_IB_CLOSED:
BTL_DEBUG(("Connection to endpoint closed ... connecting ..."));
BTL_VERBOSE(("Connection to endpoint closed ... connecting ..."));
opal_list_append(&endpoint->pending_send_frags,
(opal_list_item_t *)frag);
@ -558,7 +558,7 @@ int mca_btl_mvapi_endpoint_send(
mvapi_btl = endpoint->endpoint_btl;
BTL_DEBUG(("Send to : %d, len : %d, frag : %p",
BTL_VERBOSE(("Send to : %d, len : %d, frag : %p",
endpoint->endpoint_proc->proc_guid.vpid,
frag->sg_entry.len,
frag));
@ -753,7 +753,7 @@ int mca_btl_mvapi_endpoint_qp_init_query(
return OMPI_ERROR;
}
BTL_DEBUG(("Modified to init..Qp %d", qp_hndl));
BTL_VERBOSE(("Modified to init..Qp %d", qp_hndl));
/********************** INIT --> RTR ************************/
QP_ATTR_MASK_CLR_ALL(qp_attr_mask);
@ -788,7 +788,7 @@ int mca_btl_mvapi_endpoint_qp_init_query(
return OMPI_ERROR;
}
BTL_DEBUG(("Modified to RTR..Qp %d", qp_hndl));
BTL_VERBOSE(("Modified to RTR..Qp %d", qp_hndl));
/************** RTS *******************/
QP_ATTR_MASK_CLR_ALL(qp_attr_mask);
@ -811,7 +811,7 @@ int mca_btl_mvapi_endpoint_qp_init_query(
if(VAPI_OK != ret) {
return OMPI_ERROR;
}
BTL_DEBUG(("Modified to RTS..Qp %d", qp_hndl));
BTL_VERBOSE(("Modified to RTS..Qp %d", qp_hndl));
ret = VAPI_query_qp(nic, qp_hndl, &qp_attr, &qp_attr_mask, &qp_init_attr );
if (ret != VAPI_OK) {

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

@ -451,7 +451,7 @@ mca_btl_base_descriptor_t* mca_btl_openib_prepare_src(
frag->base.des_dst = NULL;
frag->base.des_dst_cnt = 0;
frag->openib_reg = openib_reg;
BTL_DEBUG(("frag->sg_entry.lkey = %lu .addr = %llu", frag->sg_entry.lkey, frag->sg_entry.addr));
BTL_VERBOSE(("frag->sg_entry.lkey = %lu .addr = %llu", frag->sg_entry.lkey, frag->sg_entry.addr));
return &frag->base;
@ -703,7 +703,7 @@ mca_btl_base_descriptor_t* mca_btl_openib_prepare_dst(
frag->base.des_src = NULL;
frag->base.des_src_cnt = 0;
frag->openib_reg = openib_reg;
BTL_DEBUG(("frag->sg_entry.lkey = %lu .addr = %llu frag->segment.seg_key.key32[0] = %lu" , frag->sg_entry.lkey, frag->sg_entry.addr, frag->segment.seg_key.key32[0]));
BTL_VERBOSE(("frag->sg_entry.lkey = %lu .addr = %llu frag->segment.seg_key.key32[0] = %lu" , frag->sg_entry.lkey, frag->sg_entry.addr, frag->segment.seg_key.key32[0]));
return &frag->base;
@ -792,7 +792,7 @@ int mca_btl_openib_put( mca_btl_base_module_t* btl,
frag->sg_entry.addr = (uintptr_t) frag->base.des_src->seg_addr.pval;
frag->sg_entry.length = frag->base.des_src->seg_len;
BTL_DEBUG(("frag->wr_desc.sr_desc.wr.rdma.remote_addr = %llu .rkey = %lu frag->sg_entry.addr = %llu .length = %lu"
BTL_VERBOSE(("frag->wr_desc.sr_desc.wr.rdma.remote_addr = %llu .rkey = %lu frag->sg_entry.addr = %llu .length = %lu"
, frag->wr_desc.sr_desc.wr.rdma.remote_addr
, frag->wr_desc.sr_desc.wr.rdma.rkey
, frag->sg_entry.addr

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

@ -519,7 +519,7 @@ int mca_btl_openib_component_progress()
return OMPI_ERROR;
}
else if(1 == ne) {
BTL_DEBUG(("completion queue event says opcode is %d\n", wc.opcode));
BTL_VERBOSE(("completion queue event says opcode is %d\n", wc.opcode));
/* Handle work completions */
switch(wc.opcode) {
@ -530,7 +530,7 @@ int mca_btl_openib_component_progress()
case IBV_WC_RECV:
/* Process a RECV */
BTL_DEBUG(("Got an recv on the completion queue"));
BTL_VERBOSE(("Got an recv on the completion queue"));
frag = (mca_btl_openib_frag_t*) wc.wr_id;
endpoint = (mca_btl_openib_endpoint_t*) frag->endpoint;
frag->rc=OMPI_SUCCESS;
@ -592,7 +592,7 @@ int mca_btl_openib_component_progress()
case IBV_WC_RECV:
/* process a recv completion (this should only occur for a send not an rdma) */
BTL_DEBUG(( "Got a recv completion"));
BTL_VERBOSE(( "Got a recv completion"));
frag = (mca_btl_openib_frag_t*) wc.wr_id;
endpoint = (mca_btl_openib_endpoint_t*) frag->endpoint;
frag->rc=OMPI_SUCCESS;

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

@ -206,7 +206,7 @@ static int mca_btl_openib_endpoint_send_connect_req(mca_btl_base_endpoint_t* end
mca_btl_openib_endpoint_send_cb, NULL);
BTL_DEBUG(("Sending High Priority QP num = %d, Low Priority QP num = %d, LID = %d",
BTL_VERBOSE(("Sending High Priority QP num = %d, Low Priority QP num = %d, LID = %d",
endpoint->lcl_qp_high->qp_num,
endpoint->lcl_qp_low->qp_num,
endpoint->endpoint_btl->ib_port_attr->lid));
@ -297,7 +297,7 @@ static int mca_btl_openib_endpoint_set_remote_info(mca_btl_base_endpoint_t* endp
ORTE_ERROR_LOG(rc);
return rc;
}
BTL_DEBUG(("Received High Priority QP num = %d, Low Priority QP num %d, LID = %d",
BTL_VERBOSE(("Received High Priority QP num = %d, Low Priority QP num %d, LID = %d",
endpoint->rem_qp_num_high,
endpoint->rem_qp_num_low,
endpoint->rem_lid));
@ -345,7 +345,7 @@ static int mca_btl_openib_endpoint_start_connect(mca_btl_base_endpoint_t* endpoi
}
endpoint->lcl_psn_low = lrand48() & 0xffffff;
BTL_DEBUG(("Initialized High Priority QP num = %d, Low Priority QP num = %d, LID = %d",
BTL_VERBOSE(("Initialized High Priority QP num = %d, Low Priority QP num = %d, LID = %d",
endpoint->lcl_qp_high->qp_num,
endpoint->lcl_qp_low->qp_num,
openib_btl->ib_port_attr->lid));
@ -392,7 +392,7 @@ static int mca_btl_openib_endpoint_reply_start_connect(mca_btl_openib_endpoint_t
}
endpoint->lcl_psn_low = lrand48() & 0xffffff;
BTL_DEBUG(("Initialized High Priority QP num = %d, Low Priority QP num = %d, LID = %d",
BTL_VERBOSE(("Initialized High Priority QP num = %d, Low Priority QP num = %d, LID = %d",
endpoint->lcl_qp_high->qp_num,
endpoint->lcl_qp_low->qp_num,
openib_btl->ib_port_attr->lid));
@ -553,7 +553,7 @@ int mca_btl_openib_endpoint_send(
switch(endpoint->endpoint_state) {
case MCA_BTL_IB_CONNECTING:
BTL_DEBUG(("Queing because state is connecting"));
BTL_VERBOSE(("Queing because state is connecting"));
opal_list_append(&endpoint->pending_send_frags,
(opal_list_item_t *)frag);
@ -563,7 +563,7 @@ int mca_btl_openib_endpoint_send(
case MCA_BTL_IB_CONNECT_ACK:
BTL_DEBUG(("Queuing because waiting for ack"));
BTL_VERBOSE(("Queuing because waiting for ack"));
opal_list_append(&endpoint->pending_send_frags,
(opal_list_item_t *)frag);
@ -573,7 +573,7 @@ int mca_btl_openib_endpoint_send(
case MCA_BTL_IB_CLOSED:
BTL_DEBUG(("Connection to endpoint closed ... connecting ..."));
BTL_VERBOSE(("Connection to endpoint closed ... connecting ..."));
opal_list_append(&endpoint->pending_send_frags,
(opal_list_item_t *)frag);
rc = mca_btl_openib_endpoint_start_connect(endpoint);
@ -587,7 +587,7 @@ int mca_btl_openib_endpoint_send(
case MCA_BTL_IB_CONNECTED:
{
openib_btl = endpoint->endpoint_btl;
BTL_DEBUG(("Send to : %d, len : %lu, frag : %llu",
BTL_VERBOSE(("Send to : %d, len : %lu, frag : %llu",
endpoint->endpoint_proc->proc_guid.vpid,
frag->sg_entry.length,
(unsigned long long) frag));