Skip to content

Commit 99aa09b

Browse files
committed
Import ULFM Fault Tolerance
The historical repositories contain the full history and attribution and are available from https://bitbucket.org/icldistcomp/ulfm2/src/ulfm/ and prior https://github.com/ICLDisco/ulfm-legacy Squashed commit of the following: commit 618d5653442bde65bff97ac93f8c26eaeec3cfba Merge: c4bb8155 8a2127b Author: Aurelien Bouteiller <[email protected]> Date: Fri Aug 7 17:35:13 2020 -0400 Merge branch 'master' into export/ulfm-to-ompi5-expanded ... commit 69ab6b8 Author: Aurélien Bouteiller <[email protected]> Date: Thu Feb 18 20:03:12 2016 -0500 Importing ULFM ompi layer: snapshot of WIP Missing BTL and COLL imports. Almost compiles w/o --with-ft Signed-off-by: Aurelien Bouteiller <[email protected]> Signed-off-by: George Bosilca <[email protected]> Signed-off-by: Josh Hursey <[email protected]> Signed-off-by: Thomas Herault <[email protected]> Signed-off-by: Wesley Bland <[email protected]> Signed-off-by: Nuria Losada <[email protected]> Signed-off-by: Nathan T. Weeks <[email protected]>
1 parent a44914c commit 99aa09b

File tree

189 files changed

+11412
-175
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

189 files changed

+11412
-175
lines changed

README.FT.ULFM.md

Lines changed: 478 additions & 0 deletions
Large diffs are not rendered by default.

config/opal_setup_ft.m4

