libkrylov, a Modular Open-Source Software Library for Extremely Large On-the-Fly Matrix Computations

05 December 2022, Version 2
This content is a preprint and has not undergone peer review at the time of posting.


We present the design and implementation of libkrylov, an open-source library for solving matrix-free eigenvalue, linear, and shifted linear equations using Krylov subspace methods. The primary objectives of libkrylov are flexible API design and modular structure, which enables integration with specialized matrix--vector evaluation “engines”. Libkrylov features pluggable preconditioning, orthonormalization, and tunable convergence control. Diagonal (conjugate gradient, CG), Davidson, and Jacobi--Davidson preconditioners are available, along with orthonormal and nonorthonormal (nKs) schemes. All functionality of libkrylov is exposed via Fortran and C application programming interfaces (APIs). We illustrate the performance of libkrylov for eigenvalue calculations arising in time-dependent density functional theory (TDDFT) in the Tamm--Dancoff approximation (TDA) and discuss the convergence behavior as a function of preconditioning and orthonormalization methods.


Krylov space methods
Iterative algorithms
Open-source software

Supplementary materials

Supplementary Material
The supplementary material contains the structures of all molecules used in this work.

Supplementary weblinks


Comments are not moderated before they are posted, but they can be removed by the site moderators if they are found to be in contravention of our Commenting Policy [opens in a new tab] - please read this policy before you post. Comments should be used for scholarly discussion of the content in question. You can find more information about how to use the commenting feature here [opens in a new tab] .
This site is protected by reCAPTCHA and the Google Privacy Policy [opens in a new tab] and Terms of Service [opens in a new tab] apply.