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$
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# ------------------------------------------------
3955AC_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