diff --git a/orte/mca/oob/ud/oob_ud_component.c b/orte/mca/oob/ud/oob_ud_component.c index 89ad6863200..f60cc44f903 100644 --- a/orte/mca/oob/ud/oob_ud_component.c +++ b/orte/mca/oob/ud/oob_ud_component.c @@ -6,6 +6,7 @@ * and Technology (RIST). All rights reserved. * 2014 Mellanox Technologies, Inc. * All rights reserved. + * Copyright (c) 2015 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -216,15 +217,6 @@ static inline int mca_oob_ud_device_setup (mca_oob_ud_device_t *device, ORTE_NAME_PRINT(ORTE_PROC_MY_NAME), (void *) ib_device); - /* If fork support is requested, try to enable it */ - rc = opal_common_verbs_fork_test(); - if (OPAL_SUCCESS != rc) { - opal_output_verbose(5, orte_oob_base_framework.framework_output, - "%s oob:ud:device_setup failed in ibv_fork_init. errno = %d", - ORTE_NAME_PRINT(ORTE_PROC_MY_NAME), errno); - return ORTE_ERROR; - } - device->ib_context = ibv_open_device (ib_device); if (NULL == device->ib_context) { opal_output_verbose(5, orte_oob_base_framework.framework_output, @@ -296,6 +288,15 @@ static int mca_oob_ud_component_startup(void) opal_list_item_t *item, *item2; bool found_one = false; + /* If fork support is requested, try to enable it */ + rc = opal_common_verbs_fork_test(); + if (OPAL_SUCCESS != rc) { + opal_output_verbose(5, orte_oob_base_framework.framework_output, + "%s oob:ud:device_setup failed in ibv_fork_init. errno = %d", + ORTE_NAME_PRINT(ORTE_PROC_MY_NAME), errno); + return ORTE_ERROR; + } + devices = ibv_get_device_list (&num_devices); if (NULL == devices || 0 == num_devices) { opal_output_verbose(5, orte_oob_base_framework.framework_output,