Skip to content

Support keyword argument interface_checks  #980

Open
@ranocha

Description

@ranocha

Describe the bug 🐞

https://github.com/SciML/SciMLBase.jl/pull/561/files documents the keyword argument interface_checks for solve and init. However, DiffEqBase.jl does not support it.

Expected behavior

Setting interface_checks = false works as described in https://github.com/SciML/SciMLBase.jl/pull/561/files

Minimal Reproducible Example 👇
Error & Stacktrace ⚠️

julia> using Pkg; Pkg.status(["OrdinaryDiffEq", "SciMLBase", "DiffEqBase"], mode=PKGMODE_MANIFEST)
Status [...]
  [2b5f629d] DiffEqBase v6.144.1
  [1dea7af3] OrdinaryDiffEq v6.63.0
  [0bca4576] SciMLBase v2.11.3

julia> using StaticArrays, OrdinaryDiffEq

julia> ode = ODEProblem((u, p, t) -> u, SVector(1.0), (0.0, 1.0))
ODEProblem with uType SVector{1, Float64} and tType Float64. In-place: false
timespan: (0.0, 1.0)
u0: 1-element SVector{1, Float64} with indices SOneTo(1):
 1.0

julia> solve(ode; interface_checks = false)
ERROR: Unrecognized keyword arguments found.
The only allowed keyword arguments to `solve` are:
(:dense, :saveat, :save_idxs, :tstops, :tspan, :d_discontinuities, :save_everystep, :save_on, :save_start, :save_end, :initialize_save, :adaptive, :abstol, :reltol, :dt, :dtmax, :dtmin, :force_dtmin, :internalnorm, :controller, :gamma, :beta1, :beta2, :qmax, :qmin, :qsteady_min, :qsteady_max, :qoldinit, :failfactor, :calck, :alias_u0, :maxiters, :callback, :isoutofdomain, :unstable_check, :verbose, :merge_callbacks, :progress, :progress_steps, :progress_name, :progress_message, :progress_id, :timeseries_errors, :dense_errors, :weak_timeseries_errors, :weak_dense_errors, :wrap, :calculate_error, :initializealg, :alg, :save_noise, :delta, :seed, :alg_hints, :kwargshandle, :trajectories, :batch_size, :sensealg, :advance_to_tstop, :stop_at_next_tstop, :u0, :p, :default_set, :second_time, :prob_choice, :alias_jump, :alias_noise, :batch, :nlsolve_kwargs, :odesolve_kwargs, :linsolve_kwargs, :ensemblealg, :show_trace, :trace_level, :store_trace, :termination_condition)

See https://diffeq.sciml.ai/stable/basics/common_solver_opts/ for more details.

Unrecognized keyword arguments: [:interface_checks]



Some of the types have been truncated in the stacktrace for improved reading. To emit complete information
in the stack trace, evaluate `TruncatedStacktraces.VERBOSE[] = true` and re-run the code.

Stacktrace:
 [1] checkkwargs(kwargshandle::Type; kwargs::Base.Pairs{Symbol, Bool, Tuple{Symbol}, NamedTuple{(:interface_checks,), Tuple{Bool}}})
   @ DiffEqBase ~/.julia/packages/DiffEqBase/GwVWD/src/solve.jl:1090
 [2] solve_call(::ODEProblem{SVector{1, Float64}, Tuple{Float64, Float64}, false, SciMLBase.NullParameters, ODEFunction{false, SciMLBase.AutoSpecialize, var"#3#4", LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing, SymbolicIndexingInterface.SymbolCache{Nothing, Nothing, Nothing}}, Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}}, SciMLBase.StandardODEProblem}; merge_callbacks::Bool, kwargshandle::Nothing, kwargs::Base.Pairs{Symbol, Bool, Tuple{Symbol}, NamedTuple{(:interface_checks,), Tuple{Bool}}})
   @ DiffEqBase ~/.julia/packages/DiffEqBase/GwVWD/src/solve.jl:584
 [3] solve_up(::ODEProblem{SVector{1, Float64}, Tuple{Float64, Float64}, false, SciMLBase.NullParameters, ODEFunction{false, SciMLBase.AutoSpecialize, var"#3#4", LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing, SymbolicIndexingInterface.SymbolCache{Nothing, Nothing, Nothing}}, Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}}, SciMLBase.StandardODEProblem}, ::Nothing, ::SVector{1, Float64}, ::SciMLBase.NullParameters; kwargs::Base.Pairs{Symbol, Bool, Tuple{Symbol}, NamedTuple{(:interface_checks,), Tuple{Bool}}})
   @ DiffEqBase ~/.julia/packages/DiffEqBase/GwVWD/src/solve.jl:1047
 [4] solve(::ODEProblem{SVector{1, Float64}, Tuple{Float64, Float64}, false, SciMLBase.NullParameters, ODEFunction{false, SciMLBase.AutoSpecialize, var"#3#4", LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing, SymbolicIndexingInterface.SymbolCache{Nothing, Nothing, Nothing}}, Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}}, SciMLBase.StandardODEProblem}; sensealg::Nothing, u0::Nothing, p::Nothing, wrap::Val{true}, kwargs::Base.Pairs{Symbol, Bool, Tuple{Symbol}, NamedTuple{(:interface_checks,), Tuple{Bool}}})
   @ DiffEqBase ~/.julia/packages/DiffEqBase/GwVWD/src/solve.jl:978
 [5] top-level scope
   @ REPL[13]:1

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions