Skip to content

Commit b6dafb6

Browse files
authored
Merge pull request #5636 from jsquyres/pr/v4.0.x/verbs-usnic-configury-moar-strictness
v4.0.x: make common/verbs-usnic actually check if it can compile
2 parents 7e10bc0 + 1d0e695 commit b6dafb6

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
@@ -1020,15 +1020,33 @@ NETWORKING SUPPORT / OPTIONS
10201020
configurations.
10211021

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

10331051
--with-usnic
10341052
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)