Closed packquickly closed 11 months ago
It sounds like these are upstream issues?
Not entirely.
Actually, on further inspection Krylovkit.jl
catches this as well (albeit does not raise an error, grr) and this information seems lost in the call to LinearSolve.jl
This was fixed back in https://github.com/SciML/LinearSolve.jl/pull/334
Every implemented GMRES algorithm often fails to converge when restart is less than the problem dimension, but will return without indicating failure.
This failure (likely due to stagnation) seems to depend on the absolute difference between the problem dimension and the Krylov subspace dimension (
gmres_restart
.) The rate of failure is slightly different for each algorithm, but the lowest failure rate resulting from a 1-dimensional difference in the example case I provided is 30%, ie.problem_dim = 100
andgmres_restart = 99
will silently fail and return an incorrect solution ~30% of the time. As willproblem_dim=25
andgmres_restart=24
. If the difference is 5 dimensions, that failure rate is 90% for KrylovKit, and >99% for the other two algorithms.See the issues raised here for reproducing code: https://github.com/JuliaLinearAlgebra/IterativeSolvers.jl/issues/338 https://github.com/Jutho/KrylovKit.jl/issues/70 https://github.com/JuliaSmoothOptimizers/Krylov.jl/issues/729