Skip to content

Commit 2cf9b26

Browse files
committed
verbs_usnic: previous commit missed a symbol
0715802 missed that there is a call to a common/verbs_usnic symbol in the common/verbs component. This call needs to be compiled out when the common/verbs_usnic component is not built.
1 parent a016c17 commit 2cf9b26

File tree

2 files changed

+15
-6
lines changed

2 files changed

+15
-6
lines changed

opal/mca/common/verbs/common_verbs_basics.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2012-2015 Cisco Systems, Inc. All rights reserved.
2+
* Copyright (c) 2012-2016 Cisco Systems, Inc. All rights reserved.
33
*
44
* $COPYRIGHT$
55
*
@@ -21,7 +21,9 @@
2121
#include <unistd.h>
2222
#endif
2323

24+
#if OPAL_COMMON_VERSION_USNIC_HAPPY
2425
#include "opal/mca/common/verbs_usnic/common_verbs_usnic.h"
26+
#endif
2527

2628
/* This is crummy, but <infiniband/driver.h> doesn't work on all
2729
platforms with all compilers. Specifically, trying to include it
@@ -91,12 +93,14 @@ int opal_common_verbs_fork_test(void)
9193
}
9294
#endif
9395

96+
#if OPAL_COMMON_VERBS_USNIC_HAPPY
9497
/* Now register any necessary fake libibverbs drivers. We
9598
piggyback loading these fake drivers on the fork test because
9699
they must be loaded before ibv_get_device_list() is invoked.
97100
Note that this routine is in a different common component (see
98101
comments over there for an explanation why). */
99102
opal_common_verbs_usnic_register_fake_drivers();
103+
#endif
100104

101105
return ret;
102106
}

opal/mca/common/verbs_usnic/configure.m4

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -54,21 +54,26 @@ AC_DEFUN([MCA_opal_common_verbs_usnic_COMPILE_MODE], [
5454
# ------------------------------------------------
5555
AC_DEFUN([MCA_opal_common_verbs_usnic_CONFIG],[
5656
AC_CONFIG_FILES([opal/mca/common/verbs_usnic/Makefile])
57-
common_verbs_usnic_happy="no"
57+
common_verbs_usnic_happy=0
5858

5959
AC_ARG_WITH(verbs-usnic,
6060
AC_HELP_STRING([--with-verbs-usnic],
6161
[Add support in Open MPI to defeat a seemingly dire warning message from libibverbs that Cisco usNIC devices are not supported. This support is not compiled by default because you can also avoid this libibverbs bug by installing the libibverbs_usnic "no no" plugin, available from https://github.com/cisco/libusnic_verbs or in binary form from cisco.com]))
6262

6363
AS_IF([test "$with_verbs_usnic" = "yes"],
64-
[common_verbs_usnic_happy=yes])
64+
[common_verbs_usnic_happy=1])
6565

66-
AS_IF([test "$common_verbs_usnic_happy" = "yes"],
66+
AS_IF([test $common_verbs_usnic_happy -eq 1],
6767
[OPAL_CHECK_OPENFABRICS([common_verbs_usnic],
68-
[common_verbs_usnic_happy="yes"])
68+
[common_verbs_usnic_happy=1],
69+
[common_verbs_usnic_happy=0])
6970
])
7071

71-
AS_IF([test "$common_verbs_usnic_happy" = "yes"],
72+
AC_DEFINE_UNQUOTED([OPAL_COMMON_VERBS_USNIC_HAPPY],
73+
[$common_verbs_usnic_happy],
74+
[Whether the common/usnic_verbs component is being built or not])
75+
76+
AS_IF([test $common_verbs_usnic_happy -eq 1],
7277
[$1],
7378
[$2])
7479

0 commit comments

Comments
 (0)