1
1

Add btl_openib_gid_index MCA param to allow selecting which GID to use

from an openfabrics port's GID table.

This commit was SVN r24456.
Этот коммит содержится в:
Jeff Squyres 2011-02-24 14:09:22 +00:00
родитель 47a0752856
Коммит 4cb8a42e7b
4 изменённых файлов: 52 добавлений и 10 удалений

Просмотреть файл

@ -10,7 +10,7 @@
* University of Stuttgart. All rights reserved.
* Copyright (c) 2004-2005 The Regents of the University of California.
* All rights reserved.
* Copyright (c) 2006-2008 Cisco Systems, Inc. All rights reserved.
* Copyright (c) 2006-2011 Cisco Systems, Inc. All rights reserved.
* Copyright (c) 2006-2009 Mellanox Technologies. All rights reserved.
* Copyright (c) 2006-2007 Los Alamos National Security, LLC. All rights
* reserved.
@ -287,6 +287,8 @@ struct mca_btl_openib_component_t {
ompi_free_list_t send_free_coalesced;
/** Default receive queues */
char* default_recv_qps;
/** GID index to use */
int gid_index;
/** Whether we want a dynamically resizing srq, enabled by default */
bool enable_srq_resize;
#if BTL_OPENIB_FAILOVER_ENABLED

Просмотреть файл

@ -10,7 +10,7 @@
* University of Stuttgart. All rights reserved.
* Copyright (c) 2004-2005 The Regents of the University of California.
* All rights reserved.
* Copyright (c) 2006-2010 Cisco Systems, Inc. All rights reserved.
* Copyright (c) 2006-2011 Cisco Systems, Inc. All rights reserved.
* Copyright (c) 2006-2009 Mellanox Technologies. All rights reserved.
* Copyright (c) 2006-2007 Los Alamos National Security, LLC. All rights
* reserved.
@ -608,6 +608,22 @@ static int init_one_port(opal_list_t *btl_list, mca_btl_openib_device_t *device,
union ibv_gid gid;
uint64_t subnet_id;
/* Ensure that the requested GID index (via the
btl_openib_gid_index MCA param) is within the GID table
size. */
if (mca_btl_openib_component.gid_index >
ib_port_attr->gid_tbl_len) {
orte_show_help("help-mpi-btl-openib.txt", "gid index too large",
true, orte_process_info.nodename,
ibv_get_device_name(device->ib_dev), port_num,
mca_btl_openib_component.gid_index,
ib_port_attr->gid_tbl_len);
return OMPI_ERR_NOT_FOUND;
}
BTL_VERBOSE(("looking for %s:%d GID index %d",
ibv_get_device_name(device->ib_dev), port_num,
mca_btl_openib_component.gid_index));
/* If we have struct ibv_device.transport_type, then we're >= OFED
v1.2, and the transport could be iWarp or IB. If we don't have
that member, then we're < OFED v1.2, and it can only be IB. */
@ -617,9 +633,11 @@ static int init_one_port(opal_list_t *btl_list, mca_btl_openib_device_t *device,
BTL_VERBOSE(("my iWARP subnet_id is %016" PRIx64, subnet_id));
} else {
memset(&gid, 0, sizeof(gid));
if (0 != ibv_query_gid(device->ib_dev_context, port_num, 0, &gid)) {
BTL_ERROR(("ibv_query_gid failed (%s:%d)\n",
ibv_get_device_name(device->ib_dev), port_num));
if (0 != ibv_query_gid(device->ib_dev_context, port_num,
mca_btl_openib_component.gid_index, &gid)) {
BTL_ERROR(("ibv_query_gid failed (%s:%d, %d)\n",
ibv_get_device_name(device->ib_dev), port_num,
mca_btl_openib_component.gid_index));
return OMPI_ERR_NOT_FOUND;
}
@ -638,9 +656,11 @@ static int init_one_port(opal_list_t *btl_list, mca_btl_openib_device_t *device,
ibv_get_device_name(device->ib_dev), port_num, subnet_id));
}
#else
if (0 != ibv_query_gid(device->ib_dev_context, port_num, 0, &gid)) {
BTL_ERROR(("ibv_query_gid failed (%s:%d)\n",
ibv_get_device_name(device->ib_dev), port_num));
if (0 != ibv_query_gid(device->ib_dev_context, port_num,
mca_btl_openib_component.gid_index, &gid)) {
BTL_ERROR(("ibv_query_gid failed (%s:%d, %d)\n",
ibv_get_device_name(device->ib_dev), port_num,
mca_btl_openib_component.gid_index));
return OMPI_ERR_NOT_FOUND;
}
subnet_id = ntoh64(gid.global.subnet_prefix);

Просмотреть файл

@ -9,7 +9,7 @@
* University of Stuttgart. All rights reserved.
* Copyright (c) 2004-2005 The Regents of the University of California.
* All rights reserved.
* Copyright (c) 2006-2008 Cisco Systems, Inc. All rights reserved.
* Copyright (c) 2006-2011 Cisco Systems, Inc. All rights reserved.
* Copyright (c) 2006-2009 Mellanox Technologies. All rights reserved.
* Copyright (c) 2006-2007 Los Alamos National Security, LLC. All rights
* reserved.
@ -603,6 +603,11 @@ int btl_openib_register_mca_params(void)
NULL, &mca_btl_openib_component.ipaddr_exclude,
0));
CHECK(reg_int("gid_index", NULL,
"GID index to use on verbs device ports",
0, &mca_btl_openib_component.gid_index,
REGINT_GE_ZERO));
/* Register any MCA params for the connect pseudo-components */
if (OMPI_SUCCESS == ret) {
ret = ompi_btl_openib_connect_base_register();

Просмотреть файл

@ -10,7 +10,7 @@
# University of Stuttgart. All rights reserved.
# Copyright (c) 2004-2006 The Regents of the University of California.
# All rights reserved.
# Copyright (c) 2006-2009 Cisco Systems, Inc. All rights reserved.
# Copyright (c) 2006-2011 Cisco Systems, Inc. All rights reserved.
# Copyright (c) 2007-2009 Mellanox Technologies. All rights reserved.
# Copyright (c) 2009 Sun Microsystems, Inc. All rights reserved.
# $COPYRIGHT$
@ -660,3 +660,18 @@ Such mixed network trasport configuration is not supported by Open MPI.
Remote host: %s
Remote Adapter: (vendor 0x%x, part ID %d)
Remote transport type: %s
#
[gid index too large]
Open MPI tried to use a GID index that was too large for an
OpenFabrics device (i.e., the GID index does not exist on this
device).
Local host: %s
Local adapter: %s
Local port: %d
Requested GID index: %d (specified by the btl_openib_gid_index MCA param)
Max allowable GID index: %d
Use "ibv_devinfo -v" on the local host to see the GID table of this
device.