PTL GM now use the new configure system (m4 macros).
This commit was SVN r7070.
Этот коммит содержится в:
родитель
173e062fbb
Коммит
12c09fef92
@ -20,6 +20,8 @@
|
||||
|
||||
include $(top_ompi_srcdir)/config/Makefile.options
|
||||
|
||||
AM_CPPFLAGS = $(ptl_gm_CPPFLAGS)
|
||||
|
||||
# Make the output library in this directory, and name it either
|
||||
# mca_<type>_<name>.la (for DSO builds) or libmca_<type>_<name>.la
|
||||
# (for static builds).
|
||||
@ -55,11 +57,11 @@ mcacomponentdir = $(libdir)/openmpi
|
||||
mcacomponent_LTLIBRARIES = $(component_install)
|
||||
|
||||
mca_ptl_gm_la_SOURCES = $(libmca_ptl_gm_la_sources)
|
||||
mca_ptl_gm_la_LIBADD =
|
||||
mca_ptl_gm_la_LDFLAGS = -module -avoid-version
|
||||
mca_ptl_gm_la_LIBADD = $(ptl_gm_LIBS)
|
||||
mca_ptl_gm_la_LDFLAGS = -module -avoid-version $(ptl_gm_LDFLAGS)
|
||||
|
||||
noinst_LTLIBRARIES = $(component_noinst)
|
||||
libmca_ptl_gm_la_SOURCES = $(libmca_ptl_gm_la_sources)
|
||||
libmca_ptl_gm_la_LIBADD =
|
||||
libmca_ptl_gm_la_LDFLAGS = -module -avoid-version
|
||||
libmca_ptl_gm_la_LIBADD = $(ptl_gm_LIBS)
|
||||
libmca_ptl_gm_la_LDFLAGS = -module -avoid-version $(ptl_gm_LDFLAGS)
|
||||
|
||||
|
38
ompi/mca/ptl/gm/configure.m4
Обычный файл
38
ompi/mca/ptl/gm/configure.m4
Обычный файл
@ -0,0 +1,38 @@
|
||||
# -*- shell-script -*-
|
||||
#
|
||||
# Copyright (c) 2004-2005 The Trustees of Indiana University.
|
||||
# All rights reserved.
|
||||
# Copyright (c) 2004-2005 The Trustees of the University of Tennessee.
|
||||
# All rights reserved.
|
||||
# Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
|
||||
# University of Stuttgart. All rights reserved.
|
||||
# Copyright (c) 2004-2005 The Regents of the University of California.
|
||||
# All rights reserved.
|
||||
# $COPYRIGHT$
|
||||
#
|
||||
# Additional copyrights may follow
|
||||
#
|
||||
# $HEADER$
|
||||
#
|
||||
|
||||
|
||||
# MCA_ptl_gm_CONFIG([action-if-can-compile],
|
||||
# [action-if-cant-compile])
|
||||
# ------------------------------------------------
|
||||
AC_DEFUN([MCA_ptl_gm_CONFIG],[
|
||||
OMPI_CHECK_GM([ptl_gm],
|
||||
[ptl_gm_happy="yes"],
|
||||
[ptl_gm_happy="no"])
|
||||
|
||||
AS_IF([test "$ptl_gm_happy" = "yes"],
|
||||
[ptl_gm_WRAPPER_EXTRA_LDFLAGS="$ptl_gm_LDFLAGS"
|
||||
ptl_gm_WRAPPER_EXTRA_LIBS="$ptl_gm_LIBS"
|
||||
$1],
|
||||
[$2])
|
||||
|
||||
# substitute in the things needed to build gm
|
||||
AC_SUBST([ptl_gm_CFLAGS])
|
||||
AC_SUBST([ptl_gm_CPPFLAGS])
|
||||
AC_SUBST([ptl_gm_LDFLAGS])
|
||||
AC_SUBST([ptl_gm_LIBS])
|
||||
])dnl
|
@ -1,196 +0,0 @@
|
||||
# -*- shell-script -*-
|
||||
#
|
||||
# Copyright (c) 2004-2005 The Trustees of Indiana University.
|
||||
# All rights reserved.
|
||||
# Copyright (c) 2004-2005 The Trustees of the University of Tennessee.
|
||||
# All rights reserved.
|
||||
# Copyright (c) 2004 The Ohio State University.
|
||||
# All rights reserved.
|
||||
# Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
|
||||
# University of Stuttgart. All rights reserved.
|
||||
# Copyright (c) 2004-2005 The Regents of the University of California.
|
||||
# All rights reserved.
|
||||
# $COPYRIGHT$
|
||||
#
|
||||
# Additional copyrights may follow
|
||||
#
|
||||
# $HEADER$
|
||||
#
|
||||
|
||||
#
|
||||
# Main function. This will be invoked in the middle of the templated
|
||||
# configure script.
|
||||
#
|
||||
AC_DEFUN([MCA_CONFIGURE_STUB],[
|
||||
|
||||
# Additional --with flags that can be specified
|
||||
|
||||
AC_ARG_WITH(ptl-gm,
|
||||
AC_HELP_STRING([--with-ptl-gm=DIR],
|
||||
[Specify the installation directory of GM]))
|
||||
AC_ARG_WITH(ptl-gm-libdir,
|
||||
AC_HELP_STRING([--with-ptl-gm-libdir=DIR],
|
||||
[directory where the GM library can be found, if it is not in \$GMDIR/lib or \$GMDIR/binary/lib]))
|
||||
AC_ARG_ENABLE(gm-ptl-cache,
|
||||
AC_HELP_STRING([--enable-gm-ptl-cache],[Enable/disable the internal registered memory cache (default=no)]),
|
||||
[enable_gm_cache=$(enable_gm_ptl_cache)],
|
||||
[enable_gm_cache="no"])
|
||||
|
||||
if test "$enable_gm_cache" = "yes"; then
|
||||
AC_DEFINE_UNQUOTED( OMPI_MCA_PTL_GM_CACHE_ENABLE, 1,
|
||||
[Enable GM PTL internal cache for registered memory])
|
||||
else
|
||||
AC_DEFINE_UNQUOTED( OMPI_MCA_PTL_GM_CACHE_ENABLE, 0,
|
||||
[Disable GM PTL internal cache for registered memory])
|
||||
fi
|
||||
AM_CONDITIONAL( OMPI_ENABLE_GM_CACHE, test "$enable_gm_cache" = "yes" )
|
||||
|
||||
# Add to CPPFLAGS if necessary
|
||||
|
||||
EXTRA_CPPFLAGS=
|
||||
if test -n "$with_ptl_gm"; then
|
||||
if test -d "$with_ptl_gm/include"; then
|
||||
EXTRA_CPPFLAGS="-I$with_ptl_gm/include"
|
||||
else
|
||||
AC_MSG_WARN([*** Warning: cannot find $with_ptl_gm/include])
|
||||
AC_MSG_WARN([*** Will still try to configure gm ptl anyway...])
|
||||
fi
|
||||
fi
|
||||
|
||||
# See if we can find gm.h
|
||||
|
||||
CPPFLAGS="$CPPFLAGS $EXTRA_CPPFLAGS"
|
||||
AC_CHECK_HEADERS(gm.h,,
|
||||
AC_MSG_ERROR([*** Cannot find working gm.h.]))
|
||||
|
||||
# Add to LDFLAGS if necessary
|
||||
|
||||
EXTRA_LDFLAGS=
|
||||
if test -n "$with_ptl_gm_libdir"; then
|
||||
if test -d "$with_ptl_gm_libdir"; then
|
||||
EXTRA_LDFLAGS="-L$with_ptl_gm_libdir"
|
||||
else
|
||||
AC_MSG_WARN([*** Warning: cannot find $with_ptl_gm_libdir])
|
||||
AC_MSG_WARN([*** Will still try to configure gm ptl anyway...])
|
||||
fi
|
||||
elif test -n "$with_ptl_gm"; then
|
||||
if test -d "$with_ptl_gm/lib"; then
|
||||
EXTRA_LDFLAGS="-L$with_ptl_gm/lib"
|
||||
elif test -d "$with_ptl_gm/binary/lib"; then
|
||||
EXTRA_LDFLAGS="-L$with_ptl_gm/binary/lib"
|
||||
else
|
||||
AC_MSG_WARN([*** Warning: cannot find $with_ptl_gm/lib])
|
||||
AC_MSG_WARN([*** or $with_ptl_gm/binary/lib])
|
||||
AC_MSG_WARN([*** Will still try to configure gm ptl anyway...])
|
||||
fi
|
||||
fi
|
||||
|
||||
# Try to find libgm
|
||||
|
||||
LDFLAGS="$LDFLAGS $EXTRA_LDFLAGS"
|
||||
AC_CHECK_LIB([gm], [main], [],
|
||||
AC_MSG_ERROR([*** Cannot find libgm]))
|
||||
|
||||
#
|
||||
# See if we have GM_API_VERSION. If we do, use it. If not, find the
|
||||
# highest one available. It seems that GM_API_VERSION was introduced
|
||||
# somewhere after 1.3 but before 1.6. :-\
|
||||
#
|
||||
|
||||
AC_MSG_CHECKING(for GM_API_VERSION)
|
||||
AC_TRY_COMPILE([#include<gm.h>],
|
||||
[int foo = GM_API_VERSION;],
|
||||
have_gm_api_ver_msg=yes gm_api_ver=GM_API_VERSION,
|
||||
have_gm_api_ver_msg=no gm_api_ver="")
|
||||
AC_MSG_RESULT([$have_gm_api_ver_msg])
|
||||
if test "$gm_api_ver" = ""; then
|
||||
found=0
|
||||
for val in 5 4 3; do
|
||||
if test "$found" = "0"; then
|
||||
var="GM_API_VERSION_1_$val"
|
||||
AC_MSG_CHECKING(for $var)
|
||||
AC_TRY_COMPILE([#include<gm.h>],
|
||||
[int foo = $var;],
|
||||
msg=yes found=1 gm_api_ver=$var,
|
||||
msg=no found=0 gm_api_ver="")
|
||||
AC_MSG_RESULT($msg)
|
||||
fi
|
||||
done
|
||||
fi
|
||||
if test "$gm_api_ver" = ""; then
|
||||
AC_MSG_WARN([*** Could not find a supported GM_API_VERSION])
|
||||
AC_MSG_ERROR([*** Cannot continue])
|
||||
fi
|
||||
AC_DEFINE_UNQUOTED(OMPI_MCA_PTL_GM_API_VERSION, $gm_api_ver,
|
||||
[Version of the GM API to use])
|
||||
unset gm_api_ver have_gm_api_ver_msg found val msg
|
||||
|
||||
#
|
||||
# Do we have gm_put()?
|
||||
# gm_put() was introduced in gm 2.0, and is exactly identical to gm
|
||||
# 1.6's gm_directed_send_with_callback(). The name was simply changed
|
||||
# for consistency/symmtery with gm_get().
|
||||
#
|
||||
|
||||
AC_MSG_CHECKING([for gm_put()])
|
||||
AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include<gm.h>
|
||||
]],
|
||||
[[gm_put(0, 0, 0, 0, 0, 0, 0, 0, 0);]])],
|
||||
[HAVE_RDMA_PUT=1 MSG=yes],
|
||||
[HAVE_RDMA_PUT=0 MSG="no, use gm_directed_send_with_callback()"])
|
||||
AC_DEFINE_UNQUOTED(OMPI_MCA_PTL_GM_HAVE_RDMA_PUT, $HAVE_RDMA_PUT,
|
||||
[Whether we have gm_put() or gm_directed_send_with_callback()])
|
||||
AC_MSG_RESULT([$MSG])
|
||||
|
||||
#
|
||||
# Do we have gm_get()?
|
||||
# gm_get() was introduced in gm 2.0.
|
||||
#
|
||||
|
||||
AC_MSG_CHECKING([for gm_get()])
|
||||
AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include<gm.h>
|
||||
]],
|
||||
[[gm_get(0, 0, 0, 0, 0, 0, 0, 0, 0);]])],
|
||||
[HAVE_RDMA_GET=1 MSG=yes],
|
||||
[HAVE_RDMA_GET=0 MSG=no])
|
||||
AC_DEFINE_UNQUOTED(OMPI_MCA_PTL_GM_HAVE_RDMA_GET, $HAVE_RDMA_GET,
|
||||
[Whether we have get_get() or not])
|
||||
AC_MSG_RESULT([$MSG])
|
||||
|
||||
# Now test to see if the targetted GM is a broken one broken gm builds
|
||||
AC_MSG_CHECKING([for broken GM 2.x RDMA gets build])
|
||||
AC_TRY_COMPILE([
|
||||
#include <gm.h>
|
||||
], [
|
||||
#if GM_API_VERSION_2_0 && \
|
||||
((GM_API_VERSION_2_1_0 && GM_API_VERSION < 0x20102) || \
|
||||
GM_API_VERSION < 0x2000c)
|
||||
#error GM build is broken
|
||||
#endif ],
|
||||
[ mca_ptl_gm_broken=0 gm_build_broken=no ],
|
||||
[ mca_ptl_gm_broken=1 gm_build_broken=yes ])
|
||||
AC_MSG_RESULT( [$gm_build_broken] )
|
||||
AC_DEFINE_UNQUOTED( OMPI_MCA_PTL_GM_GET_BROKEN, $mca_ptl_gm_broken,
|
||||
[The GM build has or not a broker gm_get function] )
|
||||
unset gm_build_broken mca_ptl_gm_broken
|
||||
|
||||
AC_DEFINE_UNQUOTED( OMPI_MCA_PTL_GM_SUPPORT_REGISTERING, 1,
|
||||
[The OS support or not the virtal page registration] )
|
||||
|
||||
#
|
||||
# Save extra compiler/linker flags so that they can be added in
|
||||
# the wrapper compilers, if necessary
|
||||
#
|
||||
|
||||
WRAPPER_EXTRA_LDFLAGS="$EXTRA_LDFLAGS"
|
||||
WRAPPER_EXTRA_LIBS="-lgm"
|
||||
])dnl
|
||||
|
||||
#
|
||||
# For dist
|
||||
#
|
||||
AC_DEFUN([MCA_CONFIGURE_DIST_STUB],[
|
||||
AM_CONDITIONAL( OMPI_ENABLE_GM_CACHE, test "yes" = "yes" )
|
||||
])
|
||||
|
||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user