Skip to content

Commit 3668d2d

Browse files
committed
Merge pull request open-mpi#1062 from ggouaillardet/topic/v2.x/openib_warn_default_gid_prefix
btl/openib: correctly issue a warning when two btls or more are in th…
2 parents 83bc1c5 + a71222f commit 3668d2d

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 (c) 2015 Mellanox Technologies. All rights reserved.
2424
*
@@ -312,6 +312,7 @@ struct mca_btl_openib_component_t {
312312
#if HAVE_DECL_IBV_LINK_LAYER_ETHERNET
313313
bool rroce_enable;
314314
#endif
315+
unsigned int num_default_gid_btls; /* numbers of btl in the default subnet */
315316
}; typedef struct mca_btl_openib_component_t mca_btl_openib_component_t;
316317

317318
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
@@ -181,6 +181,7 @@ static int btl_openib_component_open(void)
181181

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

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

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

0 commit comments

Comments
 (0)