DiffEqBase.jl icon indicating copy to clipboard operation
DiffEqBase.jl copied to clipboard

Bug with defaults in GMRES

Open FHell opened this issue 5 years ago • 1 comments

I am getting a bug with GMRES in Rodas4 (which is chosen automatically for some problems if a Jac prototype is specified). Minimal example is here:

f = (dx, x, p, t) -> (dx .= 0)
x0 = zeros(100)
prob = ODEProblem(f, x0, (0.,5.))
solve(prob, Rodas4(linsolve=LinSolveGMRES()))

The problem seems to be here: https://github.com/JuliaDiffEq/DiffEqBase.jl/blob/6966bce0958c7c59bed0d22d5fe0cfe3de236a86/src/linear_nonlinear.jl#L95

where with default values the code tries (and fails) to set reltol, which is <: Real to nothing.

Workaround is initializing the linsolve with a tolerance:

LinSolveGMRES(tol = 1e-6)

FHell avatar Nov 20 '19 10:11 FHell

@YingboMa defaults on the default here? I guess it's not set so that it takes in the nlsolver tolerance?

ChrisRackauckas avatar Nov 20 '19 18:11 ChrisRackauckas