Merge pull request #1164 from hjelmn/mlx5_atomics_update
btl/openib: fix compile problems when using experimental verbs
Этот коммит содержится в:
Коммит
6a4ec3396a
@ -372,10 +372,9 @@ typedef struct mca_btl_openib_device_t {
|
||||
opal_mutex_t device_lock; /* device level lock */
|
||||
struct ibv_context *ib_dev_context;
|
||||
#if HAVE_DECL_IBV_EXP_QUERY_DEVICE
|
||||
struct ibv_exp_device_attr ib_dev_attr;
|
||||
#else
|
||||
struct ibv_device_attr ib_dev_attr;
|
||||
struct ibv_exp_device_attr ib_exp_dev_attr;
|
||||
#endif
|
||||
struct ibv_device_attr ib_dev_attr;
|
||||
struct ibv_pd *ib_pd;
|
||||
struct ibv_cq *ib_cq[2];
|
||||
uint32_t cq_size[2];
|
||||
|
@ -826,7 +826,7 @@ static int init_one_port(opal_list_t *btl_list, mca_btl_openib_device_t *device,
|
||||
|
||||
#if HAVE_DECL_IBV_EXP_QUERY_DEVICE
|
||||
/* check that 8-byte atomics are supported */
|
||||
if (!(device->dev_attr.ext_atom.log_atomic_arg_sizes & (1<<3ull))) {
|
||||
if (!(device->ib_exp_dev_attr.ext_atom.log_atomic_arg_sizes & (1<<3ull))) {
|
||||
openib_btl->super.btl_flags &= ~MCA_BTL_FLAGS_ATOMIC_FOPS;
|
||||
openib_btl->super.btl_atomic_flags = 0;
|
||||
openib_btl->super.btl_atomic_fop = NULL;
|
||||
@ -1650,18 +1650,17 @@ static int init_one_device(opal_list_t *btl_list, struct ibv_device* ib_dev)
|
||||
goto error;
|
||||
}
|
||||
#if HAVE_DECL_IBV_EXP_QUERY_DEVICE
|
||||
if(ibv_exp_query_device(device->ib_dev_context, &device->ib_dev_attr)){
|
||||
BTL_ERROR(("error obtaining device attributes for %s errno says %s",
|
||||
ibv_get_device_name(device->ib_dev), strerror(errno)));
|
||||
goto error;
|
||||
}
|
||||
#else
|
||||
if(ibv_query_device(device->ib_dev_context, &device->ib_dev_attr)){
|
||||
if(ibv_exp_query_device(device->ib_dev_context, &device->ib_exp_dev_attr)){
|
||||
BTL_ERROR(("error obtaining device attributes for %s errno says %s",
|
||||
ibv_get_device_name(device->ib_dev), strerror(errno)));
|
||||
goto error;
|
||||
}
|
||||
#endif
|
||||
if(ibv_query_device(device->ib_dev_context, &device->ib_dev_attr)){
|
||||
BTL_ERROR(("error obtaining device attributes for %s errno says %s",
|
||||
ibv_get_device_name(device->ib_dev), strerror(errno)));
|
||||
goto error;
|
||||
}
|
||||
/* If mca_btl_if_include/exclude were specified, get usable ports */
|
||||
allowed_ports = (int*)malloc(device->ib_dev_attr.phys_port_cnt * sizeof(int));
|
||||
if (NULL == allowed_ports) {
|
||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user