diff --git a/ompi/mca/btl/openib/btl_openib_component.c b/ompi/mca/btl/openib/btl_openib_component.c index 480e289613..75f98375be 100644 --- a/ompi/mca/btl/openib/btl_openib_component.c +++ b/ompi/mca/btl/openib/btl_openib_component.c @@ -389,7 +389,7 @@ static int init_one_hca(opal_list_t *btl_list, struct ibv_device* ib_dev) goto dealloc_pd; } - ret = 1; + ret = OMPI_SUCCESS; /* Note ports are 1 based hence j = 1 */ for(i = 1; i <= hca->ib_dev_attr.phys_port_cnt; i++){ struct ibv_port_attr ib_port_attr; @@ -524,8 +524,19 @@ btl_openib_component_init(int *num_btl_modules, if (OMPI_SUCCESS != (ret = init_one_hca(&btl_list, ib_devs[i]))) { break; } - } - + } + + if(ret != OMPI_SUCCESS) { + opal_show_help("help-mpi-btl-openib.txt", + "error in hca init", true, orte_system_info.nodename); + } + + if(0 == mca_btl_openib_component.ib_num_btls) { + opal_show_help("help-mpi-btl-openib.txt", + "no active ports found", true, orte_system_info.nodename); + return NULL; + } + /* Allocate space for btl modules */ mca_btl_openib_component.openib_btls = malloc(sizeof(mca_btl_openib_module_t) * diff --git a/ompi/mca/btl/openib/help-mpi-btl-openib.txt b/ompi/mca/btl/openib/help-mpi-btl-openib.txt index 49e752bfed..37e2179cd2 100644 --- a/ompi/mca/btl/openib/help-mpi-btl-openib.txt +++ b/ompi/mca/btl/openib/help-mpi-btl-openib.txt @@ -106,3 +106,9 @@ respect to the retry count: 4.096 microseconds * (2^btl_openib_ib_timeout) See the InfiniBand spec 1.2 (section 12.7.34) for more details. +[no active ports found] +WARNING: There is at least on IB HCA found on host '%s', but there is +no active ports detected. This is most certainly not what you wanted. +Check your cables and SM configuration. +[error in hca init] +WARNING: There were errors during IB HCA initialization on host '%s'.