Skip to content

Commit 17e0d4c

Browse files
committed
Merge pull request open-mpi#490 from ggouaillardet/topic/v2.x/hcoll_fca_configury
Topic/v2.x/hcoll fca configury
2 parents b480114 + 4a18b7c commit 17e0d4c

File tree

13 files changed

+95
-100
lines changed

13 files changed

+95
-100
lines changed

config/ompi_check_libfca.m4

Lines changed: 27 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -17,49 +17,43 @@ dnl
1717
# LDFLAGS, LIBS} as needed and runs action-if-found if there is
1818
# support, otherwise executes action-if-not-found
1919
AC_DEFUN([OMPI_CHECK_FCA],[
20-
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])
20+
OPAL_VAR_SCOPE_PUSH([ompi_check_fca_libs ompi_check_fca_happy CPPFLAGS_save LDFLAGS_save LIBS_save])
2121

2222
AC_ARG_WITH([fca],
2323
[AC_HELP_STRING([--with-fca(=DIR)],
24-
[Build fca (Mellanox Fabric Collective Accelerator) support, searching for libraries in DIR])])
25-
OPAL_CHECK_WITHDIR([fca], [$with_fca], [lib/libfca.so])
24+
[Build fca (Mellanox Fabric Collective Accelerator) support, optionally adding
25+
DIR/include and DIR/lib or DIR/lib64 to the search path for headers and libraries])])
2626

2727
AS_IF([test "$with_fca" != "no"],
28-
[AS_IF([test ! -z "$with_fca" && test "$with_fca" != "yes"],
29-
[ompi_check_fca_dir=$with_fca
30-
ompi_check_fca_libdir="$ompi_check_fca_dir/lib"
31-
ompi_check_fca_incdir="$ompi_check_fca_dir/include"
32-
ompi_check_fca_libs=fca
28+
[ompi_check_fca_libs=fca
29+
AS_IF([test ! -z "$with_fca" && test "$with_fca" != "yes"],
30+
[ompi_check_fca_dir=$with_fca
31+
AC_SUBST([coll_fca_HOME], "$ompi_check_fca_dir")],
32+
[AC_SUBST([coll_fca_HOME], "/")])
3333

34-
coll_fca_extra_CPPFLAGS="-I$ompi_check_fca_incdir/fca -I$ompi_check_fca_incdir/fca_core"
35-
AC_SUBST([coll_fca_extra_CPPFLAGS])
36-
AC_SUBST([coll_fca_HOME], "$ompi_check_fca_dir")
34+
CPPFLAGS_save=$CPPFLAGS
35+
LDFLAGS_save=$LDFLAGS
36+
LIBS_save=$LIBS
3737

38-
CPPFLAGS_save=$CPPFLAGS
39-
LDFLAGS_save=$LDFLAGS
40-
LIBS_save=$LIBS
41-
CPPFLAGS="$CPPFLAGS $coll_fca_extra_CPPFLAGS"
4238

39+
OPAL_LOG_MSG([$1_CPPFLAGS : $$1_CPPFLAGS], 1)
40+
OPAL_LOG_MSG([$1_LDFLAGS : $$1_LDFLAGS], 1)
41+
OPAL_LOG_MSG([$1_LIBS : $$1_LIBS], 1)
4342

44-
OPAL_LOG_MSG([$1_CPPFLAGS : $$1_CPPFLAGS], 1)
45-
OPAL_LOG_MSG([$1_LDFLAGS : $$1_LDFLAGS], 1)
46-
OPAL_LOG_MSG([$1_LIBS : $$1_LIBS], 1)
43+
OPAL_CHECK_PACKAGE([$1],
44+
[fca/fca_api.h],
45+
[$ompi_check_fca_libs],
46+
[fca_get_version],
47+
[],
48+
[$ompi_check_fca_dir],
49+
[],
50+
[ompi_check_fca_happy="yes"],
51+
[ompi_check_fca_happy="no"])
4752

48-
OPAL_CHECK_PACKAGE([$1],
49-
[fca_api.h],
50-
[$ompi_check_fca_libs],
51-
[fca_get_version],
52-
[],
53-
[$ompi_check_fca_dir],
54-
[$ompi_check_fca_libdir],
55-
[ompi_check_fca_happy="yes"],
56-
[ompi_check_fca_happy="no"])
57-
58-
CPPFLAGS=$CPPFLAGS_save
59-
LDFLAGS=$LDFLAGS_save
60-
LIBS=$LIBS_save],
61-
[ompi_check_fca_happy="no"])
62-
])
53+
CPPFLAGS=$CPPFLAGS_save
54+
LDFLAGS=$LDFLAGS_save
55+
LIBS=$LIBS_save],
56+
[ompi_check_fca_happy="no"])
6357

6458
AS_IF([test "$ompi_check_fca_happy" = "yes" && test "$enable_progress_threads" = "yes"],
6559
[AC_MSG_WARN([fca driver does not currently support progress threads. Disabling FCA.])

config/ompi_check_libhcoll.m4

Lines changed: 25 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -17,52 +17,40 @@ dnl
1717
# LDFLAGS, LIBS} as needed and runs action-if-found if there is
1818
# support, otherwise executes action-if-not-found
1919
AC_DEFUN([OMPI_CHECK_HCOLL],[
20-
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])
20+
OPAL_VAR_SCOPE_PUSH([ompi_check_hcoll_dir ompi_check_hcoll_libs ompi_check_hcoll_happy CPPFLAGS_save LDFLAGS_save LIBS_save])
2121

2222
AC_ARG_WITH([hcoll],
2323
[AC_HELP_STRING([--with-hcoll(=DIR)],
24-
[Build hcoll (Mellanox Hierarchical Collectives) support, searching for libraries in DIR])])
25-
OPAL_CHECK_WITHDIR([hcoll], [$with_hcoll], [lib/libhcoll.so])
24+
[Build hcoll (Mellanox Hierarchical Collectives) support, optionally adding
25+
DIR/include and DIR/lib or DIR/lib64 to the search path for headers and libraries])])
2626

2727
AS_IF([test "$with_hcoll" != "no"],
28-
[AS_IF([test ! -z "$with_hcoll" && test "$with_hcoll" != "yes"],
29-
[ompi_check_hcoll_dir=$with_hcoll
30-
ompi_check_hcoll_libdir="$ompi_check_hcoll_dir/lib"
31-
ompi_check_hcoll_incdir="$ompi_check_hcoll_dir/include"
32-
ompi_check_hcoll_libs=hcoll
28+
[ompi_check_hcoll_libs=hcoll
29+
AS_IF([test ! -z "$with_hcoll" && test "$with_hcoll" != "yes"],
30+
[ompi_check_hcoll_dir=$with_hcoll])
3331

34-
coll_hcoll_extra_CPPFLAGS="-I$ompi_check_hcoll_incdir/hcoll -I$ompi_check_hcoll_incdir/hcoll/api"
32+
CPPFLAGS_save=$CPPFLAGS
33+
LDFLAGS_save=$LDFLAGS
34+
LIBS_save=$LIBS
3535

36-
AC_SUBST([coll_hcoll_extra_CPPFLAGS])
37-
AC_SUBST([coll_hcoll_HOME], "$ompi_check_hcoll_dir")
38-
39-
40-
CPPFLAGS_save=$CPPFLAGS
41-
LDFLAGS_save=$LDFLAGS
42-
LIBS_save=$LIBS
43-
CPPFLAGS="$CPPFLAGS $coll_hcoll_extra_CPPFLAGS"
44-
45-
OPAL_LOG_MSG([$1_CPPFLAGS : $$1_CPPFLAGS], 1)
46-
OPAL_LOG_MSG([$1_LDFLAGS : $$1_LDFLAGS], 1)
47-
OPAL_LOG_MSG([$1_LIBS : $$1_LIBS], 1)
48-
49-
OPAL_CHECK_PACKAGE([$1],
50-
[hcoll_api.h],
51-
[$ompi_check_hcoll_libs],
52-
[hcoll_get_version],
53-
[],
54-
[$ompi_check_hcoll_dir],
55-
[$ompi_check_hcoll_libdir],
56-
[ompi_check_hcoll_happy="yes"],
57-
[ompi_check_hcoll_happy="no"])
58-
59-
CPPFLAGS=$CPPFLAGS_save
60-
LDFLAGS=$LDFLAGS_save
61-
LIBS=$LIBS_save],
62-
[ompi_check_hcoll_happy="no"])
63-
])
36+
OPAL_LOG_MSG([$1_CPPFLAGS : $$1_CPPFLAGS], 1)
37+
OPAL_LOG_MSG([$1_LDFLAGS : $$1_LDFLAGS], 1)
38+
OPAL_LOG_MSG([$1_LIBS : $$1_LIBS], 1)
6439

40+
OPAL_CHECK_PACKAGE([$1],
41+
[hcoll/api/hcoll_api.h],
42+
[$ompi_check_hcoll_libs],
43+
[hcoll_get_version],
44+
[],
45+
[$ompi_check_hcoll_dir],
46+
[],
47+
[ompi_check_hcoll_happy="yes"],
48+
[ompi_check_hcoll_happy="no"])
6549

50+
CPPFLAGS=$CPPFLAGS_save
51+
LDFLAGS=$LDFLAGS_save
52+
LIBS=$LIBS_save],
53+
[ompi_check_hcoll_happy=no])
6654

