1
1

Merge pull request #796 from ggouaillardet/topic/hcoll_config

configury: fix hcoll, fca and mxm detection and revamp yalla Makefile.am
Thanks to David Shrader and Ake Sandgren for bringing this issue to our attention
Этот коммит содержится в:
Gilles Gouaillardet 2015-08-14 08:55:46 +09:00
родитель 9f369ba515 6b2fe9120e
Коммит 6118236f1a
13 изменённых файлов: 95 добавлений и 100 удалений

Просмотреть файл

@ -17,49 +17,43 @@ dnl
# LDFLAGS, LIBS} as needed and runs action-if-found if there is
# support, otherwise executes action-if-not-found
AC_DEFUN([OMPI_CHECK_FCA],[
OPAL_VAR_SCOPE_PUSH([ompi_check_fca_libdir ompi_check_fca_incdir ompi_check_fca_libs ompi_check_fca_happy CPPFLAGS_save LDFLAGS_save LIBS_save])
OPAL_VAR_SCOPE_PUSH([ompi_check_fca_libs ompi_check_fca_happy CPPFLAGS_save LDFLAGS_save LIBS_save])
AC_ARG_WITH([fca],
[AC_HELP_STRING([--with-fca(=DIR)],
[Build fca (Mellanox Fabric Collective Accelerator) support, searching for libraries in DIR])])
OPAL_CHECK_WITHDIR([fca], [$with_fca], [lib/libfca.so])
[Build fca (Mellanox Fabric Collective Accelerator) support, optionally adding
DIR/include and DIR/lib or DIR/lib64 to the search path for headers and libraries])])
AS_IF([test "$with_fca" != "no"],
[AS_IF([test ! -z "$with_fca" && test "$with_fca" != "yes"],
[ompi_check_fca_dir=$with_fca
ompi_check_fca_libdir="$ompi_check_fca_dir/lib"
ompi_check_fca_incdir="$ompi_check_fca_dir/include"
ompi_check_fca_libs=fca
[ompi_check_fca_libs=fca
AS_IF([test ! -z "$with_fca" && test "$with_fca" != "yes"],
[ompi_check_fca_dir=$with_fca
AC_SUBST([coll_fca_HOME], "$ompi_check_fca_dir")],
[AC_SUBST([coll_fca_HOME], "/")])
coll_fca_extra_CPPFLAGS="-I$ompi_check_fca_incdir/fca -I$ompi_check_fca_incdir/fca_core"
AC_SUBST([coll_fca_extra_CPPFLAGS])
AC_SUBST([coll_fca_HOME], "$ompi_check_fca_dir")
CPPFLAGS_save=$CPPFLAGS
LDFLAGS_save=$LDFLAGS
LIBS_save=$LIBS
CPPFLAGS="$CPPFLAGS $coll_fca_extra_CPPFLAGS"
CPPFLAGS_save=$CPPFLAGS
LDFLAGS_save=$LDFLAGS
LIBS_save=$LIBS
OPAL_LOG_MSG([$1_CPPFLAGS : $$1_CPPFLAGS], 1)
OPAL_LOG_MSG([$1_LDFLAGS : $$1_LDFLAGS], 1)
OPAL_LOG_MSG([$1_LIBS : $$1_LIBS], 1)
OPAL_LOG_MSG([$1_CPPFLAGS : $$1_CPPFLAGS], 1)
OPAL_LOG_MSG([$1_LDFLAGS : $$1_LDFLAGS], 1)
OPAL_LOG_MSG([$1_LIBS : $$1_LIBS], 1)
OPAL_CHECK_PACKAGE([$1],
[fca_api.h],
[$ompi_check_fca_libs],
[fca_get_version],
[],
[$ompi_check_fca_dir],
[$ompi_check_fca_libdir],
[ompi_check_fca_happy="yes"],
[ompi_check_fca_happy="no"])
OPAL_CHECK_PACKAGE([$1],
[fca/fca_api.h],
[$ompi_check_fca_libs],
[fca_get_version],
[],
[$ompi_check_fca_dir],
[],
[ompi_check_fca_happy="yes"],
[ompi_check_fca_happy="no"])
CPPFLAGS=$CPPFLAGS_save
LDFLAGS=$LDFLAGS_save
LIBS=$LIBS_save],
[ompi_check_fca_happy="no"])
])
CPPFLAGS=$CPPFLAGS_save
LDFLAGS=$LDFLAGS_save
LIBS=$LIBS_save],
[ompi_check_fca_happy="no"])
AS_IF([test "$ompi_check_fca_happy" = "yes" && test "$enable_progress_threads" = "yes"],
[AC_MSG_WARN([fca driver does not currently support progress threads. Disabling FCA.])

Просмотреть файл

@ -17,52 +17,40 @@ dnl
# LDFLAGS, LIBS} as needed and runs action-if-found if there is
# support, otherwise executes action-if-not-found
AC_DEFUN([OMPI_CHECK_HCOLL],[
OPAL_VAR_SCOPE_PUSH([ompi_check_hcoll_dir ompi_hcoll_libdir ompi_check_hcoll_incdir ompi_check_hcoll_libs ompi_check_hcoll_happy CPPFLAGS_save LDFLAGS_save LIBS_save])
OPAL_VAR_SCOPE_PUSH([ompi_check_hcoll_dir ompi_check_hcoll_libs ompi_check_hcoll_happy CPPFLAGS_save LDFLAGS_save LIBS_save])
AC_ARG_WITH([hcoll],
[AC_HELP_STRING([--with-hcoll(=DIR)],
[Build hcoll (Mellanox Hierarchical Collectives) support, searching for libraries in DIR])])
OPAL_CHECK_WITHDIR([hcoll], [$with_hcoll], [lib/libhcoll.so])
[Build hcoll (Mellanox Hierarchical Collectives) support, optionally adding
DIR/include and DIR/lib or DIR/lib64 to the search path for headers and libraries])])
AS_IF([test "$with_hcoll" != "no"],
[AS_IF([test ! -z "$with_hcoll" && test "$with_hcoll" != "yes"],
[ompi_check_hcoll_dir=$with_hcoll
ompi_check_hcoll_libdir="$ompi_check_hcoll_dir/lib"
ompi_check_hcoll_incdir="$ompi_check_hcoll_dir/include"
ompi_check_hcoll_libs=hcoll
[ompi_check_hcoll_libs=hcoll
AS_IF([test ! -z "$with_hcoll" && test "$with_hcoll" != "yes"],
[ompi_check_hcoll_dir=$with_hcoll])
coll_hcoll_extra_CPPFLAGS="-I$ompi_check_hcoll_incdir/hcoll -I$ompi_check_hcoll_incdir/hcoll/api"
CPPFLAGS_save=$CPPFLAGS
LDFLAGS_save=$LDFLAGS
LIBS_save=$LIBS
AC_SUBST([coll_hcoll_extra_CPPFLAGS])
AC_SUBST([coll_hcoll_HOME], "$ompi_check_hcoll_dir")
CPPFLAGS_save=$CPPFLAGS
LDFLAGS_save=$LDFLAGS
LIBS_save=$LIBS
CPPFLAGS="$CPPFLAGS $coll_hcoll_extra_CPPFLAGS"
OPAL_LOG_MSG([$1_CPPFLAGS : $$1_CPPFLAGS], 1)
OPAL_LOG_MSG([$1_LDFLAGS : $$1_LDFLAGS], 1)
OPAL_LOG_MSG([$1_LIBS : $$1_LIBS], 1)
OPAL_CHECK_PACKAGE([$1],
[hcoll_api.h],
[$ompi_check_hcoll_libs],
[hcoll_get_version],
[],
[$ompi_check_hcoll_dir],
[$ompi_check_hcoll_libdir],
[ompi_check_hcoll_happy="yes"],
[ompi_check_hcoll_happy="no"])
CPPFLAGS=$CPPFLAGS_save
LDFLAGS=$LDFLAGS_save
LIBS=$LIBS_save],
[ompi_check_hcoll_happy="no"])
])
OPAL_LOG_MSG([$1_CPPFLAGS : $$1_CPPFLAGS], 1)
OPAL_LOG_MSG([$1_LDFLAGS : $$1_LDFLAGS], 1)
OPAL_LOG_MSG([$1_LIBS : $$1_LIBS], 1)
OPAL_CHECK_PACKAGE([$1],
[hcoll/api/hcoll_api.h],
[$ompi_check_hcoll_libs],
[hcoll_get_version],
[],
[$ompi_check_hcoll_dir],
[],
[ompi_check_hcoll_happy="yes"],
[ompi_check_hcoll_happy="no"])
CPPFLAGS=$CPPFLAGS_save
LDFLAGS=$LDFLAGS_save
LIBS=$LIBS_save],
[ompi_check_hcoll_happy=no])
AS_IF([test "$ompi_check_hcoll_happy" = "yes" && test "$enable_progress_threads" = "yes"],
[AC_MSG_WARN([hcoll driver does not currently support progress threads. Disabling HCOLL.])

Просмотреть файл

@ -18,11 +18,11 @@ dnl
AC_DEFUN([OMPI_CHECK_MXM],[
AC_ARG_WITH([mxm],
[AC_HELP_STRING([--with-mxm(=DIR)],
[Build Mellanox Messaging support])])
OPAL_CHECK_WITHDIR([mxm], [$with_mxm], [include/mxm/api/mxm_api.h])
[Build Mellanox Messaging support, optionally adding
DIR/include and DIR/lib or DIR/lib64 to the search path for headers and libraries])])
AC_ARG_WITH([mxm-libdir],
[AC_HELP_STRING([--with-mxm-libdir=DIR],
[Search for Mellanox Messaging libraries in DIR])])
[Search for Mellanox MXM libraries in DIR])])
OPAL_CHECK_WITHDIR([mxm-libdir], [$with_mxm_libdir], [libmxm.*])
ompi_check_mxm_$1_save_CPPFLAGS="$CPPFLAGS"
@ -33,18 +33,15 @@ AC_DEFUN([OMPI_CHECK_MXM],[
[AS_IF([test ! -z "$with_mxm" && test "$with_mxm" != "yes"],
[
ompi_check_mxm_dir="$with_mxm"
ompi_check_mxm_libdir="$with_mxm/lib"
])
AS_IF([test ! -z "$with_mxm_libdir" && test "$with_mxm_libdir" != "yes"],
[ompi_check_mxm_libdir="$with_mxm_libdir"])
AS_IF([test ! -z "$ompi_check_mxm_libdir"], [ompi_check_mxm_extra_libs="-L$ompi_check_mxm_libdir"],[])
OPAL_CHECK_PACKAGE([$1],
[mxm/api/mxm_api.h],
[mxm],
[mxm_cleanup],
[$ompi_check_mxm_extra_libs],
[],
[$ompi_check_mxm_dir],
[$ompi_check_mxm_libdir],
[ompi_check_mxm_happy="yes"],

Просмотреть файл

@ -1,5 +1,7 @@
/**
Copyright (c) 2011 Mellanox Technologies. All rights reserved.
Copyright (c) 2011 Mellanox Technologies. All rights reserved.
Copyright (c) 2015 Research Organization for Information Science
and Technology (RIST). All rights reserved.
$COPYRIGHT$
Additional copyrights may follow
@ -9,8 +11,8 @@
#include "ompi_config.h"
#include <fca_api.h>
#include <config/fca_parse_specfile.h>
#include <fca/fca_api.h>
#include <fca/config/fca_parse_specfile.h>
#ifndef FCA_API
#define OMPI_FCA_VERSION 12

Просмотреть файл

@ -2,6 +2,8 @@
#
#
# Copyright (c) 2011 Mellanox Technologies. All rights reserved.
# Copyright (c) 2015 Research Organization for Information Science
# and Technology (RIST). All rights reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
@ -10,7 +12,7 @@
#
#
AM_CPPFLAGS = $(coll_hcoll_CPPFLAGS) -DCOLL_HCOLL_HOME=\"$(coll_hcoll_HOME)\" $(coll_hcoll_extra_CPPFLAGS)
AM_CPPFLAGS = $(coll_hcoll_CPPFLAGS)
coll_hcoll_sources = \
coll_hcoll.h \

Просмотреть файл

@ -1,5 +1,7 @@
/**
Copyright (c) 2011 Mellanox Technologies. All rights reserved.
Copyright (c) 2011 Mellanox Technologies. All rights reserved.
Copyright (c) 2015 Research Organization for Information Science
and Technology (RIST). All rights reserved.
$COPYRIGHT$
Additional copyrights may follow
@ -25,8 +27,8 @@
#include "orte/runtime/orte_globals.h"
#include "hcoll_api.h"
#include "hcoll_constants.h"
#include "hcoll/api/hcoll_api.h"
#include "hcoll/api/hcoll_constants.h"
#include "coll_hcoll_debug.h"

Просмотреть файл

@ -7,7 +7,7 @@
#include "ompi/datatype/ompi_datatype.h"
#include "ompi/mca/op/op.h"
#include "hcoll_dte.h"
#include "hcoll/api/hcoll_dte.h"
/*to keep this at hand: Ids of the basic opal_datatypes:
#define OPAL_DATATYPE_INT1 4

Просмотреть файл

@ -1,5 +1,7 @@
/**
Copyright (c) 2011 Mellanox Technologies. All rights reserved.
Copyright (c) 2011 Mellanox Technologies. All rights reserved.
Copyright (c) 2015 Research Organization for Information Science
and Technology (RIST). All rights reserved.
$COPYRIGHT$
Additional copyrights may follow
@ -10,9 +12,9 @@
#include "ompi_config.h"
#include "ompi/constants.h"
#include "coll_hcoll.h"
#include "hcoll_constants.h"
#include "hcoll/api/hcoll_constants.h"
#include "coll_hcoll_dtypes.h"
#include "hcoll_dte.h"
#include "hcoll/api/hcoll_dte.h"
int mca_coll_hcoll_barrier(struct ompi_communicator_t *comm,
mca_coll_base_module_t *module){
int rc;

Просмотреть файл

@ -7,6 +7,8 @@
* reserved.
* Copyright (c) 2015 Los Alamos National Security, LLC. All rights
* reserved.
* Copyright (c) 2015 Research Organization for Information Science
* and Technology (RIST). All rights reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
@ -39,9 +41,9 @@
#include "ompi/mca/pml/pml.h"
#include "hcoll_dte.h"
#include "hcoll_api.h"
#include "hcoll_constants.h"
#include "hcoll/api/hcoll_dte.h"
#include "hcoll/api/hcoll_api.h"
#include "hcoll/api/hcoll_constants.h"
/*
* Local functions
*/

Просмотреть файл

@ -1,7 +1,9 @@
# -*- shell-script -*-
#
#
# Copyright (c) 2011 Mellanox Technologies. All rights reserved.
# Copyright (c) 2011 Mellanox Technologies. All rights reserved.
# Copyright (c) 2015 Research Organization for Information Science
# and Technology (RIST). All rights reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
@ -23,7 +25,6 @@ AC_DEFUN([MCA_ompi_coll_hcoll_CONFIG],[
AS_IF([test "$coll_hcoll_happy" = "yes"],
[coll_hcoll_WRAPPER_EXTRA_LDFLAGS="$coll_hcoll_LDFLAGS"
coll_hcoll_CPPFLAGS="$coll_hcoll_CPPFLAGS"
coll_hcoll_WRAPPER_EXTRA_CPPFLAGS="$coll_hcoll_CPPFLAGS"
coll_hcoll_WRAPPER_EXTRA_LIBS="$coll_hcoll_LIBS"
$1],
[$2])

Просмотреть файл

@ -1,5 +1,7 @@
#
# Copyright (C) Mellanox Technologies Ltd. 2001-2014. ALL RIGHTS RESERVED.
# Copyright (c) 2001-2014 Mellanox Technologies Ltd. ALL RIGHTS RESERVED.
# Copyright (c) 2015 Research Organization for Information Science
# and Technology (RIST). All rights reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
@ -36,10 +38,10 @@ mcacomponentdir = $(ompilibdir)
mcacomponent_LTLIBRARIES = $(component_install)
mca_pml_yalla_la_SOURCES = $(local_sources)
mca_pml_yalla_la_LIBADD = $(pml_yalla_LIBS)
mca_pml_yalla_la_LDFLAGS = -module -avoid-version
mca_pml_yalla_la_LDFLAGS = -module -avoid-version $(pml_yalla_LDFLAGS)
noinst_LTLIBRARIES = $(component_noinst)
libmca_pml_yalla_la_SOURCES = $(local_sources)
libmca_pml_yalla_la_LIBADD = $(pml_yalla_LIBS)
libmca_pml_yalla_la_LDFLAGS = -module -avoid-version
libmca_pml_yalla_la_LDFLAGS = -module -avoid-version $(pml_yalla_LDFLAGS)

Просмотреть файл

@ -3,6 +3,8 @@
#
# Copyright (c) 2013 Mellanox Technologies, Inc.
# All rights reserved.
# Copyright (c) 2015 Research Organization for Information Science
# and Technology (RIST). All rights reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
@ -24,7 +26,6 @@ AC_DEFUN([MCA_oshmem_scoll_fca_CONFIG],[
AS_IF([test "$scoll_fca_happy" = "yes"],
[scoll_fca_WRAPPER_EXTRA_LDFLAGS="$scoll_fca_LDFLAGS"
scoll_fca_CPPFLAGS="$scoll_fca_CPPFLAGS"
scoll_fca_WRAPPER_EXTRA_CPPFLAGS="$scoll_fca_CPPFLAGS"
scoll_fca_WRAPPER_EXTRA_LIBS="$scoll_fca_LIBS"
$1],
[$2])

Просмотреть файл

@ -1,6 +1,8 @@
/*
* Copyright (c) 2013 Mellanox Technologies, Inc.
* All rights reserved.
* Copyright (c) 2015 Research Organization for Information Science
* and Technology (RIST). All rights reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
@ -9,9 +11,9 @@
*/
#include "oshmem_config.h"
#include <fca_api.h>
#include <fca_version.h>
#include <config/fca_parse_specfile.h>
#include <fca/fca_api.h>
#include <fca/fca_version.h>
#include <fca/config/fca_parse_specfile.h>
#ifndef FCA_API
#define OSHMEM_FCA_VERSION 12