File: configure.m4

package info (click to toggle)
openmpi 5.0.7-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, trixie
  • size: 202,312 kB
  • sloc: ansic: 612,441; makefile: 42,495; sh: 11,230; javascript: 9,244; f90: 7,052; java: 6,404; perl: 5,154; python: 1,856; lex: 740; fortran: 61; cpp: 20; tcl: 12
file content (98 lines) | stat: -rw-r--r-- 4,096 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
# -*- shell-script -*-
#
# Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
#                         University Research and Technology
#                         Corporation.  All rights reserved.
# Copyright (c) 2004-2005 The University of Tennessee and The University
#                         of Tennessee Research Foundation.  All rights
#                         reserved.
# Copyright (c) 2004-2020 High Performance Computing Center Stuttgart,
#                         University of Stuttgart.  All rights reserved.
# Copyright (c) 2004-2006 The Regents of the University of California.
#                         All rights reserved.
# Copyright (c) 2006      QLogic Corp. All rights reserved.
# Copyright (c) 2009      Cisco Systems, Inc.  All rights reserved.
# Copyright (c) 2011-2018 Los Alamos National Security, LLC.
#                         All rights reserved.
# Copyright (c) 2018      Research Organization for Information Science
#                         and Technology (RIST).  All rights reserved.
# Copyright (c) 2019      Triad National Security, LLC. All rights
#                         reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
#
# $HEADER$
#

# OPAL_CHECK_UCX(prefix, [action-if-found], [action-if-not-found])
# --------------------------------------------------------
# check if UCX support can be found.  sets prefix_{CPPFLAGS,
# LDFLAGS, LIBS} as needed and runs action-if-found if there is
# support, otherwise executes action-if-not-found

AC_DEFUN([MCA_opal_btl_uct_CONFIG],[
    AC_CONFIG_FILES([opal/mca/btl/uct/Makefile])

    OMPI_CHECK_UCX([btl_uct],
                   [btl_uct_happy="yes"],
                   [btl_uct_happy="no"])
dnl
dnl check UCT version.  UCT API can change at any given release
dnl so we only allow compiling against ones we know work.
dnl
    AC_ARG_ENABLE([uct-version-check],
       [AS_HELP_STRING([--enable-uct-version-check],
           [enable UCT version check (default: enabled)])])
    AC_MSG_CHECKING([check uct version])
    if test "$enable_uct_version_check" != "no"; then
        AC_MSG_RESULT([yes])
    else
        AC_MSG_RESULT([no])
    fi

    min_allowed_uct_major=1
    min_allowed_uct_minor=9
    if test "$btl_uct_happy" = "yes" && test "$enable_uct_version_check" != "no"; then
        AC_MSG_CHECKING([UCT version compatibility])
        OPAL_VAR_SCOPE_PUSH([CPPFLAGS_save])
        CPPFLAGS_save="$CPPFLAGS"
        CPPFLAGS="$CPPFLAGS $btl_uct_CPPFLAGS"
        AC_PREPROC_IFELSE([AC_LANG_PROGRAM([#include <uct/api/version.h>
                                            #if (UCT_VERNO_MAJOR < $min_allowed_uct_major)
                                            #error "UCT MAJOR VERNO < $min_allowed_uct_major"
                                            #endif
                                            #if (UCT_VERNO_MAJOR == $min_allowed_uct_major) &&\
                                                (UCT_VERNO_MINOR <  $min_allowed_uct_minor)
                                            #error "UCT MINOR VERNO < $min_allowed_uct_minor"
                                            #endif], [])],
                           [AC_MSG_RESULT([UCT version compatible])],
                           [AC_MSG_RESULT([UCT version not compatible - need UCX $min_allowed_uct_major.$min_allowed_uct_minor or newer])
                            btl_uct_happy="no"])
        CPPFLAGS="$CPPFLAGS_save"
        OPAL_VAR_SCOPE_POP
    fi

    if test "$btl_uct_happy" = "yes" ; then
        OPAL_VAR_SCOPE_PUSH([CPPFLAGS_save])

        CPPFLAGS_save="$CPPFLAGS"
        CPPFLAGS="$CPPFLAGS $btl_uct_CPPFLAGS"

        AC_CHECK_DECLS([UCT_PROGRESS_THREAD_SAFE, UCT_CB_FLAG_SYNC], [], [], [[#include <uct/api/uct.h>]])

        CPPFLAGS="$CPPFLAGS_save"
        OPAL_VAR_SCOPE_POP
    fi

    AS_IF([test "$btl_uct_happy" = "yes"],
          [$1
           btl_uct_LIBS="$btl_uct_LIBS -luct"
          ],
          [$2])

    # substitute in the things needed to build ucx
    AC_SUBST([btl_uct_CPPFLAGS])
    AC_SUBST([btl_uct_LDFLAGS])
    AC_SUBST([btl_uct_LIBS])
])dnl