Skip to content

Conversation

@termi-official
Copy link
Contributor

Checklist

  • Appropriate tests were added
  • Any code changes were done in a way that does not break public API
  • All documentation related to code changes were updated
  • The new code follows the
    contributor guidelines, in particular the SciML Style Guide and
    COLPRAC.
  • Any new documentation only uses public API

Additional context

Add any other context about the problem here.

@termi-official
Copy link
Contributor Author

There is some issue on master (see e.g. https://github.com/SciML/LinearSolve.jl/actions/runs/19331508201/job/55295492581#step:6:341 ) where the Krylov.jl solvers report that the solve failed, but the solution looks fine, which is unrelated to this PR.

@ChrisRackauckas
Copy link
Member

@jClugstor

@jClugstor
Copy link
Member

It only hits that message if the retcode is also being set to Failure, which only happens if the solver stats stats.solved is false. So the message is doing what it's supposed to

stats = @get_cacheval(cache, :KrylovJL_GMRES).stats

@ChrisRackauckas
Copy link
Member

Rebase this.

@termi-official termi-official force-pushed the do/tolerance-update-api branch from 906ec54 to 52f2191 Compare November 14, 2025 09:27
@ChrisRackauckas
Copy link
Member

Looks like tests are failing.

iters = stats.niter, retcode, stats)
end

update_tolerances_internal!(cache, alg::KrylovJL, atol, rtol) = nothing
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this not supported? Since this is the only one people actually use.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All Krylov packages are supported. This was was in particular easy, because you pass the tolerance into the solve call. The relevant lines for the transfer are these

atol = float(cache.abstol)
rtol = float(cache.reltol)

kwargs = (atol = atol, rtol, itmax, verbose = krylovJL_verbose,
ldiv = true, history = true, alg.kwargs...)

Krylov.krylov_solve!(args...; M, kwargs...)

@ChrisRackauckas ChrisRackauckas merged commit b42c02a into SciML:main Nov 17, 2025
133 of 142 checks passed
@termi-official termi-official deleted the do/tolerance-update-api branch November 17, 2025 08:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants