From 3e842348d185ad6f75bc04eac57fb71b485d45aa Mon Sep 17 00:00:00 2001 From: Jeff Squyres Date: Thu, 30 Aug 2018 13:10:49 -0700 Subject: [PATCH 1/2] common/verbs-usnic: check that it will actually compile If someone specifies --with-verbs-usnic, actually do a configury check to ensure that it will compile (vs. assuming that it will compile if someone asks for it). Signed-off-by: Jeff Squyres (cherry picked from commit 05e5f61fe1c961927eae5bb5c0eb2021ac99afa6) --- opal/mca/common/verbs_usnic/configure.m4 | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/opal/mca/common/verbs_usnic/configure.m4 b/opal/mca/common/verbs_usnic/configure.m4 index 68fed9404b..4e2f2d5654 100644 --- a/opal/mca/common/verbs_usnic/configure.m4 +++ b/opal/mca/common/verbs_usnic/configure.m4 @@ -69,6 +69,21 @@ AC_DEFUN([MCA_opal_common_verbs_usnic_CONFIG],[ [common_verbs_usnic_happy=0]) ]) + AS_IF([test $common_verbs_usnic_happy -eq 1], + [AC_CHECK_MEMBER([struct ibv_device.ops], + [], + [AC_MSG_WARN([--with-verbs-usnic specified, but the verbs.h does not]) + AC_MSG_WARN([have the required member fields. It is highly likely]) + AC_MSG_WARN([that you do not need --with-verbs-usnic. Try configuring]) + AC_MSG_WARN([and building Open MPI without it; if you get warnings]) + AC_MSG_WARN([about usnic IB devices anyway, please let us know.]) + AC_MSG_WARN([Since you asked for --with-verbs-usnic and we cannot]) + AC_MSG_WARN([deliver it, configure will now abort.]) + AC_MSG_ERROR([Cannot continue]) + ], + [#include ]) + ]) + AC_DEFINE_UNQUOTED([OPAL_COMMON_VERBS_USNIC_HAPPY], [$common_verbs_usnic_happy], [Whether the common/usnic_verbs component is being built or not]) From 1d0e695bd6666ca70877a699db0f94f53dd921ee Mon Sep 17 00:00:00 2001 From: Jeff Squyres Date: Thu, 30 Aug 2018 15:05:04 -0700 Subject: [PATCH 2/2] README: Add note about --with-verbs-usnic This option isn't needed on modern distros; add a note to README about it. Signed-off-by: Jeff Squyres (cherry picked from commit 9a8b0d0e18b3df4a0da8ed2367115f5e45e521c7) --- README | 24 +++++++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) diff --git a/README b/README index 86e0f13696..78abfdd336 100644 --- a/README +++ b/README @@ -1020,15 +1020,33 @@ NETWORKING SUPPORT / OPTIONS configurations. --with-verbs-usnic + Note that this option is no longer necessary in recent Linux distro + versions. If your Linux distro uses the "rdma-core" package (instead + of a standalone "libibverbs" package), not only do you not need this + option, you shouldn't use it, either. More below. + This option will activate support in Open MPI for disabling a dire-sounding warning message from libibverbs that Cisco usNIC devices are not supported (because Cisco usNIC devices are supported through libfabric, not libibverbs). This libibverbs warning can also be suppressed by installing the "no op" libusnic_verbs plugin for libibverbs (see https://github.com/cisco/libusnic_verbs, or - download binaries from cisco.com). This option is disabled by - default because it causes libopen-pal.so to depend on libibverbs.so, - which is undesirable to many downstream packagers. + download binaries from cisco.com). + + This option is disabled by default for two reasons: + + 1. It causes libopen-pal.so to depend on libibverbs.so, which is + undesirable to many downstream packagers. + 2. As mentioned above, recent versions of the libibverbs library + (included in the "rdma-core" package) do not have the bug that + will emit dire-sounding warnings about usnic devices. Indeed, + the --with-verbs-usnic option will enable code in Open MPI that + is actually incompatible with rdma-core (i.e., cause Open MPI to + fail to compile). + + If you enable --with-verbs-usnic and your system uses the rdma-core + package, configure will safely abort with a helpful message telling + you that you should not use --with-verbs-usnic. --with-usnic Abort configure if Cisco usNIC support cannot be built.