6755
AS_IF([test "$ompi_check_hcoll_happy" = "yes" && test "$enable_progress_threads" = "yes"],
6856
[AC_MSG_WARN([hcoll driver does not currently support progress threads. Disabling HCOLL.])

config/ompi_check_mxm.m4

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,11 @@ dnl
1818
AC_DEFUN([OMPI_CHECK_MXM],[
1919
AC_ARG_WITH([mxm],
2020
[AC_HELP_STRING([--with-mxm(=DIR)],
21-
[Build Mellanox Messaging support])])
22-
OPAL_CHECK_WITHDIR([mxm], [$with_mxm], [include/mxm/api/mxm_api.h])
21+
[Build Mellanox Messaging support, optionally adding
22+
DIR/include and DIR/lib or DIR/lib64 to the search path for headers and libraries])])
2323
AC_ARG_WITH([mxm-libdir],
2424
[AC_HELP_STRING([--with-mxm-libdir=DIR],
25-
[Search for Mellanox Messaging libraries in DIR])])
25+
[Search for Mellanox MXM libraries in DIR])])
2626
OPAL_CHECK_WITHDIR([mxm-libdir], [$with_mxm_libdir], [libmxm.*])
2727

2828
ompi_check_mxm_$1_save_CPPFLAGS="$CPPFLAGS"
@@ -33,18 +33,15 @@ AC_DEFUN([OMPI_CHECK_MXM],[
3333
[AS_IF([test ! -z "$with_mxm" && test "$with_mxm" != "yes"],
3434
[
3535
ompi_check_mxm_dir="$with_mxm"
36-
ompi_check_mxm_libdir="$with_mxm/lib"
3736
])
3837
AS_IF([test ! -z "$with_mxm_libdir" && test "$with_mxm_libdir" != "yes"],
3938
[ompi_check_mxm_libdir="$with_mxm_libdir"])
4039

41-
AS_IF([test ! -z "$ompi_check_mxm_libdir"], [ompi_check_mxm_extra_libs="-L$ompi_check_mxm_libdir"],[])
42-
4340
OPAL_CHECK_PACKAGE([$1],
4441
[mxm/api/mxm_api.h],
4542
[mxm],
4643
[mxm_cleanup],
47-
[$ompi_check_mxm_extra_libs],
44+
[],
4845
[$ompi_check_mxm_dir],
4946
[$ompi_check_mxm_libdir],
5047
[ompi_check_mxm_happy="yes"],

ompi/mca/coll/fca/coll_fca_api.h

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
/**
2-
Copyright (c) 2011 Mellanox Technologies. All rights reserved.
2+
Copyright (c) 2011 Mellanox Technologies. All rights reserved.
3+
Copyright (c) 2015 Research Organization for Information Science
4+
and Technology (RIST). All rights reserved.
35
$COPYRIGHT$
46
57
Additional copyrights may follow
@@ -9,8 +11,8 @@
911

1012
#include "ompi_config.h"
1113

12-
#include <fca_api.h>
13-
#include <config/fca_parse_specfile.h>
14+
#include <fca/fca_api.h>
15+
#include <fca/config/fca_parse_specfile.h>
1416

1517
#ifndef FCA_API
1618
#define OMPI_FCA_VERSION 12

ompi/mca/coll/hcoll/Makefile.am

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
#
33
#
44
# Copyright (c) 2011 Mellanox Technologies. All rights reserved.
5+
# Copyright (c) 2015 Research Organization for Information Science
6+
# and Technology (RIST). All rights reserved.
57
# $COPYRIGHT$
68
#
79
# Additional copyrights may follow
@@ -10,7 +12,7 @@
1012
#
1113
#
1214

13-
AM_CPPFLAGS = $(coll_hcoll_CPPFLAGS) -DCOLL_HCOLL_HOME=\"$(coll_hcoll_HOME)\" $(coll_hcoll_extra_CPPFLAGS)
15+
AM_CPPFLAGS = $(coll_hcoll_CPPFLAGS)
1416

1517
coll_hcoll_sources = \
1618
coll_hcoll.h \

ompi/mca/coll/hcoll/coll_hcoll.h

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
/**
2-
Copyright (c) 2011 Mellanox Technologies. All rights reserved.
2+
Copyright (c) 2011 Mellanox Technologies. All rights reserved.
3+
Copyright (c) 2015 Research Organization for Information Science
4+
and Technology (RIST). All rights reserved.
35
$COPYRIGHT$
46
57
Additional copyrights may follow
@@ -25,8 +27,8 @@
2527

2628
#include "orte/runtime/orte_globals.h"
2729

28-
#include "hcoll_api.h"
29-
#include "hcoll_constants.h"
30+
#include "hcoll/api/hcoll_api.h"
31+
#include "hcoll/api/hcoll_constants.h"
3032

3133

3234
#include "coll_hcoll_debug.h"

ompi/mca/coll/hcoll/coll_hcoll_dtypes.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
#include "ompi/datatype/ompi_datatype.h"
99
#include "ompi/mca/op/op.h"
10-
#include "hcoll_dte.h"
10+
#include "hcoll/api/hcoll_dte.h"
1111

1212
/*to keep this at hand: Ids of the basic opal_datatypes:
1313
#define OPAL_DATATYPE_INT1 4

ompi/mca/coll/hcoll/coll_hcoll_ops.c

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
/**
2-
Copyright (c) 2011 Mellanox Technologies. All rights reserved.
2+
Copyright (c) 2011 Mellanox Technologies. All rights reserved.
3+
Copyright (c) 2015 Research Organization for Information Science
4+
and Technology (RIST). All rights reserved.
35
$COPYRIGHT$
46
57
Additional copyrights may follow
@@ -10,9 +12,9 @@
1012
#include "ompi_config.h"
1113
#include "ompi/constants.h"
1214
#include "coll_hcoll.h"
13-
#include "hcoll_constants.h"
15+
#include "hcoll/api/hcoll_constants.h"
1416
#include "coll_hcoll_dtypes.h"
15-
#include "hcoll_dte.h"
17+
#include "hcoll/api/hcoll_dte.h"
1618
int mca_coll_hcoll_barrier(struct ompi_communicator_t *comm,
1719
mca_coll_base_module_t *module){
1820
int rc;

ompi/mca/coll/hcoll/coll_hcoll_rte.c

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77
* reserved.
88
* Copyright (c) 2015 Los Alamos National Security, LLC. All rights
99
* reserved.
10+
* Copyright (c) 2015 Research Organization for Information Science
11+
* and Technology (RIST). All rights reserved.
1012
* $COPYRIGHT$
1113
*
1214
* Additional copyrights may follow
@@ -39,9 +41,9 @@
3941
#include "ompi/mca/pml/pml.h"
4042

4143

42-
#include "hcoll_dte.h"
43-
#include "hcoll_api.h"
44-
#include "hcoll_constants.h"
44+
#include "hcoll/api/hcoll_dte.h"
45+
#include "hcoll/api/hcoll_api.h"
46+
#include "hcoll/api/hcoll_constants.h"
4547
/*
4648
* Local functions
4749
*/

ompi/mca/coll/hcoll/configure.m4

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
# -*- shell-script -*-
22
#
33
#
4-
# Copyright (c) 2011 Mellanox Technologies. All rights reserved.
4+
# Copyright (c) 2011 Mellanox Technologies. All rights reserved.
5+
# Copyright (c) 2015 Research Organization for Information Science
6+
# and Technology (RIST). All rights reserved.
57
# $COPYRIGHT$
68
#
79
# Additional copyrights may follow
@@ -23,7 +25,6 @@ AC_DEFUN([MCA_ompi_coll_hcoll_CONFIG],[
2325
AS_IF([test "$coll_hcoll_happy" = "yes"],
2426
[coll_hcoll_WRAPPER_EXTRA_LDFLAGS="$coll_hcoll_LDFLAGS"
2527
coll_hcoll_CPPFLAGS="$coll_hcoll_CPPFLAGS"
26-
coll_hcoll_WRAPPER_EXTRA_CPPFLAGS="$coll_hcoll_CPPFLAGS"
2728
coll_hcoll_WRAPPER_EXTRA_LIBS="$coll_hcoll_LIBS"
2829
$1],
2930
[$2])

0 commit comments

Comments
 (0)