Skip to content

Commit

Permalink
opal: Disable memory patcher component on MacOS
Browse files Browse the repository at this point in the history
Open MPI doesn't support any transports on MacOS which require
memory manager hooks.  The memory patcher component uses the
syscall interface, which has been deprecated in recent versions
of MacOS.  Since we don't need it and it emits warnings about
deprecation, disable the memory patcher component on MacOS.

Fixes open-mpi#5671

Signed-off-by: Brian Barrett <bbarrett@amazon.com>
(cherry picked from commit 19e16d5)
(cherry picked from commit 8324b4e)
  • Loading branch information
bwbarrett authored and jsquyres committed Nov 26, 2020
1 parent 9fb68a7 commit 1a675d3
Showing 1 changed file with 22 additions and 10 deletions.
32 changes: 22 additions & 10 deletions opal/mca/memory/patcher/configure.m4
Original file line number Diff line number Diff line change
Expand Up @@ -34,15 +34,27 @@ AC_DEFUN([MCA_opal_memory_patcher_COMPILE_MODE], [
# [action-if-cant-compile])
# ------------------------------------------------
AC_DEFUN([MCA_opal_memory_patcher_CONFIG],[
AC_CONFIG_FILES([opal/mca/memory/patcher/Makefile])

AC_CHECK_FUNCS([__curbrk])

AC_CHECK_HEADERS([linux/mman.h sys/syscall.h])
# disable on MacOS/Darwin where it isn't used and the deprecated
# syscall interface causes compiler warnings.
AC_MSG_CHECKING([if memory patcher supports $host_os])
case $host_os in
darwin*)
opal_memory_patcher_happy=no
;;
*)
opal_memory_patcher_happy=yes
;;
esac
AC_MSG_RESULT([$opal_memory_patcher_happy])

AS_IF([test "$opal_memory_patcher_happy" == "yes"], [
AC_CHECK_FUNCS([__curbrk])
AC_CHECK_HEADERS([linux/mman.h sys/syscall.h])
AC_CHECK_DECLS([__mmap], [], [], [#include <sys/mman.h>])
AC_CHECK_FUNCS([__mmap])
AC_CHECK_DECLS([__syscall], [], [], [#include <sys/syscall.h>])
AC_CHECK_FUNCS([__syscall])
$1], [$2])

AC_CHECK_DECLS([__syscall], [], [], [#include <sys/syscall.h>])

AC_CHECK_FUNCS([__syscall])

[$1]
AC_CONFIG_FILES([opal/mca/memory/patcher/Makefile])
])

0 comments on commit 1a675d3

Please sign in to comment.