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

Commit 7e0dab0

Browse files
committed
btl/openib: add check for IBV_EXP_QP_INIT_ATTR_ATOMICS_ARG
Mofed 2.2 does not have the IBV_EXP_QP_INIT_ATTR_ATOMICS_ARG attribute flag. Add a check to fix compilation for mofed 2.2. This commit only fixes complilation with the older mofed. It will not allow an Open MPI compiled with mofed 2.3 or newer to work on a machine with mofed 2.2. Signed-off-by: Nathan Hjelm <[email protected]> (cherry picked from commit open-mpi/ompi@f692576) Signed-off-by: Nathan Hjelm <[email protected]>
1 parent 54ae604 commit 7e0dab0

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

config/opal_check_openfabrics.m4

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -398,7 +398,7 @@ 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>])
403403
AC_CHECK_MEMBERS([struct ibv_exp_device_attr.ext_atom, struct ibv_exp_device_attr.ext_atomic_cap], [], [],
404404
[[#include <infiniband/verbs_exp.h>]])

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1351,8 +1351,10 @@ 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
13581360
if (IBV_EXP_ATOMIC_HCA_REPLY_BE == m->btl->device->ib_exp_dev_attr.exp_atomic_cap) {

0 commit comments

Comments
 (0)