Skip to content

Commit 677d740

Browse files
committed
usnic: ensure that we have libfabric >= v1.1
(cherry picked from commit 0ee8295)
1 parent 12daab6 commit 677d740

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

opal/mca/btl/usnic/configure.m4

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,26 @@ AC_DEFUN([_OPAL_BTL_USNIC_DO_CONFIG],[
9999
[opal_btl_usnic_happy=yes],
100100
[opal_btl_usnic_happy=no])
101101

102+
# The usnic BTL requires at least libfabric v1.1 (there was a
103+
# critical bug in libfabric v1.0).
104+
AS_IF([test "$opal_btl_usnic_happy" = "yes"],
105+
[AC_MSG_CHECKING([whether libfabric is >= v1.1])
106+
opal_btl_usnic_CPPFLAGS_save=$CPPFLAGS
107+
CPPFLAGS="$opal_common_libfabric_CPPFLAGS $CPPFLAGS"
108+
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <rdma/fabric.h>]],
109+
[[
110+
#if !defined(FI_MAJOR_VERSION)
111+
#error your version of libfabric is too old
112+
#elif FI_VERSION(FI_MAJOR_VERSION, FI_MINOR_VERSION) < FI_VERSION(1, 1)
113+
#error your version of libfabric is too old
114+
#endif
115+
]])],
116+
[opal_btl_usnic_happy=yes],
117+
[opal_btl_usnic_happy=no])
118+
AC_MSG_RESULT([$opal_btl_usnic_happy])
119+
CPPFLAGS=$opal_btl_usnic_CPPFLAGS_save
120+
])
121+
102122
# Make sure we can find the libfabric usnic extensions header
103123
AS_IF([test "$opal_btl_usnic_happy" = "yes" ],
104124
[opal_btl_usnic_CPPFLAGS_save=$CPPFLAGS

0 commit comments

Comments
 (0)