Consistent treatment of incompletely converged iterative linear solvers in reverse-mode algorithmic differentiation
- PDF / 1,415,726 Bytes
- 20 Pages / 439.37 x 666.142 pts Page_size
- 46 Downloads / 197 Views
Consistent treatment of incompletely converged iterative linear solvers in reverse‑mode algorithmic differentiation Siamak Akbarzadeh1 · Jan Hückelheim1 · Jens‑Dominik Müller1 Received: 29 July 2019 © The Author(s) 2020
Abstract Algorithmic differentiation (AD) is a widely-used approach to compute derivatives of numerical models. Many numerical models include an iterative process to solve non-linear systems of equations. To improve efficiency and numerical stability, AD is typically not applied to the linear solvers. Instead, the differentiated linear solver call is replaced with hand-produced derivative code that exploits the linearity of the original call. In practice, the iterative linear solvers are often stopped prematurely to recompute the linearisation of the non-linear outer loop. We show that in the reverse-mode of AD, the derivatives obtained with partial convergence become inconsistent with the original and the tangent-linear models, resulting in inaccurate adjoints. We present a correction term that restores consistency between adjoint and tangent-linear gradients if linear systems are only partially converged. We prove the consistency of this correction term and show in numerical experiments that the accuracy of adjoint gradients of an incompressible flow solver applied to an industrial test case is restored when the correction term is used. Keywords Algorithmic differentiation · Reverse-mode · Iterative linear solvers · Differentiated solver replacement
1 Introduction The computation of gradients is required for numerous applications, such as shape and topology optimisation, error estimation, goal-based mesh adaptation and uncertainty quantification. Algorithmic differentiation (AD) to automatically produce accurate derivatives for numerical codes [13, 23] is a commonly used
* Jens‑Dominik Müller [email protected] Siamak Akbarzadeh [email protected] 1
Queen Mary University of London (SEMS), London, UK
13
Vol.:(0123456789)
S. Akbarzadeh et al.
technique [3, 5, 8, 16, 32]. In typical numerical models this involves the solution of large linear systems of the form
𝐀x = b which often represents the most expensive part of a computation. We assume here that 𝐀 ∈ ℝn×n is a known non-singular matrix and x, b ∈ ℝn are the unknown and right hand side (RHS) vectors respectively. Historically, linear solver methods have been categorised into two main groups, namely, direct solvers and iterative solvers, even though this classification has become increasingly blurred by developments that combine solvers from either category. Direct solvers are typically robust and widely used in scientific computing packages, but scale poorly with the problem size. Because of this, applications that require the solution to large linear systems such as CFD flow solvers often use efficient iterative linear solvers [29], commonly used methods include CG, BiCG, GMRES, and algebraic or geometric multi-grid methods. When AD is applied to an algorithm that uses a linear solver, the linear solver itself
Data Loading...