Skip to content

Commit 9e3924f

Browse files
committed
Merge pull request open-mpi#939 from jsquyres/pr/v2.0.0/dont-build-verbs-usnic-by-default
v2.x: verbs_usnic: do not build by default
2 parents e69cb2e + 509e563 commit 9e3924f

File tree

3 files changed

+52
-7
lines changed

3 files changed

+52
-7
lines changed

README

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ Copyright (c) 2004-2008 High Performance Computing Center Stuttgart,
88
University of Stuttgart. All rights reserved.
99
Copyright (c) 2004-2007 The Regents of the University of California.
1010
All rights reserved.
11-
Copyright (c) 2006-2015 Cisco Systems, Inc. All rights reserved.
11+
Copyright (c) 2006-2016 Cisco Systems, Inc. All rights reserved.
1212
Copyright (c) 2006-2011 Mellanox Technologies. All rights reserved.
1313
Copyright (c) 2006-2012 Oracle and/or its affiliates. All rights reserved.
1414
Copyright (c) 2007 Myricom, Inc. All rights reserved.
@@ -947,6 +947,17 @@ NETWORKING SUPPORT / OPTIONS
947947
which covers most cases. This option is only needed for special
948948
configurations.
949949

950+
--with-verbs-usnic
951+
This option will activate support in Open MPI for disabling a
952+
dire-sounding warning message from libibverbs that Cisco usNIC
953+
devices are not supported (because Cisco usNIC devices are supported
954+
through libfabric, not libibverbs). This libibverbs warning can
955+
also be suppressed by installing the "no op" libusnic_verbs plugin
956+
for libibverbs (see https://github.com/cisco/libusnic_verbs, or
957+
download binaries from cisco.com). This option is disabled by
958+
default because it causes libopen-pal.so to depend on libibverbs.so,
959+
which is undesirable to many downstream packagers.
960+
950961
--with-usnic
951962
Abort configure if Cisco usNIC support cannot be built.
952963

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_VERBS_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: 35 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
# University of Stuttgart. All rights reserved.
1111
# Copyright (c) 2004-2005 The Regents of the University of California.
1212
# All rights reserved.
13-
# Copyright (c) 2007-2015 Cisco Systems, Inc. All rights reserved.
13+
# Copyright (c) 2007-2016 Cisco Systems, Inc. All rights reserved.
1414
# Copyright (c) 2009-2012 Mellanox Technologies. All rights reserved.
1515
# Copyright (c) 2009-2012 Oak Ridge National Laboratory. All rights reserved.
1616
# $COPYRIGHT$
@@ -20,6 +20,22 @@
2020
# $HEADER$
2121
#
2222

23+
#
24+
# This component is a workaround to a bug in libibverbs that prints a
25+
# dire warning that usNIC devices are not supported (of course not --
26+
# usNIC devices provide functionality through libfabric, not
27+
# libibverbs). This component was written before a better workaround
28+
# was created: a "no op" libibverbs plugin for usNIC devices
29+
# (https://github.com/cisco/libusnic_verbs, and is also available in
30+
# binary form on cisco.com).
31+
#
32+
# Hence, this component no longer builds by default. It's still
33+
# available if a user specifically asks for it (e.g., if they do not
34+
# want to install the "no op" libibverbs plugin), but it's not the
35+
# default. This component also has the side-effect of making
36+
# libopen-pal.so depend on libibverbs.so, which can be annoying for
37+
# packagers (which is another reason it isn't built by default any
38+
# more).
2339
#
2440
# This component must be linked statically into libopen-pal because it
2541
# registers a provider for libibverbs at run time, and there's no
@@ -38,12 +54,26 @@ AC_DEFUN([MCA_opal_common_verbs_usnic_COMPILE_MODE], [
3854
# ------------------------------------------------
3955
AC_DEFUN([MCA_opal_common_verbs_usnic_CONFIG],[
4056
AC_CONFIG_FILES([opal/mca/common/verbs_usnic/Makefile])
41-
common_verbs_usnic_happy="no"
57+
common_verbs_usnic_happy=0
58+
59+
AC_ARG_WITH(verbs-usnic,
60+
AC_HELP_STRING([--with-verbs-usnic],
61+
[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]))
62+
63+
AS_IF([test "$with_verbs_usnic" = "yes"],
64+
[common_verbs_usnic_happy=1])
65+
66+
AS_IF([test $common_verbs_usnic_happy -eq 1],
67+
[OPAL_CHECK_OPENFABRICS([common_verbs_usnic],
68+
[common_verbs_usnic_happy=1],
69+
[common_verbs_usnic_happy=0])
70+
])
4271

43-
OPAL_CHECK_OPENFABRICS([common_verbs_usnic],
44-
[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])
4575

46-
AS_IF([test "$common_verbs_usnic_happy" = "yes"],
76+
AS_IF([test $common_verbs_usnic_happy -eq 1],
4777
[$1],
4878
[$2])
4979

0 commit comments

Comments
 (0)