Skip to content

Commit 5cab4b6

Browse files
authored
Merge pull request #5635 from jsquyres/pr/v3.1.x/verbs-usnic-configury-moar-strictness
v3.1.x: make common/verbs-usnic actually check if it can compile
2 parents a4c9ff5 + 2b3cbd8 commit 5cab4b6

File tree

2 files changed

+36
-3
lines changed

2 files changed

+36
-3
lines changed

README

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1013,15 +1013,33 @@ NETWORKING SUPPORT / OPTIONS
10131013
configurations.
10141014

10151015
--with-verbs-usnic
1016+
Note that this option is no longer necessary in recent Linux distro
1017+
versions. If your Linux distro uses the "rdma-core" package (instead
1018+
of a standalone "libibverbs" package), not only do you not need this
1019+
option, you shouldn't use it, either. More below.
1020+
10161021
This option will activate support in Open MPI for disabling a
10171022
dire-sounding warning message from libibverbs that Cisco usNIC
10181023
devices are not supported (because Cisco usNIC devices are supported
10191024
through libfabric, not libibverbs). This libibverbs warning can
10201025
also be suppressed by installing the "no op" libusnic_verbs plugin
10211026
for libibverbs (see https://github.com/cisco/libusnic_verbs, or
1022-
download binaries from cisco.com). This option is disabled by
1023-
default because it causes libopen-pal.so to depend on libibverbs.so,
1024-
which is undesirable to many downstream packagers.
1027+
download binaries from cisco.com).
1028+
1029+
This option is disabled by default for two reasons:
1030+
1031+
1. It causes libopen-pal.so to depend on libibverbs.so, which is
1032+
undesirable to many downstream packagers.
1033+
2. As mentioned above, recent versions of the libibverbs library
1034+
(included in the "rdma-core" package) do not have the bug that
1035+
will emit dire-sounding warnings about usnic devices. Indeed,
1036+
the --with-verbs-usnic option will enable code in Open MPI that
1037+
is actually incompatible with rdma-core (i.e., cause Open MPI to
1038+
fail to compile).
1039+
1040+
If you enable --with-verbs-usnic and your system uses the rdma-core
1041+
package, configure will safely abort with a helpful message telling
1042+
you that you should not use --with-verbs-usnic.
10251043

10261044
--with-usnic
10271045
Abort configure if Cisco usNIC support cannot be built.

opal/mca/common/verbs_usnic/configure.m4

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,21 @@ AC_DEFUN([MCA_opal_common_verbs_usnic_CONFIG],[
6969
[common_verbs_usnic_happy=0])
7070
])
7171

72+
AS_IF([test $common_verbs_usnic_happy -eq 1],
73+
[AC_CHECK_MEMBER([struct ibv_device.ops],
74+
[],
75+
[AC_MSG_WARN([--with-verbs-usnic specified, but the verbs.h does not])
76+
AC_MSG_WARN([have the required member fields. It is highly likely])
77+
AC_MSG_WARN([that you do not need --with-verbs-usnic. Try configuring])
78+
AC_MSG_WARN([and building Open MPI without it; if you get warnings])
79+
AC_MSG_WARN([about usnic IB devices anyway, please let us know.])
80+
AC_MSG_WARN([Since you asked for --with-verbs-usnic and we cannot])
81+
AC_MSG_WARN([deliver it, configure will now abort.])
82+
AC_MSG_ERROR([Cannot continue])
83+
],
84+
[#include <infiniband/verbs.h>])
85+
])
86+
7287
AC_DEFINE_UNQUOTED([OPAL_COMMON_VERBS_USNIC_HAPPY],
7388
[$common_verbs_usnic_happy],
7489
[Whether the common/usnic_verbs component is being built or not])

0 commit comments

Comments
 (0)