1
1

btl openib: only initialize CPCs if there are devices to use

Defer initializing the CPCs until we know that we have devices/ports
to use.  This both prevents some useless work at startup when there
are no devices/ports to use, and also prevents librdmacm complaining
that there are no verbs-capable RDMA devices available (e.g., if a
Cisco usNIC device is present, but does not present a verbs RDMA
interface).
Этот коммит содержится в:
Jeff Squyres 2015-04-25 04:33:42 -07:00
родитель 4cc5c5261d
Коммит 202f64868c

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

@ -2532,11 +2532,6 @@ btl_openib_component_init(int *num_btl_modules,
goto no_btls; goto no_btls;
} }
/* Init CPC components */
if (OPAL_SUCCESS != (ret = opal_btl_openib_connect_base_init())) {
goto no_btls;
}
/* If we are using ptmalloc2 and there are no posix threads /* If we are using ptmalloc2 and there are no posix threads
available, this will cause memory corruption. Refuse to run. available, this will cause memory corruption. Refuse to run.
Right now, ptmalloc2 is the only memory manager that we have on Right now, ptmalloc2 is the only memory manager that we have on
@ -2792,6 +2787,12 @@ btl_openib_component_init(int *num_btl_modules,
goto no_btls; goto no_btls;
} }
/* Now that we know we have devices and ports that we want to use,
init CPC components */
if (OPAL_SUCCESS != (ret = opal_btl_openib_connect_base_init())) {
goto no_btls;
}
/* Setup the BSRQ QP's based on the final value of /* Setup the BSRQ QP's based on the final value of
mca_btl_openib_component.receive_queues. */ mca_btl_openib_component.receive_queues. */
if (OPAL_SUCCESS != setup_qps()) { if (OPAL_SUCCESS != setup_qps()) {