Skip to content

Commit c72688e

Browse files
committed
Merge pull request #1362 from ggouaillardet/topic/openib_warn_default_gid_prefix
btl/openib: correctly issue a warning when two btls or more are in th…
2 parents 4ab6c8a + 861564d commit c72688e

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

opal/mca/btl/openib/btl_openib.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
* Copyright (c) 2009-2010 Oracle and/or its affiliates. All rights reserved.
1919
* Copyright (c) 2013-2014 NVIDIA Corporation. All rights reserved.
2020
* Copyright (c) 2014 Bull SAS. All rights reserved.
21-
* Copyright (c) 2015 Research Organization for Information Science
21+
* Copyright (c) 2015-2016 Research Organization for Information Science
2222
* and Technology (RIST). All rights reserved.
2323
* $COPYRIGHT$
2424
*
@@ -317,6 +317,7 @@ struct mca_btl_openib_component_t {
317317
#if HAVE_DECL_IBV_LINK_LAYER_ETHERNET
318318
bool rroce_enable;
319319
#endif
320+
unsigned int num_default_gid_btls; /* numbers of btl in the default subnet */
320321
}; typedef struct mca_btl_openib_component_t mca_btl_openib_component_t;
321322

322323
OPAL_MODULE_DECLSPEC extern mca_btl_openib_component_t mca_btl_openib_component;

opal/mca/btl/openib/btl_openib_component.c

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,7 @@ static int btl_openib_component_open(void)
182182

183183
/* initialize state */
184184
mca_btl_openib_component.ib_num_btls = 0;
185+
mca_btl_openib_component.num_default_gid_btls = 0;
185186
mca_btl_openib_component.openib_btls = NULL;
186187
OBJ_CONSTRUCT(&mca_btl_openib_component.devices, opal_pointer_array_t);
187188
mca_btl_openib_component.devices_count = 0;
@@ -688,13 +689,17 @@ static int init_one_port(opal_list_t *btl_list, mca_btl_openib_device_t *device,
688689
ibv_get_device_name(device->ib_dev), port_num, subnet_id));
689690
#endif
690691

691-
if(mca_btl_openib_component.ib_num_btls > 0 &&
692+
if(mca_btl_openib_component.num_default_gid_btls > 0 &&
692693
IB_DEFAULT_GID_PREFIX == subnet_id &&
693694
mca_btl_openib_component.warn_default_gid_prefix) {
694695
opal_show_help("help-mpi-btl-openib.txt", "default subnet prefix",
695696
true, opal_process_info.nodename);
696697
}
697698

699+
if (IB_DEFAULT_GID_PREFIX == subnet_id) {
700+
mca_btl_openib_component.num_default_gid_btls++;
701+
}
702+
698703
lmc = (1 << ib_port_attr->lmc);
699704
lmc_step = 1;
700705

0 commit comments

Comments
 (0)