Skip to content

MINRES: early termination from poor initialization #1036

@timholy

Description

@timholy

This is not sufficiently minimal to use as a test case, but I've seen cases where a poor starting guess can lead to early termination and a result that derails the rest of my computation. The difference between the two solves below is whether we start with the user-supplied guess or at the origin:

julia> sol1, stat1 = minres(Amtrx, collect(b), collect(zθ0); M=Mmtrx, ldiv=false);

julia> sol2, stat2 = minres(Amtrx, collect(b), zero(collect(zθ0)); M=Mmtrx, ldiv=false);

julia> stat1
SimpleStats
 niter: 1
 solved: true
 inconsistent: true
 indefinite: false
 npcCount: 0
 residuals: []
 Aresiduals: []
 κ₂(A): []
 timer: 144.68μs
 status: x is a minimum least-squares solution


julia> stat2
SimpleStats
 niter: 46
 solved: true
 inconsistent: true
 indefinite: false
 npcCount: 0
 residuals: []
 Aresiduals: []
 κ₂(A): []
 timer: 428.50μs
 status: found approximate minimum least-squares solution


julia> dot(sol1, sol2) / (norm(sol1) * norm(sol2))
0.5514977818297163

julia> norm(sol1)
1.2206161359675942e17

julia> norm(sol2)
489.98755083623564

Interestingly, we get a single iteration even if it seems that none of the convergence criteria can be met:

julia> sol1, stat1 = minres(Amtrx, collect(b), collect(zθ0); M=Mmtrx, ldiv=false, atol=0.0, etol=0.0, rtol=0.0); stat1
SimpleStats
 niter: 1
 solved: true
 inconsistent: true
 indefinite: false
 npcCount: 0
 residuals: []
 Aresiduals: []
 κ₂(A): []
 timer: 46.73μs
 status: x is a minimum least-squares solution

I did a little bit of debugging, and the termination arises from

if iter == 1 && β / β₁ 10 * ϵM

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions