Skip to content

Commit 0ee8295

Browse files
committed
usnic: ensure that we have libfabric >= v1.1
1 parent c6cc1a9 commit 0ee8295

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
@@ -102,6 +102,26 @@ AC_DEFUN([_OPAL_BTL_USNIC_DO_CONFIG],[
102102
AC_MSG_RESULT([$opal_btl_usnic_happy])
103103
])
104104

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

0 commit comments

Comments
 (0)