-
Notifications
You must be signed in to change notification settings - Fork 51
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
GMRES Fails Silently From Stagnation #729
Comments
Hi @RaderJason! Did you look at the |
Ah! Indeed these are caught by stats. However, why does this not return an error outright? |
Because it's not an error if GMRES didn't converged. :) You could also use |
Okay, just note that downstream applications are not taking this into account, and are failing silently (how I found this.) The options are somewhat of a mixed bag from what I've gathered. Tolerance isn't applicable in the test I gave above. This fails by a very wide margin. restarts is also not a key option. 70% of the time when restart is 1 dimension less than the dimension of the linear problem the test above fails. ie. you'd need to set restarts >= problem_dim, recovering gmres and not gmres + restarts. I am abusing this algorithm somewhat, as I'm using a dense matrix rather than a sparse one. This does certainly play a role, but the failure rate of gmres + restarts is surprisingly high even in the sparse setting for a small difference between the problem dimension and the Krylov subspace dimension. Note that everything I mentioned (except perhaps disagreeing about whether this should raise an error :) ) is an issue with gmres + restarts as an algorithm and not the implementation here. Feel free to close the issue on this basis. |
Except LinearSolve.jl, do you know other packages that are not taking this into account?
It depends of your linear system but with a dense random matrix, it's not relevant to test the
It's normal because the convergence rate of Krylov methods depends of the eigenvalues / singular values.
I should probably add a comment about the |
GMRES 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 (restart.) ie. roughly 70% of the time GMRES will fail silently on a problem of dimension 25 if restart = 24, and will still fail 70% of the time with a problem of dimension 100 if restart = 99. For a difference in dimension of 5, the test below returns an incorrect value greater than 99% of the time.
Reproducing code:
The text was updated successfully, but these errors were encountered: