Skip to content

Commit cf02616

Browse files
committed
configury: allow knem to be disabled
without this patch --with-knem=no doesn't work this is useful when knem software is installed but the knem device is not enabled. So this message: WARNING: Open MPI failed to open the /dev/knem device due to a permissions problem. Please check with your system administrator to get the permissions fixed, or set the smsc MCA variable to "^knem" to silence this warning and run without knem support. is avoided without needing the user to set an MCA parameter, etc. Signed-off-by: Howard Pritchard <[email protected]>
1 parent db9b09f commit cf02616

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

config/opal_check_knem.m4

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,15 @@ AC_DEFUN([OPAL_CHECK_KNEM],[
3131

3232
opal_check_knem_CPPFLAGS_save="${CPPFLAGS}"
3333

34-
AS_IF([test -n "${with_knem}" -a "${with_knem}" != "yes" -a "${with_knem}" != "no"],
35-
[$1_CPPFLAGS="-I${with_knem}/include"
36-
CPPFLAGS="$CPPFLAGS ${$1_CPPFLAGS}"])
34+
AS_IF([test -n "${with_knem}" -a "${with_knem}" = "no"],
35+
[opal_check_knem_happy="no"],
36+
[opal_check_knem_happy="yes"])
3737

38-
AC_CHECK_HEADER([knem_io.h], [opal_check_knem_happy="yes"], [opal_check_knem_happy="no"])
38+
AS_IF([test "${opal_check_knem_happy}" = "yes"],
39+
[AS_IF([test -a "${with_knem}" != "yes"],
40+
[$1_CPPFLAGS="-I${with_knem}/include"
41+
CPPFLAGS="$CPPFLAGS ${$1_CPPFLAGS}"])
42+
AC_CHECK_HEADER([knem_io.h], [opal_check_knem_happy="yes"], [opal_check_knem_happy="no"])])
3943

4044
# need at least version 0x0000000b
4145
AS_IF([test "$opal_check_knem_happy" = "yes"],

0 commit comments

Comments
 (0)