Lines changed: 43 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11
dnl
2+
dnl Copyright (c) 2004-2018 The University of Tennessee and The University
3+
dnl of Tennessee Research Foundation. All rights
4+
dnl reserved.
5+
dnl Copyright (c) 2009-2012 Oak Ridge National Labs. All rights reserved.
26
dnl Copyright (c) 2013-2014 Intel, Inc. All rights reserved.
37
dnl Copyright (c) 2015 Research Organization for Information Science
48
dnl and Technology (RIST). All rights reserved.
@@ -12,11 +16,15 @@ dnl
1216
#
1317
# --with-ft=TYPE
1418
# TYPE:
19+
# - mpi (synonym for 'ulfm')
1520
# - LAM (synonym for 'cr' currently)
1621
# - cr
1722
# /* General FT sections */
1823
# #if OPAL_ENABLE_FT == 0 /* FT Disabled globaly */
1924
# #if OPAL_ENABLE_FT == 1 /* FT Enabled globaly */
25+
# /* ULFM Specific sections */
26+
# #if OPAL_ENABLE_FT_MPI == 0 /* FT ULFM Disabled */
27+
# #if OPAL_ENABLE_FT_MPI == 1 /* FT ULFM Enabled */
2028
# /* CR Specific sections */
2129
# #if OPAL_ENABLE_FT_CR == 0 /* FT Ckpt/Restart Disabled */
2230
# #if OPAL_ENABLE_FT_CR == 1 /* FT Ckpt/Restart Enabled */
@@ -33,9 +41,9 @@ AC_DEFUN([OPAL_SETUP_FT_OPTIONS],[
3341
opal_setup_ft_options="yes"
3442
AC_ARG_WITH(ft,
3543
[AC_HELP_STRING([--with-ft=TYPE],
36-
[Specify the type of fault tolerance to enable. Options: LAM (LAM/MPI-like), cr (Checkpoint/Restart), (default: disabled)])],
37-
[opal_want_ft=1],
38-
[opal_want_ft=0])
44+
[Specify the type of fault tolerance to enable. Options: mpi (ULFM), LAM (LAM/MPI-like), cr (Checkpoint/Restart) (default: mpi)])],
45+
[],
46+
[with_ft=mpi]) # If not specified act as if --with-ft=mpi
3947
4048
#
4149
# Checkpoint/restart enabled debugging
@@ -63,9 +71,11 @@ AC_DEFUN([OPAL_SETUP_FT],[
6371
if test "$opal_setup_ft_options" = "yes"; then
6472
AC_MSG_CHECKING([if want fault tolerance])
6573
fi
66-
if test "x$with_ft" != "x" || test "$opal_want_ft" = "1"; then
74+
75+
if test x"$with_ft" != "xno"; then
6776
opal_want_ft=1
6877
opal_want_ft_cr=0
78+
opal_want_ft_mpi=0
6979
opal_want_ft_type=none
7080
7181
as_save_IFS=$IFS
@@ -74,8 +84,16 @@ AC_DEFUN([OPAL_SETUP_FT],[
7484
IFS=$as_save_IFS
7585
7686
# Default value
77-
if test "$opt" = "" || test "$opt" = "yes"; then
78-
opal_want_ft_cr=1
87+
if test "$opt" = "yes"; then
88+
opal_want_ft_mpi=1
89+
elif test "$opt" = "ULFM"; then
90+
opal_want_ft_mpi=1
91+
elif test "$opt" = "ulfm"; then
92+
opal_want_ft_mpi=1
93+
elif test "$opt" = "MPI"; then
94+
opal_want_ft_mpi=1
95+
elif test "$opt" = "mpi"; then
96+
opal_want_ft_mpi=1
7997
elif test "$opt" = "LAM"; then
8098
opal_want_ft_cr=1
8199
elif test "$opt" = "lam"; then
@@ -89,7 +107,9 @@ AC_DEFUN([OPAL_SETUP_FT],[
89107
AC_MSG_ERROR([Cannot continue])
90108
fi
91109
done
92-
if test "$opal_want_ft_cr" = 1; then
110+
if test "$opal_want_ft_mpi" = 1; then
111+
opal_want_ft_type="mpi"
112+
elif test "$opal_want_ft_cr" = 1; then
93113
opal_want_ft_type="cr"
94114
fi
95115
@@ -101,18 +121,33 @@ AC_DEFUN([OPAL_SETUP_FT],[
101121
AC_MSG_WARN([**************************************************])
102122
else
103123
opal_want_ft=0
124+
opal_want_ft_mpi=0
104125
opal_want_ft_cr=0
105126
if test "$opal_setup_ft_options" = "yes"; then
106127
AC_MSG_RESULT([Disabled fault tolerance])
107128
fi
108129
fi
109130
AC_DEFINE_UNQUOTED([OPAL_ENABLE_FT], [$opal_want_ft],
110131
[Enable fault tolerance general components and logic])
132+
AC_DEFINE_UNQUOTED([OPAL_ENABLE_FT_MPI], [$opal_want_ft_mpi],
133+
[Enable fault tolerance MPI ULFM components and logic])
111134
AC_DEFINE_UNQUOTED([OPAL_ENABLE_FT_CR], [$opal_want_ft_cr],
112135
[Enable fault tolerance checkpoint/restart components and logic])
113136
AM_CONDITIONAL(WANT_FT, test "$opal_want_ft" = "1")
137+
AM_CONDITIONAL(WANT_FT_MPI, test "$opal_want_ft_mpi" = "1")
114138
AM_CONDITIONAL(WANT_FT_CR, test "$opal_want_ft_cr" = "1")
115139
140+
if test "$opal_want_ft_mpi" = "1"; then
141+
AC_MSG_CHECKING([loading UFLM FT MPI platform file additions])
142+
if test -r "${srcdir}/contrib/platform/ft_mpi_ulfm" ; then
143+
. ${srcdir}/contrib/platform/ft_mpi_ulfm
144+
AC_MSG_RESULT([Loaded contrib/platform/ft_mpi_ulfm])
145+
enable_mca_no_build="$enable_mca_no_build_ft,$enable_mca_no_build"
146+
else
147+
AC_MSG_RESULT([Not found])
148+
fi
149+
fi
150+
116151
if test "$opal_setup_ft_options" = "yes"; then
117152
AC_MSG_CHECKING([if want checkpoint/restart enabled debugging option])
118153
fi
@@ -175,4 +210,5 @@ AC_DEFUN([OPAL_SETUP_FT],[
175210
AC_DEFINE_UNQUOTED([OPAL_ENABLE_FT_THREAD], [$opal_want_ft_thread],
176211
[Enable fault tolerance thread in Open PAL])
177212
AM_CONDITIONAL(WANT_FT_THREAD, test "$opal_want_ft_thread" = "1")
213+
OPAL_SUMMARY_ADD([[Miscellaneous]],[[Fault Tolerance support]],[unnecessary], [$with_ft (disabling components: {${enable_mca_no_build_ft//,/ }})])
178214
])

configure.ac

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1087,7 +1087,7 @@ AC_CACHE_SAVE
10871087
# visible again
10881088
#
10891089
###########################################################
1090-
dnl OPAL_SETUP_FT_OPTIONS
1090+
OPAL_SETUP_FT_OPTIONS
10911091
###########################################################
10921092
# The following line is always required as it contains the
10931093
# AC_DEFINE and AM_CONDITIONAL calls that set variables used

contrib/Makefile.am

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,10 @@
2727
amca_paramdir = $(AMCA_PARAM_SETS_DIR)
2828
dist_amca_param_DATA = amca-param-sets/example.conf
2929

30+
if WANT_FT_MPI
31+
dist_amca_param_DATA += amca-param-sets/ft-mpi
32+
endif # WANT_FT_MPI
33+
3034
if WANT_FT_CR
3135
dist_amca_param_DATA += \
3236
amca-param-sets/ft-enable-cr \

contrib/amca-param-sets/ft-mpi

Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
#
2+
# Copyright (c) 2020 The University of Tennessee and The University
3+
# of Tennessee Research Foundation. All rights
4+
# reserved.
5+
# $COPYRIGHT$
6+
#
7+
# Additional copyrights may follow
8+
#
9+
# $HEADER$
10+
#
11+
# An Aggregate MCA Parameter Set to setup an environment that can support
12+
# User-Level Failure Mitigation (ULFM) fault tolerance (must also be
13+
# compiled in with --with-ft=mpi).
14+
#
15+
# Usage:
16+
# shell$ mpirun --tune ft-mpi ./app
17+
#
18+
19+
mpi_ft_enable=true
20+
21+
#
22+
# Performance tuning parameters (default shown)
23+
#mpi_ft_detector=true
24+
#mpi_ft_detector_thread=false
25+
#mpi_ft_detector_rdma_heartbeat=false
26+
#mpi_ft_detector_period=3.
27+
#mpi_ft_detector_timeout=10.
28+
#
29+
30+
31+
#
32+
# Select only ULFM ready components
33+
# disabling non-tested and known broken components in FT-MPI builds
34+
#
35+
36+
#
37+
# The following frameworks/components are TESTED
38+
# They handle faults amd should be prefered when running with FT.
39+
# pml ob1
40+
# btl tcp, self, sm(+xpmem,+cma), ugni, uct
41+
# coll base/basic, tuned, ftagree, libnbc
42+
pml=ob1
43+
threads=pthreads
44+
45+
#
46+
# The following frameworks/components are UNTESTED, but **may** work.
47+
# They should run without faults, and **may** work with faults.
48+
# You may try and report if successfull.
49+
# btl ofi, portals4, smcuda, usnic, sm(+knem)
50+
# coll inter, sm, sync, cuda, monitoring
51+
# pml monitoring, v/vprotocol
52+
# We will disable only the components for which good components are known to exist.
53+
btl=^usnic
54+
# older versions of xpmem generate bus errors when the other end is dead.
55+
#btl_sm_single_copy_mechanism=cma
56+
57+
58+
#
59+
# The following frameworks/components are UNTESTED, and probably won't work.
60+
# They should run without faults, and will probably crash/deadlock after a fault.
61+
# You may try at your own risk.
62+
# coll hcoll, portals4
63+
# topo (all)
64+
# osc (all)
65+
# io (all)
66+
# fcoll (all)
67+
# fbtl (all)
68+
# We will disable only the components for which good components are known to exist.
69+
# Other untested components are selectable but will issue a runtime warning at
70+
# initiation if FT is enabled.
71+
coll=^hcoll,portals4
72+
73+
#
74+
# The following frameworks/components are NOT WORKING. Do not enable these with FT.
75+
# They should run without faults, but will completely bypass FT capabilities.
76+
# mtl (all)
77+
# pml cm, crcpw, ucx
78+
mtl=^ofi,portals4,psm2
79+
# allready enforced by pml=ob1 above
80+
#pml=^cm,crcpw,ucx
81+
# allready enforced by threads=pthreads above
82+
#threads=^argobots,qthreads
83+

contrib/platform/ft_mpi_ulfm

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# configure time selection of components.
2+
3+
# we have small modifications to libevent, better use the internal one.
4+
with_libevent=internal
5+
# at the moment using any PMIx4 should work.
6+
#with_pmix=internal
7+
8+
# older versions of xpmem generate bus errors when the other end is dead.
9+
#with_cray_xpmem=no
10+
11+
# These components are runtime-disabled when using
12+
# `mpirun --tune ft-mpi`
13+
# You may also want to disable compilation alltogether.
14+
#enable_mca_no_build_ft=\
15+
#mtl,pml-cm,pml-crcpw,pml-yalla,pml-ucx,\
16+
#coll-cuda,coll-fca,coll-hcoll,coll-portals4,\
17+
#btl-usnic,btl-portals4,btl-scif,btl-smcuda,\
18+
#pml-monitoring,pml-v,vprotocol,crcp\
19+

ompi/attribute/attribute_predefined.c

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
33
* University Research and Technology
44
* Corporation. All rights reserved.
5-
* Copyright (c) 2004-2005 The University of Tennessee and The University
5+
* Copyright (c) 2004-2019 The University of Tennessee and The University
66
* of Tennessee Research Foundation. All rights
77
* reserved.
88
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
@@ -52,6 +52,9 @@
5252
*
5353
* MPI_WTIME_IS_GLOBAL is set to 0 (a conservative answer).
5454
*
55+
* MPI_FT is set to 0 or 1 (according to OPAL_ENABLE_FT_MPI and
56+
* ompi_ftmpi_enabled)
57+
*
5558
* MPI_APPNUM is set as the result of a GPR subscription.
5659
*
5760
* MPI_LASTUSEDCODE is set to an initial value and is reset every time
@@ -123,7 +126,11 @@ int ompi_attr_create_predefined(void)
123126
OMPI_SUCCESS != (ret = create_win(MPI_WIN_SIZE)) ||
124127
OMPI_SUCCESS != (ret = create_win(MPI_WIN_DISP_UNIT)) ||
125128
OMPI_SUCCESS != (ret = create_win(MPI_WIN_CREATE_FLAVOR)) ||
126-
OMPI_SUCCESS != (ret = create_win(MPI_WIN_MODEL))) {
129+
OMPI_SUCCESS != (ret = create_win(MPI_WIN_MODEL)) ||
130+
#if OPAL_ENABLE_FT_MPI
131+
OMPI_SUCCESS != (ret = create_comm(MPI_FT, true)) ||
132+
#endif /* OPAL_ENABLE_FT_MPI */
133+
0) {
127134
return ret;
128135
}
129136

@@ -133,6 +140,12 @@ int ompi_attr_create_predefined(void)
133140
OMPI_SUCCESS != (ret = set_f(MPI_HOST, MPI_PROC_NULL)) ||
134141
OMPI_SUCCESS != (ret = set_f(MPI_IO, MPI_ANY_SOURCE)) ||
135142
OMPI_SUCCESS != (ret = set_f(MPI_WTIME_IS_GLOBAL, 0)) ||
143+
#if OPAL_ENABLE_FT_MPI
144+
/* Although we always define the key to ease fortran integration,
145+
* lets not set a default value to the attribute if we do not
146+
* have fault tolerance built in. */
147+
OMPI_SUCCESS != (ret = set_f(MPI_FT, ompi_ftmpi_enabled)) ||
148+
#endif /* OPAL_ENABLE_FT_MPI */
136149
OMPI_SUCCESS != (ret = set_f(MPI_LASTUSEDCODE,
137150
ompi_mpi_errcode_lastused))) {
138151
return ret;
@@ -161,6 +174,9 @@ int ompi_attr_free_predefined(void)
161174
OMPI_SUCCESS != (ret = free_comm(MPI_APPNUM)) ||
162175
OMPI_SUCCESS != (ret = free_comm(MPI_LASTUSEDCODE)) ||
163176
OMPI_SUCCESS != (ret = free_comm(MPI_UNIVERSE_SIZE)) ||
177+
#if OPAL_ENABLE_FT_MPI
178+
OMPI_SUCCESS != (ret = free_comm(MPI_FT)) ||
179+
#endif /* OPAL_ENABLE_FT_MPI */
164180
OMPI_SUCCESS != (ret = free_win(MPI_WIN_BASE)) ||
165181
OMPI_SUCCESS != (ret = free_win(MPI_WIN_SIZE)) ||
166182
OMPI_SUCCESS != (ret = free_win(MPI_WIN_DISP_UNIT)) ||

ompi/communicator/Makefile.am

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
44
# University Research and Technology
55
# Corporation. All rights reserved.
6-
# Copyright (c) 2004-2005 The University of Tennessee and The University
6+
# Copyright (c) 2004-2020 The University of Tennessee and The University
77
# of Tennessee Research Foundation. All rights
88
# reserved.
99
# Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
@@ -34,3 +34,8 @@ lib@OMPI_LIBMPI_NAME@_la_SOURCES += \
3434
communicator/comm_cid.c \
3535
communicator/comm_request.c
3636

37+
if WANT_FT_MPI
38+
lib@OMPI_LIBMPI_NAME@_la_SOURCES += \
39+
communicator/ft/comm_ft.c communicator/ft/comm_ft_reliable_bcast.c communicator/ft/comm_ft_propagator.c communicator/ft/comm_ft_detector.c communicator/ft/comm_ft_revoke.c
40+
endif # WANT_FT_MPI
41+

0 commit comments

Comments
 (0)