Skip to content

Commit 0f7f23b

Browse files
author
rhc54
committed
Merge pull request open-mpi#1063 from ggouaillardet/topic/v1.10/openib_warn_default_gid_prefix
btl/openib: correctly issue a warning when two btls or more are in th…
2 parents 9ce8dfe + d16ecc7 commit 0f7f23b

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

ompi/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
*
@@ -323,6 +323,7 @@ struct mca_btl_openib_component_t {
323323
#if HAVE_DECL_IBV_LINK_LAYER_ETHERNET
324324
bool rroce_enable;
325325
#endif
326+
unsigned int num_default_gid_btls; /* numbers of btl in the default subnet */
326327
}; typedef struct mca_btl_openib_component_t mca_btl_openib_component_t;
327328

328329
OMPI_MODULE_DECLSPEC extern mca_btl_openib_component_t mca_btl_openib_component;

ompi/mca/btl/openib/btl_openib_component.c

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

192192
/* initialize state */
193193
mca_btl_openib_component.ib_num_btls = 0;
194+
mca_btl_openib_component.num_default_gid_btls = 0;
194195
mca_btl_openib_component.openib_btls = NULL;
195196
OBJ_CONSTRUCT(&mca_btl_openib_component.devices, opal_pointer_array_t);
196197
mca_btl_openib_component.devices_count = 0;
@@ -698,13 +699,17 @@ static int init_one_port(opal_list_t *btl_list, mca_btl_openib_device_t *device,
698699
ibv_get_device_name(device->ib_dev), port_num, subnet_id));
699700
#endif
700701

701-
if(mca_btl_openib_component.ib_num_btls > 0 &&
702+
if(mca_btl_openib_component.num_default_gid_btls > 0 &&
702703
IB_DEFAULT_GID_PREFIX == subnet_id &&
703704
mca_btl_openib_component.warn_default_gid_prefix) {
704705
opal_show_help("help-mpi-btl-openib.txt", "default subnet prefix",
705706
true, ompi_process_info.nodename);
706707
}
707708

709+
if (IB_DEFAULT_GID_PREFIX == subnet_id) {
710+
mca_btl_openib_component.num_default_gid_btls++;
711+
}
712+
708713
lmc = (1 << ib_port_attr->lmc);
709714
lmc_step = 1;
710715

0 commit comments

Comments
 (0)