File: opal_setup_ft.m4

package info (click to toggle)
openmpi 5.0.7-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, 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 (143 lines) | stat: -rw-r--r-- 6,106 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
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
dnl
dnl Copyright (c) 2004-2020 The University of Tennessee and The University
dnl                         of Tennessee Research Foundation.  All rights
dnl                         reserved.
dnl Copyright (c) 2009-2012 Oak Ridge National Labs.  All rights reserved.
dnl Copyright (c) 2013-2014 Intel, Inc.  All rights reserved.
dnl Copyright (c) 2015      Research Organization for Information Science
dnl                         and Technology (RIST). All rights reserved.
dnl Copyright (c) 2022      Amazon.com, Inc. or its affiliates.  All Rights reserved.
dnl $COPYRIGHT$
dnl
dnl Additional copyrights may follow
dnl
dnl $HEADER$
dnl

#
# --with-ft=TYPE
#  TYPE:
#    - mpi (synonym for 'ulfm')
#    - LAM (synonym for 'cr' currently)
#    - cr
#  /* General FT sections */
#  #if OPAL_ENABLE_FT == 0 /* FT Disabled globally */
#  #if OPAL_ENABLE_FT == 1 /* FT Enabled globally */
#  /* ULFM Specific sections */
#  #if OPAL_ENABLE_FT_MPI == 0 /* FT ULFM Disabled */
#  #if OPAL_ENABLE_FT_MPI == 1 /* FT ULFM Enabled */
#

# This macro is necessary to get the title to be displayed first.  :-)
AC_DEFUN([OPAL_SETUP_FT_BANNER],[
    opal_show_subtitle "Fault tolerance"
])

AC_DEFUN([OPAL_SETUP_FT_OPTIONS],[
    # define a variable that tells us that these options were enabled
    opal_setup_ft_options="yes"
    AC_ARG_WITH([ft],
                [AS_HELP_STRING([--with-ft=TYPE],
                [Specify the type of fault tolerance to enable. Options: mpi (ULFM), (default: mpi)])],
                [],
                [with_ft=auto]) # If not specified act as if --with-ft=mpi, but make external prte support failure only if hard requested
])

AC_DEFUN([OPAL_SETUP_FT],[
    AC_REQUIRE([OPAL_SETUP_FT_BANNER])
    if test "$opal_setup_ft_options" = "yes"; then
        AC_MSG_CHECKING([if want fault tolerance])
    fi

    if test x"$with_ft" != "xno"; then
        opal_want_ft=1
        opal_want_ft_mpi=0
        opal_want_ft_type=none

        as_save_IFS=$IFS
        IFS=","
        for opt in $with_ft; do
            IFS=$as_save_IFS

            if test "$opt" = "LAM" || test "$opt" = "lam" || test "$opt" = "CR" || test "$opt" = "cr"; then
                AC_MSG_RESULT([Support for C/R FT has been removed in OMPI 5.0])
            fi
            # Default value
            if test "$opt" = "auto"; then
                opal_want_ft_mpi=1
            elif test "$opt" = "yes"; then
                opal_want_ft_mpi=1
            elif test "$opt" = "ULFM"; then
                opal_want_ft_mpi=1
            elif test "$opt" = "ulfm"; then
                opal_want_ft_mpi=1
            elif test "$opt" = "MPI"; then
                opal_want_ft_mpi=1
            elif test "$opt" = "mpi"; then
                opal_want_ft_mpi=1
            else
                AC_MSG_RESULT([Unrecognized FT TYPE: $opt])
                AC_MSG_ERROR([Cannot continue])
            fi
        done
        if test "$opal_want_ft_mpi" = 1; then
            opal_want_ft_type="mpi"
        fi

        # If we use external PRTE, does it support FT?
        AS_IF([test "$internal_prrte_build" = "0" -a "$opal_want_ft_type" != "none"], [
            AS_IF([prte_info | $GREP "Resilience support: yes"], [], [
                AS_IF([test "$with_ft" != auto], [
                    AC_MSG_ERROR([Requested enabling fault-tolerance and using external launcher, but external PRTE doesn't support resilience; you can either use the internal PRTE, recompile the external PRTE with fault-tolerance, or disable fault-tolerance. ABORTING.])
                ], [
                    AC_MSG_WARN([**************************************************])
                    AC_MSG_WARN([*** Requested external PRTE which doesn't have   *])
                    AC_MSG_WARN([*** Resilience compiled-in.                      *])
                    AC_MSG_WARN([*** To enable Open MPI Fault-Tolerance, either   *])
                    AC_MSG_WARN([***   use the internal PRTE, or                  *])
                    AC_MSG_WARN([***   compile the external PRTE with resilience  *])
                    AC_MSG_WARN([*** DISABLING FAULT TOLERANCE SUPPORT.           *])
                    AC_MSG_WARN([**************************************************])
                    opal_want_ft_mpi=0
                    opal_want_ft_type="none"
                ])
            ])
        ])
        AC_MSG_RESULT([Enabled $opal_want_ft_type (Specified $with_ft)])
        AS_IF([test "$opal_want_ft_type" != "none"], [
            AC_MSG_WARN([**************************************************])
            AC_MSG_WARN([*** Fault Tolerance Integration into Open MPI is *])
            AC_MSG_WARN([*** compiled-in, but off by default. Use mpiexec *])
            AC_MSG_WARN([*** and MCA parameters to turn it on.            *])
            AC_MSG_WARN([*** Not all components support fault tolerance.  *])
            AC_MSG_WARN([**************************************************])
        ])
    else
        opal_want_ft=0
        opal_want_ft_mpi=0
        if test "$opal_setup_ft_options" = "yes"; then
            AC_MSG_RESULT([Disabled fault tolerance])
        fi
    fi
    AC_DEFINE_UNQUOTED([OPAL_ENABLE_FT], [$opal_want_ft],
                       [Enable fault tolerance general components and logic])
    AC_DEFINE_UNQUOTED([OPAL_ENABLE_FT_MPI], [$opal_want_ft_mpi],
                       [Enable fault tolerance MPI ULFM components and logic])
    AM_CONDITIONAL(WANT_FT, test "$opal_want_ft" = "1")
    AM_CONDITIONAL(WANT_FT_MPI, test "$opal_want_ft_mpi" = "1")

    if test "$opal_setup_ft_options" = "yes"; then
        AC_MSG_CHECKING([if want checkpoint/restart enabled debugging option])
    fi
    if test "$opal_want_ft" = "0"; then
        if test "$opal_setup_ft_options" = "yes"; then
            AC_MSG_RESULT([Disabled (fault tolerance disabled --without-ft)])
        fi
    else
        if test "$opal_setup_ft_options" = "yes"; then
            AC_MSG_RESULT([Disabled])
        fi
    fi

    OPAL_SUMMARY_ADD([Miscellaneous], [Fault Tolerance support], [], [$opal_want_ft_type])
])