# What does the "maxiters" solver option do?

**URL:** <https://discourse.julialang.org/t/what-does-the-maxiters-solver-option-do/37376>\
**Category:** Modelling & Simulations\
**Tags:** diffeq\
**Created:** [April 11, 2020, 2:29am UTC](https://discourse.julialang.org/t/what-does-the-maxiters-solver-option-do/37376 "2020-04-11T02:29:31Z")\
**Posts on this page:** 1\
**Showing post:** 7

<div class="post-metadata">

**Author:** ![Volker](https://avatars.discourse-cdn.com/v4/letter/v/77aa72/32.png) [@Volker](https://discourse.julialang.org/u/Volker)\
**Post date:** [June 25, 2021, 7:48am UTC](https://discourse.julialang.org/t/what-does-the-maxiters-solver-option-do/37376/7 "2021-06-25T07:48:09Z")

</div>

I also get the warning

```julia
┌ Warning: Interrupted. Larger maxiters is needed.

```

when I use RK4 solver with a fixed step size of 0.01 s.

The code which I used is the nearly the same as in the post

> [@Fitting a dynamic system with an exogenous input (nonhomogenous neural ode) via DiffEqFlux](https://discourse.julialang.org/t/fitting-a-dynamic-system-with-an-exogenous-input-nonhomogenous-neural-ode-via-diffeqflux/44934/24):
>
> I wouldn’t use ReverseDiff or inplace here. Another mistake that you made was that, notice that the solution is a row vector for each output component, so you were broadcasting a row vector against a column vector in the loss function to generate a matrix. That’s not what you wanted. Here’s a code that trains: using DifferentialEquations, Flux, Optim, DiffEqFlux, DiffEqSensitivity, Plots tspan = (0.1f0, Float32(10.0)) tsteps = range(tspan[1], tspan[2], length = 100) t\_vec = collect(tsteps) ex…

This also the code example for exogenous inputs on the documenation page of DiffEqFlux.

The just changed the solver to RK4, a slightly different excitation and updated the code to `GalacticOptim`.

I’m a little bit confused, because I thought, that maxiters would define the maximum iterations of the solver. Therefore, I would expect, that I would need 100 iteration when I simulated from 0.0 s to 1.0 s. Or is it the overall maximum iteration? In other words, for all iterations of optimization.

---

_[View the full topic](https://discourse.julialang.org/t/what-does-the-maxiters-solver-option-do/37376)._
