Skip to content

Commit

Permalink
Merge pull request #1 from jsquyres/pr/good-stuff-for-alexia
Browse files Browse the repository at this point in the history
xpmem stuff
  • Loading branch information
aingerson authored Mar 9, 2018
2 parents da93d6c + aea18fc commit bf12056
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 13 deletions.
1 change: 1 addition & 0 deletions config/fi_provider.m4
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,7 @@ dnl
dnl Arguments:
dnl
dnl $1: directory to check
dnl $2: prefix to set output values $2_PREFIX and $2_LIBDIR
dnl
AC_DEFUN([FI_CHECK_PREFIX_DIR],[
# Check that the base directory exists
Expand Down
5 changes: 4 additions & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,10 @@ AC_ARG_ENABLE([xpmem],
(yes: enabled xpmem; no: disable xpmem;
PATH: enable xpmem and use xpmem installed under PATH)])],
)

AS_CASE([$enable_xpmem],
[yes|no], [],
[FI_CHECK_PREFIX_DIR([$enable_xpmem], [xpmem])]
)

dnl Disable symbol versioning when -ipo is in CFLAGS or ipo is disabled by icc.
dnl The gcc equivalent ipo (-fwhole-program) seems to work fine.
Expand Down
11 changes: 8 additions & 3 deletions prov/shm/Makefile.include
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,18 @@ _shm_files = \

if HAVE_SHM_DL
pkglib_LTLIBRARIES += libshm-fi.la
libshm_fi_la_CPPFLAGS = \
-I$(top_srcdir)/include \
$(AM_CPPFLAGS) $(xpmem_CPPFLAGS)
libshm_fi_la_SOURCES = $(_shm_files) $(common_srcs)
libshm_fi_la_LIBADD = $(linkback) $(shm_lib_LIBS)
libshm_fi_la_LDFLAGS = -module -avoid-version -shared -export-dynamic
libshm_fi_la_LIBADD = $(linkback) $(shm_lib_LIBS) $(xpmem_LIBS)
libshm_fi_la_LDFLAGS = $(xpmem_LDFLAGS) -module -avoid-version -shared -export-dynamic
libshm_fi_la_DEPENDENCIES = $(linkback)
else !HAVE_SHM_DL
src_libfabric_la_CPPFLAGS += $(xpmem_CPPFLAGS)
src_libfabric_la_SOURCES += $(_shm_files)
src_libfabric_la_LIBADD += $(shm_lib_LIBS)
src_libfabric_la_LIBADD += $(shm_lib_LIBS) $(xpmem_LIBS)
src_libfabric_la_LDFLAGS += $(xpmem_LDFLAGS)
endif !HAVE_SHM_DL

prov_install_man_pages += man/man7/fi_shm.7
Expand Down
24 changes: 15 additions & 9 deletions prov/shm/configure.m4
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,10 @@ AC_DEFUN([FI_SHM_CONFIGURE],[
[shm_happy=0])
AS_IF([test "$enable_xpmem" = "no"],
[xpmem_happy=0],
[xpmem_happy=1])
AS_IF([test $xpmem_happy -eq 1 -a "$enable_xpmem" != "yes"],
[CPPFLAGS="$CPPFLAGS -I$enable_xpmem/include"
LDFLAGS="$LDFLAGS -L$enable_xpmem/lib"],
[])
[want_xpmem=0
xpmem_happy=0],
[want_xpmem=1
xpmem_happy=1])
# check if XPMEM support is present
AS_IF([test $xpmem_happy -eq 1],
Expand All @@ -45,8 +42,8 @@ AC_DEFUN([FI_SHM_CONFIGURE],[
[xpmem],
[xpmem_make],
[],
[],
[],
[$xpmem_PREFIX],
[$xpmem_LIBDIR],
[],
[xpmem_happy=0])])
Expand All @@ -55,6 +52,15 @@ AC_DEFUN([FI_SHM_CONFIGURE],[
[Define if XPMEM support is available])],
[])
# if xpmem was requested but we can't deliver it, abort
AS_IF([test $want_xpmem -eq 1 && test $xpmem_happy -eq 0],
[AC_MSG_WARN([xpmem support requested, but is unavailable])
AC_MSG_ERROR([Cannot continue])])
AC_SUBST(xpmem_CPPFLAGS)
AC_SUBST(xpmem_LDFLAGS)
AC_SUBST(xpmem_LIBS)
# look for shm_open in librt if not already present
AS_IF([test $shm_happy -eq 0],
[FI_CHECK_PACKAGE([shm_lib],
Expand Down

0 comments on commit bf12056

Please sign in to comment.