1
1

configury: fix hcoll detection

* do not add -I/.../include/hcoll -I /.../include/hcoll/api to CPPFLAGS
 * allow configure --with-hcoll
 * search hcoll libs in both DIR/lib and DIR/lib64
 * fix the description of the --with-hcoll option
Этот коммит содержится в:
Gilles Gouaillardet 2015-08-11 14:52:36 +09:00
родитель 452f97f84e
Коммит df98a73131
7 изменённых файлов: 47 добавлений и 50 удалений

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

@ -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.])

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

@ -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])