Skip to content

Commit 1235ba5

Browse files
authored
Merge pull request #5634 from jsquyres/pr/v3.0.x/verbs-usnic-configury-moar-strictness
v3.0.x: make common/verbs-usnic actually check if it can compile
2 parents 932ba4b + bbd5bf8 commit 1235ba5

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
@@ -996,15 +996,33 @@ NETWORKING SUPPORT / OPTIONS
996996
configurations.
997997

998998
--with-verbs-usnic
999+
Note that this option is no longer necessary in recent Linux distro
1000+
versions. If your Linux distro uses the "rdma-core" package (instead
1001+
of a standalone "libibverbs" package), not only do you not need this
1002+
option, you shouldn't use it, either. More below.
1003+
9991004
This option will activate support in Open MPI for disabling a
10001005
dire-sounding warning message from libibverbs that Cisco usNIC
10011006
devices are not supported (because Cisco usNIC devices are supported
10021007
through libfabric, not libibverbs). This libibverbs warning can
10031008
also be suppressed by installing the "no op" libusnic_verbs plugin
10041009
for libibverbs (see https://github.com/cisco/libusnic_verbs, or
1005-
download binaries from cisco.com). This option is disabled by
1006-
default because it causes libopen-pal.so to depend on libibverbs.so,
1007-
which is undesirable to many downstream packagers.
1010+
download binaries from cisco.com).
1011+
1012+
This option is disabled by default for two reasons:
1013+
1014+
1. It causes libopen-pal.so to depend on libibverbs.so, which is
1015+
undesirable to many downstream packagers.
1016+
2. As mentioned above, recent versions of the libibverbs library
1017+
(included in the "rdma-core" package) do not have the bug that
1018+
will emit dire-sounding warnings about usnic devices. Indeed,
1019+
the --with-verbs-usnic option will enable code in Open MPI that
1020+
is actually incompatible with rdma-core (i.e., cause Open MPI to
1021+
fail to compile).
1022+
1023+
If you enable --with-verbs-usnic and your system uses the rdma-core
1024+
package, configure will safely abort with a helpful message telling
1025+
you that you should not use --with-verbs-usnic.
10081026

10091027
--with-usnic
10101028
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)