Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add more details about the number of Krylov methods #703

Merged
merged 3 commits into from
Feb 15, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 12 additions & 8 deletions paper/paper.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ authors:
affiliations:
- name: GERAD and Department of Mathematics and Industrial Engineering, Polytechnique Montréal, QC, Canada.
index: 1
date: 29 January 2023
date: 15 February 2023
bibliography: paper.bib
header-includes: |
\usepackage{booktabs}
Expand Down Expand Up @@ -59,8 +59,10 @@ Krylov.jl aims to provide a unified interface for the largest collection of Kryl
- \textbf{Krylov processes}: \textsc{Arnoldi}, \textsc{Golub-Kahan}, \textsc{Hermitian Lanczos}, \textsc{Montoison-Orban}, \textsc{Non-Hermitian Lanczos}, \textsc{Saunders-Simon-Yip};
- \textbf{Krylov methods}: \textsc{Bicgstab}, \textsc{Bilq}, \textsc{Bilqr}, \textsc{Cg}, \textsc{Cg-lanczos}, \textsc{Cg-lanczos-shift}, \textsc{Cgls}, \textsc{Cgne}, \textsc{Cgs}, \textsc{Cr}, \textsc{Craig}, \textsc{Craigmr}, \textsc{Crls}, \textsc{Crmr}, \textsc{Diom}, \textsc{Dqgmres}, \textsc{Fgmres}, \textsc{Fom}, \textsc{Gmres}, \textsc{Gpmr}, \textsc{Lnlq}, \textsc{Lslq}, \textsc{Lsmr}, \textsc{Lsqr}, \textsc{Minres}, \textsc{Minres-qlp}, \textsc{Qmr}, \textsc{Symmlq}, \textsc{Tricg}, \textsc{Trilqr}, \textsc{Trimr}, \textsc{Usymlq}, \textsc{Usymqr}.

MATLAB [@MATLAB] and PETSc [@petsc] have nineteen and eighteen distinct Krylov methods, respectively.
Note that we only consider the number of Krylov methods that generate different iterates.
MATLAB [@MATLAB] and PETSc [@petsc] have eleven and eighteen distinct Krylov methods, respectively.
Note that we only consider the number of Krylov methods that generate different iterates without preconditioning.
Variants with preconditioning are not counted except it is a flexible one such as \textsc{Fgmres}.

Some processes and methods are not available elsewhere and are the product of our own research.
References for each process and method are available in the extensive [documentation](https://juliasmoothoptimizers.github.io/Krylov.jl/stable/).

Expand Down Expand Up @@ -185,19 +187,21 @@ b_gpu = CuVector(b_cpu)
# Incomplete Cholesky decomposition LLᴴ ≈ A with zero fill-in
P = ic02(A_gpu, 'O')

# Additional vector required for solving triangular systems
z = similar(CuVector{ComplexF64}, n)

# Solve Py = x
function ldiv_ic0!(y, P, x)
copyto!(y, x)
ldiv!(LowerTriangular(P), y) # Forward substitution with L
ldiv!(LowerTriangular(P)', y) # Backward substitution with Lᴴ
function ldiv_ic0!(P, x, y, z)
ldiv!(z, LowerTriangular(P), x) # Forward substitution with L
ldiv!(y, LowerTriangular(P)', z) # Backward substitution with Lᴴ
return y
end

# Linear operator that model the preconditioner P⁻¹
T = ComplexF64
symmetric = false
hermitian = true
P⁻¹ = LinearOperator(T, m, n, symmetric, hermitian, (y, x) -> ldiv_ic0!(y, P, x))
P⁻¹ = LinearOperator(T, m, n, symmetric, hermitian, (y, x) -> ldiv_ic0!(P, x, y, z))

# Solve a Hermitian positive definite system with an incomplete Cholesky factorization preconditioner
x, stats = cg(A_gpu, b_gpu, M=P⁻¹)
Expand Down