diff --git a/config/ompi_check_libhcoll.m4 b/config/ompi_check_libhcoll.m4 index f2c79051d5..337501170f 100644 --- a/config/ompi_check_libhcoll.m4 +++ b/config/ompi_check_libhcoll.m4 @@ -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.]) diff --git a/ompi/mca/coll/hcoll/Makefile.am b/ompi/mca/coll/hcoll/Makefile.am index 709b5376cd..dafa2b32f9 100644 --- a/ompi/mca/coll/hcoll/Makefile.am +++ b/ompi/mca/coll/hcoll/Makefile.am @@ -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 \ diff --git a/ompi/mca/coll/hcoll/coll_hcoll.h b/ompi/mca/coll/hcoll/coll_hcoll.h index 3483dc50e8..8211061a2f 100644 --- a/ompi/mca/coll/hcoll/coll_hcoll.h +++ b/ompi/mca/coll/hcoll/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" diff --git a/ompi/mca/coll/hcoll/coll_hcoll_dtypes.h b/ompi/mca/coll/hcoll/coll_hcoll_dtypes.h index c1c83aa445..a578bc9d47 100644 --- a/ompi/mca/coll/hcoll/coll_hcoll_dtypes.h +++ b/ompi/mca/coll/hcoll/coll_hcoll_dtypes.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 diff --git a/ompi/mca/coll/hcoll/coll_hcoll_ops.c b/ompi/mca/coll/hcoll/coll_hcoll_ops.c index 266f1e2103..c27486ae73 100644 --- a/ompi/mca/coll/hcoll/coll_hcoll_ops.c +++ b/ompi/mca/coll/hcoll/coll_hcoll_ops.c @@ -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; diff --git a/ompi/mca/coll/hcoll/coll_hcoll_rte.c b/ompi/mca/coll/hcoll/coll_hcoll_rte.c index 809ff80c62..e9fc4a6b71 100644 --- a/ompi/mca/coll/hcoll/coll_hcoll_rte.c +++ b/ompi/mca/coll/hcoll/coll_hcoll_rte.c @@ -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 */ diff --git a/ompi/mca/coll/hcoll/configure.m4 b/ompi/mca/coll/hcoll/configure.m4 index 78734309a5..f3f57532e2 100644 --- a/ompi/mca/coll/hcoll/configure.m4 +++ b/ompi/mca/coll/hcoll/configure.m4 @@ -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])