1
1
Signed-off-by: Igor Ivanov <Igor.Ivanov@itseez.com>
Этот коммит содержится в:
Igor Ivanov 2016-01-20 12:08:00 +02:00
родитель 2adbe273d6
Коммит 34d861dfe9

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

@ -40,6 +40,7 @@ int mca_oob_ud_qp_init (mca_oob_ud_qp_t *qp, struct mca_oob_ud_port_t *port,
struct ibv_comp_channel *send_channel, bool onecq) struct ibv_comp_channel *send_channel, bool onecq)
{ {
struct ibv_qp_init_attr init_attr; struct ibv_qp_init_attr init_attr;
int max_cqe = min(port->device->attr.max_cqe, 16384);
opal_output_verbose(10, orte_oob_base_framework.framework_output, opal_output_verbose(10, orte_oob_base_framework.framework_output,
"%s oob:ud:qp_init creating UD QP on port %d", "%s oob:ud:qp_init creating UD QP on port %d",
@ -50,20 +51,19 @@ int mca_oob_ud_qp_init (mca_oob_ud_qp_t *qp, struct mca_oob_ud_port_t *port,
init_attr.qp_type = IBV_QPT_UD; init_attr.qp_type = IBV_QPT_UD;
int cqe = 16384; qp->ib_recv_cq = ibv_create_cq (port->device->ib_context, max_cqe,
qp->ib_recv_cq = ibv_create_cq (port->device->ib_context, cqe,
port, recv_channel, 0); port, recv_channel, 0);
if (NULL == qp->ib_recv_cq) { if (NULL == qp->ib_recv_cq) {
orte_show_help("help-oob-ud.txt", "create-cq-failed", true, orte_show_help("help-oob-ud.txt", "create-cq-failed", true,
orte_process_info.nodename, cqe, strerror(errno)); orte_process_info.nodename, max_cqe, strerror(errno));
return ORTE_ERROR; return ORTE_ERROR;
} }
if (false == onecq) { if (false == onecq) {
qp->ib_send_cq = ibv_create_cq (port->device->ib_context, cqe, qp->ib_send_cq = ibv_create_cq (port->device->ib_context, max_cqe,
port, send_channel, 0); port, send_channel, 0);
if (NULL == qp->ib_send_cq) { if (NULL == qp->ib_send_cq) {
orte_show_help("help-oob-ud.txt", "create-cq-failed", true, orte_show_help("help-oob-ud.txt", "create-cq-failed", true,
orte_process_info.nodename, cqe, strerror(errno)); orte_process_info.nodename, max_cqe, strerror(errno));
return ORTE_ERROR; return ORTE_ERROR;
} }
} else { } else {