What does the "maxiters" solver option do?

Yes

Not necessarily. If the problem is stiff and you’re using an explicit Runge-Kutta method, yes then it may need to be large. Usually if this is hit, it’s avoiding useless computations because you can have something like a problem where your dt → 1e-14 and then wants to churn away at the problem for centuries, so hitting this limit then tells you you should probably change something about the solver choice or maybe your model might not be stable (i.e. your ODEProblem might not be the one you thought you wrote down). But if you just have a long problem, like a long tspan or something, then yeah there’s nothing wrong with increasing the maxiters: that’s why the option is there.

It’s a warning and not an error because it’s common in parameter optimization that you can hit parameters which just don’t make sense for your model, in which case you can be producing some wild values, so the integrator is exiting. In those cases, you can just throw an infinite loss to the optimizer and it’ll know to avoid that parameter region.

show_trace=true or something like that in the optimizer keyword arguments.

8 Likes