Skip to content
This repository was archived by the owner on Sep 30, 2022. It is now read-only.

Commit da4c356

Browse files
committed
Merge pull request #1136 from hjelmn/v2.x_ext_verbs_fix
v2.0.0 exp verbs fix
2 parents 298c2c3 + 7e0dab0 commit da4c356

File tree

3 files changed

+13
-4
lines changed

3 files changed

+13
-4
lines changed

config/opal_check_openfabrics.m4

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -398,8 +398,10 @@ AC_DEFUN([OPAL_CHECK_EXP_VERBS],[
398398
AC_MSG_RESULT([no])])
399399
400400
AC_DEFINE_UNQUOTED([HAVE_EXP_VERBS], [$have_struct_ibv_exp_send_wr], [Experimental verbs])
401-
AC_CHECK_DECLS([IBV_EXP_ATOMIC_HCA_REPLY_BE, IBV_EXP_QP_CREATE_ATOMIC_BE_REPLY, ibv_exp_create_qp, ibv_exp_query_device],
401+
AC_CHECK_DECLS([IBV_EXP_ATOMIC_HCA_REPLY_BE, IBV_EXP_QP_CREATE_ATOMIC_BE_REPLY, ibv_exp_create_qp, ibv_exp_query_device, IBV_EXP_QP_INIT_ATTR_ATOMICS_ARG],
402402
[], [], [#include <infiniband/verbs_exp.h>])
403+
AC_CHECK_MEMBERS([struct ibv_exp_device_attr.ext_atom, struct ibv_exp_device_attr.ext_atomic_cap], [], [],
404+
[[#include <infiniband/verbs_exp.h>]])
403405
AS_IF([test '$have_struct_ibv_exp_send_wr' = 1], [$1], [$2])
404406
OPAL_VAR_SCOPE_POP
405407
])dnl

opal/mca/btl/openib/btl_openib_component.c

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -780,7 +780,7 @@ static int init_one_port(opal_list_t *btl_list, mca_btl_openib_device_t *device,
780780
#if HAVE_DECL_IBV_ATOMIC_HCA
781781
openib_btl->atomic_ops_be = false;
782782

783-
#if HAVE_DECL_IBV_EXP_QUERY_DEVICE
783+
#if HAVE_STRUCT_IBV_EXP_DEVICE_ATTR_EXT_ATOM
784784
/* check that 8-byte atomics are supported */
785785
if (!(device->ib_exp_dev_attr.ext_atom.log_atomic_arg_sizes & (1<<3ull))) {
786786
openib_btl->super.btl_flags &= ~MCA_BTL_FLAGS_ATOMIC_FOPS;
@@ -790,7 +790,12 @@ static int init_one_port(opal_list_t *btl_list, mca_btl_openib_device_t *device,
790790
}
791791
#endif
792792

793-
switch (openib_btl->device->ib_dev_attr.atomic_cap) {
793+
#if HAVE_STRUCT_IBV_EXP_DEVICE_ATTR_EXT_ATOMIC_CAP
794+
switch (openib_btl->device->ib_exp_dev_attr.exp_atomic_cap)
795+
#else
796+
switch (openib_btl->device->ib_dev_attr.atomic_cap)
797+
#endif
798+
{
794799
case IBV_ATOMIC_GLOB:
795800
openib_btl->super.btl_flags |= MCA_BTL_ATOMIC_SUPPORTS_GLOB;
796801
break;

opal/mca/btl/openib/connect/btl_openib_connect_udcm.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1351,11 +1351,13 @@ static int udcm_rc_qp_create_one(udcm_module_t *m, mca_btl_base_endpoint_t* lcl_
13511351
init_attr.comp_mask = IBV_EXP_QP_INIT_ATTR_PD;
13521352
init_attr.pd = m->btl->device->ib_pd;
13531353

1354+
#if HAVE_DECL_IBV_EXP_QP_INIT_ATTR_ATOMICS_ARG
13541355
init_attr.comp_mask |= IBV_EXP_QP_INIT_ATTR_ATOMICS_ARG;
13551356
init_attr.max_atomic_arg = sizeof (int64_t);
1357+
#endif
13561358

13571359
#if HAVE_DECL_IBV_EXP_ATOMIC_HCA_REPLY_BE
1358-
if (IBV_EXP_ATOMIC_HCA_REPLY_BE == m->btl->device->ib_dev_attr.atomic_cap) {
1360+
if (IBV_EXP_ATOMIC_HCA_REPLY_BE == m->btl->device->ib_exp_dev_attr.exp_atomic_cap) {
13591361
init_attr.exp_create_flags = IBV_EXP_QP_CREATE_ATOMIC_BE_REPLY;
13601362
init_attr.comp_mask |= IBV_EXP_QP_INIT_ATTR_CREATE_FLAGS;
13611363
}

0 commit comments

Comments
 (0)