diff --git a/opal/mca/btl/openib/btl_openib_component.c b/opal/mca/btl/openib/btl_openib_component.c index 1c5abaffcdf..eb75df3e812 100644 --- a/opal/mca/btl/openib/btl_openib_component.c +++ b/opal/mca/btl/openib/btl_openib_component.c @@ -2532,11 +2532,6 @@ btl_openib_component_init(int *num_btl_modules, 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 available, this will cause memory corruption. Refuse to run. 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; } + /* 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 mca_btl_openib_component.receive_queues. */ if (OPAL_SUCCESS != setup_qps()) {