Skip to content

Commit 7682db1

Browse files
committed
verbs_usnic: previous commit missed a symbol
open-mpi/ompi@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. (cherry picked from commit open-mpi/ompi@2cf9b26)
1 parent e90b808 commit 7682db1

File tree

2 files changed

+14
-5
lines changed

2 files changed

+14
-5
lines changed

ompi/mca/common/verbs/common_verbs_basics.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,9 @@
2121
#include <unistd.h>
2222
#endif
2323

24+
#if OPAL_COMMON_VERSION_USNIC_HAPPY
2425
#include "ompi/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
@@ -93,12 +95,14 @@ int opal_common_verbs_fork_test(void)
9395
}
9496
#endif
9597

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

103107
return ret;
104108
}

ompi/mca/common/verbs_usnic/configure.m4

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,21 +38,26 @@ AC_DEFUN([MCA_ompi_common_verbs_usnic_COMPILE_MODE], [
3838
# ------------------------------------------------
3939
AC_DEFUN([MCA_ompi_common_verbs_usnic_CONFIG],[
4040
AC_CONFIG_FILES([ompi/mca/common/verbs_usnic/Makefile])
41-
common_verbs_usnic_happy="no"
41+
common_verbs_usnic_happy=0
4242

4343
AC_ARG_WITH(verbs-usnic,
4444
AC_HELP_STRING([--with-verbs-usnic],
4545
[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]))
4646

4747
AS_IF([test "$with_verbs_usnic" = "yes"],
48-
[common_verbs_usnic_happy=yes])
48+
[common_verbs_usnic_happy=1])
4949

50-
AS_IF([test "$common_verbs_usnic_happy" = "yes"],
50+
AS_IF([test $common_verbs_usnic_happy -eq 1],
5151
[OMPI_CHECK_OPENFABRICS([common_verbs_usnic],
52-
[common_verbs_usnic_happy="yes"])
52+
[common_verbs_usnic_happy=1],
53+
[common_verbs_usnic_happy=0])
5354
])
5455

55-
AS_IF([test "$common_verbs_usnic_happy" = "yes"],
56+
AC_DEFINE_UNQUOTED([OPAL_COMMON_VERBS_USNIC_HAPPY],
57+
[$common_verbs_usnic_happy],
58+
[Whether the common/usnic_verbs component is being built or not])
59+
60+
AS_IF([test $common_verbs_usnic_happy -eq 1],
5661
[$1],
5762
[$2])
5863

0 commit comments

Comments
 (0)