TY - JOUR
T1 - Algorithm 1005
T2 - Fortran subroutines for reverse mode algorithmic differentiation of BLAS matrix operations
AU - Jonasson, Kristjan
AU - Sigurdsson, Sven
AU - Yngvason, Hordur Freyr
AU - Ragnarsson, Petur Orri
AU - Melsted, Pall
N1 - Publisher Copyright:
© 2020 Owner/Author.
PY - 2020/3
Y1 - 2020/3
N2 - A set of Fortran subroutines for reverse mode algorithmic (or automatic) differentiation of the basic linear algebra subprograms (BLAS) is presented. This is preceded by a description of the mathematical tools used to obtain the formulae of these derivatives, with emphasis on special matrices supported by the BLAS: triangular, symmetric, and band. All single and double precision BLAS derivatives have been implemented, together with the Cholesky factorization from Linear Algebra Package (LAPACK). The subroutines are written in Fortran 2003 with a Fortran 77 interface to allow use from C and C++, as well as dynamic languages such as R, Python, Matlab, and Octave. The subroutines are all implemented by calling BLAS, thereby attaining fast runtime. Timing results show derivative runtimes that are about twice those of the corresponding BLAS, in line with theory. The emphasis is on reverse mode because it is more important for the main application that we have in mind, numerical optimization. Two examples are presented, one dealing with the least squares modeling of groundwater, and the other dealing with the maximum likelihood estimation of the parameters of a vector autoregressive time series. The article contains comprehensive tables of formulae for the BLAS derivatives as well as for several non-BLAS matrix operations commonly used in optimization.
AB - A set of Fortran subroutines for reverse mode algorithmic (or automatic) differentiation of the basic linear algebra subprograms (BLAS) is presented. This is preceded by a description of the mathematical tools used to obtain the formulae of these derivatives, with emphasis on special matrices supported by the BLAS: triangular, symmetric, and band. All single and double precision BLAS derivatives have been implemented, together with the Cholesky factorization from Linear Algebra Package (LAPACK). The subroutines are written in Fortran 2003 with a Fortran 77 interface to allow use from C and C++, as well as dynamic languages such as R, Python, Matlab, and Octave. The subroutines are all implemented by calling BLAS, thereby attaining fast runtime. Timing results show derivative runtimes that are about twice those of the corresponding BLAS, in line with theory. The emphasis is on reverse mode because it is more important for the main application that we have in mind, numerical optimization. Two examples are presented, one dealing with the least squares modeling of groundwater, and the other dealing with the maximum likelihood estimation of the parameters of a vector autoregressive time series. The article contains comprehensive tables of formulae for the BLAS derivatives as well as for several non-BLAS matrix operations commonly used in optimization.
KW - AD
KW - algorithmic differentiation
KW - automatic differentiation
KW - matrix operations
KW - Numerical linear algebra
KW - reverse mode
KW - RMAD
UR - http://www.scopus.com/inward/record.url?scp=85084763721&partnerID=8YFLogxK
U2 - 10.1145/3382191
DO - 10.1145/3382191
M3 - Article
AN - SCOPUS:85084763721
SN - 0098-3500
VL - 46
JO - ACM Transactions on Mathematical Software
JF - ACM Transactions on Mathematical Software
IS - 1
M1 - 9
ER -