Skip to content

Commit 39bbfdd

Browse files
igor-ivanovartpol84
authored andcommitted
orte/oob: Fix issue open-mpi#1301
Signed-off-by: Igor Ivanov <[email protected]>
1 parent 8fc16bf commit 39bbfdd

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

orte/mca/oob/ud/oob_ud_qp.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ int mca_oob_ud_qp_init (mca_oob_ud_qp_t *qp, struct mca_oob_ud_port_t *port,
4040
struct ibv_comp_channel *send_channel, bool onecq)
4141
{
4242
struct ibv_qp_init_attr init_attr;
43+
int max_cqe = min(port->device->attr.max_cqe, 16384);
4344

4445
opal_output_verbose(10, orte_oob_base_framework.framework_output,
4546
"%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,
5051

5152
init_attr.qp_type = IBV_QPT_UD;
5253

53-
int cqe = 16384;
54-
qp->ib_recv_cq = ibv_create_cq (port->device->ib_context, cqe,
54+
qp->ib_recv_cq = ibv_create_cq (port->device->ib_context, max_cqe,
5555
port, recv_channel, 0);
5656
if (NULL == qp->ib_recv_cq) {
5757
orte_show_help("help-oob-ud.txt", "create-cq-failed", true,
58-
orte_process_info.nodename, cqe, strerror(errno));
58+
orte_process_info.nodename, max_cqe, strerror(errno));
5959
return ORTE_ERROR;
6060
}
6161
if (false == onecq) {
62-
qp->ib_send_cq = ibv_create_cq (port->device->ib_context, cqe,
62+
qp->ib_send_cq = ibv_create_cq (port->device->ib_context, max_cqe,
6363
port, send_channel, 0);
6464
if (NULL == qp->ib_send_cq) {
6565
orte_show_help("help-oob-ud.txt", "create-cq-failed", true,
66-
orte_process_info.nodename, cqe, strerror(errno));
66+
orte_process_info.nodename, max_cqe, strerror(errno));
6767
return ORTE_ERROR;
6868
}
6969
} else {

0 commit comments

Comments
 (0)