DiffEqBase.jl
DiffEqBase.jl copied to clipboard
Bug with defaults in GMRES
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)
@YingboMa defaults on the default here? I guess it's not set so that it takes in the nlsolver tolerance?