1
1

Update to use BTL_VERBOSE and BTL_ERROR instead of opal_output'ing to

the mca_btl_base_output stream directly (and relying on it to be -1 if
we didn't want any output).

This commit was SVN r16449.
Этот коммит содержится в:
Jeff Squyres 2007-10-15 17:53:02 +00:00
родитель 423f23eb6a
Коммит 94b1e9cff9
5 изменённых файлов: 38 добавлений и 37 удалений

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

@ -393,7 +393,6 @@ int mca_btl_openib_del_procs(struct mca_btl_base_module_t* btl,
mca_btl_openib_module_t* openib_btl = (mca_btl_openib_module_t*) btl; mca_btl_openib_module_t* openib_btl = (mca_btl_openib_module_t*) btl;
mca_btl_openib_endpoint_t* endpoint; mca_btl_openib_endpoint_t* endpoint;
/* opal_output(0, "del_procs called!\n"); */
for (i=0 ; i < (int) nprocs ; i++) { for (i=0 ; i < (int) nprocs ; i++) {
mca_btl_base_endpoint_t* del_endpoint = peers[i]; mca_btl_base_endpoint_t* del_endpoint = peers[i];
for(ep_index=0; for(ep_index=0;
@ -406,8 +405,8 @@ int mca_btl_openib_del_procs(struct mca_btl_base_module_t* btl,
continue; continue;
} }
if (endpoint == del_endpoint) { if (endpoint == del_endpoint) {
opal_output(mca_btl_base_output,"in del_procs %d, setting another endpoint to null\n", BTL_VERBOSE(("in del_procs %d, setting another endpoint to null\n",
ep_index); ep_index));
orte_pointer_array_set_item(openib_btl->hca->endpoints, orte_pointer_array_set_item(openib_btl->hca->endpoints,
ep_index, NULL); ep_index, NULL);
assert(((opal_object_t*)endpoint)->obj_reference_count == 1); assert(((opal_object_t*)endpoint)->obj_reference_count == 1);

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

@ -321,8 +321,8 @@ static int openib_dereg_mr(void *reg_data, mca_mpool_base_registration_t *reg)
if(openib_reg->mr != NULL) { if(openib_reg->mr != NULL) {
if(ibv_dereg_mr(openib_reg->mr)) { if(ibv_dereg_mr(openib_reg->mr)) {
opal_output(mca_btl_base_output, "%s: error unpinning openib memory errno says %s\n", BTL_ERROR(("%s: error unpinning openib memory errno says %s\n",
__func__, strerror(errno)); __func__, strerror(errno)));
return OMPI_ERROR; return OMPI_ERROR;
} }
} }

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

@ -544,12 +544,12 @@ static int mca_btl_openib_mca_setup_qps(void)
mca_btl_openib_component.qp_infos[qp].u.pp_qp.rd_win; mca_btl_openib_component.qp_infos[qp].u.pp_qp.rd_win;
mca_btl_openib_component.qp_infos[qp].u.pp_qp.rd_rsv = mca_btl_openib_component.qp_infos[qp].u.pp_qp.rd_rsv =
atoi_param(P(5), tmp); atoi_param(P(5), tmp);
opal_output(mca_btl_base_output, "pp: rd_num is %d\trd_low is %d\trd_win %d\trd_rsv %d \n", BTL_VERBOSE(("pp: rd_num is %d\trd_low is %d\trd_win %d\trd_rsv %d \n",
mca_btl_openib_component.qp_infos[qp].rd_num, mca_btl_openib_component.qp_infos[qp].rd_num,
mca_btl_openib_component.qp_infos[qp].rd_low, mca_btl_openib_component.qp_infos[qp].rd_low,
mca_btl_openib_component.qp_infos[qp].u.pp_qp.rd_win, mca_btl_openib_component.qp_infos[qp].u.pp_qp.rd_win,
mca_btl_openib_component.qp_infos[qp].u.pp_qp.rd_rsv mca_btl_openib_component.qp_infos[qp].u.pp_qp.rd_rsv
); ));
mca_btl_openib_component.qp_infos[qp].type = MCA_BTL_OPENIB_PP_QP; mca_btl_openib_component.qp_infos[qp].type = MCA_BTL_OPENIB_PP_QP;
@ -576,10 +576,10 @@ static int mca_btl_openib_mca_setup_qps(void)
tmp = mca_btl_openib_component.qp_infos[qp].rd_low >> 2; tmp = mca_btl_openib_component.qp_infos[qp].rd_low >> 2;
mca_btl_openib_component.qp_infos[qp].u.srq_qp.sd_max = mca_btl_openib_component.qp_infos[qp].u.srq_qp.sd_max =
atoi_param(P(4), tmp); atoi_param(P(4), tmp);
opal_output(mca_btl_base_output, "srq: rd_num is %d\trd_low is %d\tsd_max is %d\n", BTL_VERBOSE(("srq: rd_num is %d\trd_low is %d\tsd_max is %d\n",
mca_btl_openib_component.qp_infos[qp].rd_num, mca_btl_openib_component.qp_infos[qp].rd_num,
mca_btl_openib_component.qp_infos[qp].rd_low, mca_btl_openib_component.qp_infos[qp].rd_low,
mca_btl_openib_component.qp_infos[qp].u.srq_qp.sd_max); mca_btl_openib_component.qp_infos[qp].u.srq_qp.sd_max));
mca_btl_openib_component.qp_infos[qp].type = MCA_BTL_OPENIB_SRQ_QP; mca_btl_openib_component.qp_infos[qp].type = MCA_BTL_OPENIB_SRQ_QP;
/* Calculate the smallest freelist size that can be allowed */ /* Calculate the smallest freelist size that can be allowed */

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

@ -138,15 +138,17 @@ mca_btl_openib_proc_t* mca_btl_openib_proc_create(ompi_proc_t* ompi_proc)
if(OMPI_SUCCESS != rc) { if(OMPI_SUCCESS != rc) {
opal_output(mca_btl_base_output, "[%s:%d] ompi_modex_recv failed for peer %s", BTL_ERROR(("[%s:%d] ompi_modex_recv failed for peer %s",
__FILE__,__LINE__,ORTE_NAME_PRINT(&ompi_proc->proc_name)); __FILE__, __LINE__,
ORTE_NAME_PRINT(&ompi_proc->proc_name)));
OBJ_RELEASE(module_proc); OBJ_RELEASE(module_proc);
return NULL; return NULL;
} }
if((size % sizeof(mca_btl_openib_port_info_t)) != 0) { if((size % sizeof(mca_btl_openib_port_info_t)) != 0) {
opal_output(mca_btl_base_output, "[%s:%d] invalid module address for peer %s", BTL_ERROR(("[%s:%d] invalid module address for peer %s",
__FILE__,__LINE__,ORTE_NAME_PRINT(&ompi_proc->proc_name)); __FILE__, __LINE__,
ORTE_NAME_PRINT(&ompi_proc->proc_name)));
OBJ_RELEASE(module_proc); OBJ_RELEASE(module_proc);
return NULL; return NULL;
} }

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

@ -369,14 +369,14 @@ static int send_connect_data(mca_btl_base_endpoint_t* endpoint,
} }
/* pack the info in the send buffer */ /* pack the info in the send buffer */
opal_output(mca_btl_base_output, "packing %d of %d\n", 1, ORTE_UINT8); BTL_VERBOSE(("packing %d of %d\n", 1, ORTE_UINT8));
rc = orte_dss.pack(buffer, &message_type, 1, ORTE_UINT8); rc = orte_dss.pack(buffer, &message_type, 1, ORTE_UINT8);
if (ORTE_SUCCESS != rc) { if (ORTE_SUCCESS != rc) {
ORTE_ERROR_LOG(rc); ORTE_ERROR_LOG(rc);
return rc; return rc;
} }
opal_output(mca_btl_base_output, "packing %d of %d\n", 1, ORTE_UINT64); BTL_VERBOSE(("packing %d of %d\n", 1, ORTE_UINT64));
rc = orte_dss.pack(buffer, &endpoint->subnet_id, 1, ORTE_UINT64); rc = orte_dss.pack(buffer, &endpoint->subnet_id, 1, ORTE_UINT64);
if (ORTE_SUCCESS != rc) { if (ORTE_SUCCESS != rc) {
ORTE_ERROR_LOG(rc); ORTE_ERROR_LOG(rc);
@ -385,7 +385,7 @@ static int send_connect_data(mca_btl_base_endpoint_t* endpoint,
if (message_type != ENDPOINT_CONNECT_REQUEST) { if (message_type != ENDPOINT_CONNECT_REQUEST) {
/* send the QP connect request info we respond to */ /* send the QP connect request info we respond to */
opal_output(mca_btl_base_output, "packing %d of %d\n", 1, ORTE_UINT32); BTL_VERBOSE(("packing %d of %d\n", 1, ORTE_UINT32));
rc = orte_dss.pack(buffer, rc = orte_dss.pack(buffer,
&endpoint->rem_info.rem_qps[0].rem_qp_num, 1, &endpoint->rem_info.rem_qps[0].rem_qp_num, 1,
ORTE_UINT32); ORTE_UINT32);
@ -393,7 +393,7 @@ static int send_connect_data(mca_btl_base_endpoint_t* endpoint,
ORTE_ERROR_LOG(rc); ORTE_ERROR_LOG(rc);
return rc; return rc;
} }
opal_output(mca_btl_base_output, "packing %d of %d\n", 1, ORTE_UINT16); BTL_VERBOSE(("packing %d of %d\n", 1, ORTE_UINT16));
rc = orte_dss.pack(buffer, &endpoint->rem_info.rem_lid, 1, ORTE_UINT16); rc = orte_dss.pack(buffer, &endpoint->rem_info.rem_lid, 1, ORTE_UINT16);
if (ORTE_SUCCESS != rc) { if (ORTE_SUCCESS != rc) {
ORTE_ERROR_LOG(rc); ORTE_ERROR_LOG(rc);
@ -405,14 +405,14 @@ static int send_connect_data(mca_btl_base_endpoint_t* endpoint,
int qp; int qp;
/* stuff all the QP info into the buffer */ /* stuff all the QP info into the buffer */
for (qp = 0; qp < mca_btl_openib_component.num_qps; qp++) { for (qp = 0; qp < mca_btl_openib_component.num_qps; qp++) {
opal_output(mca_btl_base_output, "packing %d of %d\n", 1, ORTE_UINT32); BTL_VERBOSE(("packing %d of %d\n", 1, ORTE_UINT32));
rc = orte_dss.pack(buffer, &endpoint->qps[qp].lcl_qp->qp_num, rc = orte_dss.pack(buffer, &endpoint->qps[qp].lcl_qp->qp_num,
1, ORTE_UINT32); 1, ORTE_UINT32);
if (ORTE_SUCCESS != rc) { if (ORTE_SUCCESS != rc) {
ORTE_ERROR_LOG(rc); ORTE_ERROR_LOG(rc);
return rc; return rc;
} }
opal_output(mca_btl_base_output, "packing %d of %d\n", 1, ORTE_UINT32); BTL_VERBOSE(("packing %d of %d\n", 1, ORTE_UINT32));
rc = orte_dss.pack(buffer, &endpoint->qps[qp].lcl_psn, 1, rc = orte_dss.pack(buffer, &endpoint->qps[qp].lcl_psn, 1,
ORTE_UINT32); ORTE_UINT32);
if (ORTE_SUCCESS != rc) { if (ORTE_SUCCESS != rc) {
@ -421,20 +421,20 @@ static int send_connect_data(mca_btl_base_endpoint_t* endpoint,
} }
} }
opal_output(mca_btl_base_output, "packing %d of %d\n", 1, ORTE_UINT16); BTL_VERBOSE(("packing %d of %d\n", 1, ORTE_UINT16));
rc = orte_dss.pack(buffer, &endpoint->endpoint_btl->lid, 1, ORTE_UINT16); rc = orte_dss.pack(buffer, &endpoint->endpoint_btl->lid, 1, ORTE_UINT16);
if (ORTE_SUCCESS != rc) { if (ORTE_SUCCESS != rc) {
ORTE_ERROR_LOG(rc); ORTE_ERROR_LOG(rc);
return rc; return rc;
} }
opal_output(mca_btl_base_output, "packing %d of %d\n", 1, ORTE_UINT32); BTL_VERBOSE(("packing %d of %d\n", 1, ORTE_UINT32));
rc = orte_dss.pack(buffer, &endpoint->endpoint_btl->hca->mtu, 1, rc = orte_dss.pack(buffer, &endpoint->endpoint_btl->hca->mtu, 1,
ORTE_UINT32); ORTE_UINT32);
if (ORTE_SUCCESS != rc) { if (ORTE_SUCCESS != rc) {
ORTE_ERROR_LOG(rc); ORTE_ERROR_LOG(rc);
return rc; return rc;
} }
opal_output(mca_btl_base_output, "packing %d of %d\n", 1, ORTE_UINT32); BTL_VERBOSE(("packing %d of %d\n", 1, ORTE_UINT32));
rc = orte_dss.pack(buffer, &endpoint->index, 1, ORTE_UINT32); rc = orte_dss.pack(buffer, &endpoint->index, 1, ORTE_UINT32);
if (ORTE_SUCCESS != rc) { if (ORTE_SUCCESS != rc) {
ORTE_ERROR_LOG(rc); ORTE_ERROR_LOG(rc);
@ -492,14 +492,14 @@ static void rml_recv_cb(int status, orte_process_name_t* process_name,
/* start by unpacking data first so we know who is knocking at /* start by unpacking data first so we know who is knocking at
our door */ our door */
opal_output(mca_btl_base_output, "unpacking %d of %d\n", cnt, ORTE_UINT8); BTL_VERBOSE(("unpacking %d of %d\n", cnt, ORTE_UINT8));
rc = orte_dss.unpack(buffer, &message_type, &cnt, ORTE_UINT8); rc = orte_dss.unpack(buffer, &message_type, &cnt, ORTE_UINT8);
if (ORTE_SUCCESS != rc) { if (ORTE_SUCCESS != rc) {
ORTE_ERROR_LOG(rc); ORTE_ERROR_LOG(rc);
return; return;
} }
opal_output(mca_btl_base_output, "unpacking %d of %d\n", cnt, ORTE_UINT64); BTL_VERBOSE(("unpacking %d of %d\n", cnt, ORTE_UINT64));
rc = orte_dss.unpack(buffer, &rem_info.rem_subnet_id, &cnt, ORTE_UINT64); rc = orte_dss.unpack(buffer, &rem_info.rem_subnet_id, &cnt, ORTE_UINT64);
if (ORTE_SUCCESS != rc) { if (ORTE_SUCCESS != rc) {
ORTE_ERROR_LOG(rc); ORTE_ERROR_LOG(rc);
@ -507,13 +507,13 @@ static void rml_recv_cb(int status, orte_process_name_t* process_name,
} }
if (ENDPOINT_CONNECT_REQUEST != message_type) { if (ENDPOINT_CONNECT_REQUEST != message_type) {
opal_output(mca_btl_base_output, "unpacking %d of %d\n", cnt, ORTE_UINT32); BTL_VERBOSE(("unpacking %d of %d\n", cnt, ORTE_UINT32));
rc = orte_dss.unpack(buffer, &lcl_qp, &cnt, ORTE_UINT32); rc = orte_dss.unpack(buffer, &lcl_qp, &cnt, ORTE_UINT32);
if (ORTE_SUCCESS != rc) { if (ORTE_SUCCESS != rc) {
ORTE_ERROR_LOG(rc); ORTE_ERROR_LOG(rc);
return; return;
} }
opal_output(mca_btl_base_output, "unpacking %d of %d\n", cnt, ORTE_UINT16); BTL_VERBOSE(("unpacking %d of %d\n", cnt, ORTE_UINT16));
rc = orte_dss.unpack(buffer, &lcl_lid, &cnt, ORTE_UINT16); rc = orte_dss.unpack(buffer, &lcl_lid, &cnt, ORTE_UINT16);
if (ORTE_SUCCESS != rc) { if (ORTE_SUCCESS != rc) {
ORTE_ERROR_LOG(rc); ORTE_ERROR_LOG(rc);
@ -529,14 +529,14 @@ static void rml_recv_cb(int status, orte_process_name_t* process_name,
/* unpack all the qp info */ /* unpack all the qp info */
for (qp = 0; qp < mca_btl_openib_component.num_qps; ++qp) { for (qp = 0; qp < mca_btl_openib_component.num_qps; ++qp) {
opal_output(mca_btl_base_output, "unpacking %d of %d\n", cnt, ORTE_UINT32); BTL_VERBOSE(("unpacking %d of %d\n", cnt, ORTE_UINT32));
rc = orte_dss.unpack(buffer, &rem_info.rem_qps[qp].rem_qp_num, &cnt, rc = orte_dss.unpack(buffer, &rem_info.rem_qps[qp].rem_qp_num, &cnt,
ORTE_UINT32); ORTE_UINT32);
if (ORTE_SUCCESS != rc) { if (ORTE_SUCCESS != rc) {
ORTE_ERROR_LOG(rc); ORTE_ERROR_LOG(rc);
return; return;
} }
opal_output(mca_btl_base_output, "unpacking %d of %d\n", cnt, ORTE_UINT32); BTL_VERBOSE(("unpacking %d of %d\n", cnt, ORTE_UINT32));
rc = orte_dss.unpack(buffer, &rem_info.rem_qps[qp].rem_psn, &cnt, rc = orte_dss.unpack(buffer, &rem_info.rem_qps[qp].rem_psn, &cnt,
ORTE_UINT32); ORTE_UINT32);
if (ORTE_SUCCESS != rc) { if (ORTE_SUCCESS != rc) {
@ -545,19 +545,19 @@ static void rml_recv_cb(int status, orte_process_name_t* process_name,
} }
} }
opal_output(mca_btl_base_output, "unpacking %d of %d\n", cnt, ORTE_UINT16); BTL_VERBOSE(("unpacking %d of %d\n", cnt, ORTE_UINT16));
rc = orte_dss.unpack(buffer, &rem_info.rem_lid, &cnt, ORTE_UINT16); rc = orte_dss.unpack(buffer, &rem_info.rem_lid, &cnt, ORTE_UINT16);
if (ORTE_SUCCESS != rc) { if (ORTE_SUCCESS != rc) {
ORTE_ERROR_LOG(rc); ORTE_ERROR_LOG(rc);
return; return;
} }
opal_output(mca_btl_base_output, "unpacking %d of %d\n", cnt, ORTE_UINT32); BTL_VERBOSE(("unpacking %d of %d\n", cnt, ORTE_UINT32));
rc = orte_dss.unpack(buffer, &rem_info.rem_mtu, &cnt, ORTE_UINT32); rc = orte_dss.unpack(buffer, &rem_info.rem_mtu, &cnt, ORTE_UINT32);
if (ORTE_SUCCESS != rc) { if (ORTE_SUCCESS != rc) {
ORTE_ERROR_LOG(rc); ORTE_ERROR_LOG(rc);
return; return;
} }
opal_output(mca_btl_base_output, "unpacking %d of %d\n", cnt, ORTE_UINT32); BTL_VERBOSE(("unpacking %d of %d\n", cnt, ORTE_UINT32));
rc = orte_dss.unpack(buffer, &rem_info.rem_index, &cnt, ORTE_UINT32); rc = orte_dss.unpack(buffer, &rem_info.rem_index, &cnt, ORTE_UINT32);
if (ORTE_SUCCESS != rc) { if (ORTE_SUCCESS != rc) {
ORTE_ERROR_LOG(rc); ORTE_ERROR_LOG(rc);