# How to decipher SciMLBase OptimizationBase OptimizationForwardDiffExt warnings?

**URL:** <https://discourse.julialang.org/t/how-to-decipher-scimlbase-optimizationbase-optimizationforwarddiffext-warnings/115225>\
**Category:** Optimization (Mathematical)\
**Tags:** diffeq, optimization, forwarddiff, differentialequation\
**Created:** [June 5, 2024, 11:30am UTC](https://discourse.julialang.org/t/how-to-decipher-scimlbase-optimizationbase-optimizationforwarddiffext-warnings/115225 "2024-06-05T11:30:09Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![homocomputeris](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/homocomputeris/32/8933_2.png) [@homocomputeris](https://discourse.julialang.org/u/homocomputeris)\
**Post date:** [June 5, 2024, 11:30am UTC](https://discourse.julialang.org/t/how-to-decipher-scimlbase-optimizationbase-optimizationforwarddiffext-warnings/115225/1 "2024-06-05T11:30:09Z")

</div>

When fitting a DE params to data, I get warnings like this one:

```julia
┌ Warning: dt(2.842170943040401e-14) <= eps(t)(218.2272500679591) , and step error estimate = 2.359923922574841. 
Aborting. 
There is either an error in your model specification or the true solution is unstable 
(or the true solution can not be represented in the precision of ForwardDiff.Dual{ForwardDiff.Tag{OptimizationForwardDiffExt.var"#37#55"{SciMLBase.OptimizationFunction{true, ADTypes.AutoForwardDiff{nothing, Nothing}, typeof(Main.pureopt.sir_subject), Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED_NO_TIME), Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing}, OptimizationBase.ReInitCache{Vector{Float64}, Vector{Int64}}}, Float64}, Float64, 7}).
└ @ SciMLBase ~/.julia/packages/SciMLBase/JUp1I/src/integrator_interface.jl:632

┌ Warning: Failed to achieve finite new evaluation point, using alpha=0
└ @ LineSearches ~/.julia/packages/LineSearches/G1LRk/src/hagerzhang.jl:148

```

1. What is the function `dt(x)`? Where does its argument `2.842170943040401e-14` come from?
2. What is the function `eps(t)(y)`? Where does its argument `218.2272500679591` come from?
3. What’s the problem with `dt(x) <= eps(t)(y)`? How is it related to the step error estimate `2.35`?
4. What is the precision of `ForwardDiff.Dual`?
5. Is it fine that `ForwardDiff.Dual` consists mainly of `Nothing`?
6. How can I get an insight into the values that cause this warning?

---

<div class="post-metadata">

**Author:** ![Oscar\_Smith](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/oscar_smith/32/25343_2.png) [@Oscar\_Smith](https://discourse.julialang.org/u/Oscar_Smith)\
**Post date:** [June 5, 2024, 12:45pm UTC](https://discourse.julialang.org/t/how-to-decipher-scimlbase-optimizationbase-optimizationforwarddiffext-warnings/115225/2 "2024-06-05T12:45:28Z")

</div>

I struggled for a bit on trying to make this error message clear so I would love some help on this. what this is saying is at time `t=218.2272500679591`, the simulation’s `dt` (difference between the current time and previous time) has been forced down to `2.842170943040401e-14`, and even with that small a `dt`, the error estimate was greater than 1, which means that the step had too large an error for us to accept the time step even at this miniscule dt.  
This causes a problem since this value of `dt` is less than or equal to `eps(218.2272500679591)`, so if we tried to take steps, those steps would not advance time do to floating point error e.g. `t+dt/2 == t.

Generally this warning happens when the problem you are trying to solve is mathematically unsolvable (e.g. your `u` or `du/dt` go to infinity in finite time), or you have a bug in your implimentation.
