[Ipopt] Arithmetic exception in IpOpt

Stefan Vigerske stefan at math.hu-berlin.de
Wed Jan 14 04:08:37 EST 2015


in this case, it looks like an overflow error, generated by the call to 
Ipopt's FilterLSAcceptor::CalculateAlphaMin() has two calls to pow() and 
I suspect it is the one to pow(-gBD,s_phi_), as 2.3 is the default for 
Now, gBD is IpCq().curr_gradBarrTDelta(), which is "inner_product of 
current barrier obj. fn. gradient with current search direction"

Looking at the often cited "implementation paper", I believe we are at 
equation (19) here. The pow() that overflows is the
[-\nabla \phi_{\mu_j}(x_k)^Td_x^k]^{s_\phi} term on the left-hand-side 
of the right formula in (19).
Andreas might know better, whether it is expected that the derivative of 
the Barrier term can take such large values (I think this could happen 
due to the nature of Barrier methods, but I'm not an expert).

If you want to debug this further, I suggest to run Ipopt with a higher 
print_level, so you see which values your functions and gradients are 
taken. At least, you should avoid them to become extremely large.
If the search direction becomes extremely large, that could be another 

Don't know about the Eclipse question.


On 01/11/2015 08:17 PM, Miguel Angel Salazar de Troya wrote:
> Hi
> My code implements a simulation using PETSc. I get some floating-point
> exception so I decided to debug with gdb passing the PETSc flag -fp_trap to
> catch the floating-point exception. However, my code runs into this
> Arithmetic exception instead:
> Program received signal SIGFPE, Arithmetic exception.
> 0x00007ffff6d0ec00 in __exp1 (x=1165.0685902653142,
> xx=-1.7928465380042183e-14, error=4.3699999999999992e-05) at
> ../sysdeps/ieee754/dbl-64/e_exp.c:286
> 286 ../sysdeps/ieee754/dbl-64/e_exp.c: No such file or directory.
> (gdb) backtrace
> #0  0x00007ffff6d0ec00 in __exp1 (x=1165.0685902653142,
> xx=-1.7928465380042183e-14, error=4.3699999999999992e-05) at
> ../sysdeps/ieee754/dbl-64/e_exp.c:286
> #1  0x00007ffff6d13099 in __ieee754_pow_sse2 (x=9.8298691150523227e+219,
> y=2.2999999999999998) at ../sysdeps/ieee754/dbl-64/e_pow.c:112
> #2  0x00007ffff6d249ac in __pow (x=9.8298691150523227e+219,
> y=2.2999999999999998) at w_pow.c:27
> #3  0x00007ffff786c3b2 in Ipopt::FilterLSAcceptor::CalculateAlphaMin() ()
> from /home/miguel/Ipopt-3.11.9/build/lib/libipopt.so.1
> #4  0x00007ffff785f2cd in
> Ipopt::BacktrackingLineSearch::DoBacktrackingLineSearch(bool, double&,
> bool&, bool&, int&, bool&, Ipopt::SmartPtr<Ipopt::IteratesVector>&) ()
>     from /home/miguel/Ipopt-3.11.9/build/lib/libipopt.so.1
> #5  0x00007ffff786115c in
> Ipopt::BacktrackingLineSearch::FindAcceptableTrialPoint() () from
> /home/miguel/Ipopt-3.11.9/build/lib/libipopt.so.1
> #6  0x00007ffff78793b9 in Ipopt::IpoptAlgorithm::Optimize(bool) () from
> /home/miguel/Ipopt-3.11.9/build/lib/libipopt.so.1
> #7  0x00007ffff7808c5b in Ipopt::IpoptApplication::call_optimize() () from
> /home/miguel/Ipopt-3.11.9/build/lib/libipopt.so.1
> #8  0x00007ffff781202f in
> Ipopt::IpoptApplication::OptimizeNLP(Ipopt::SmartPtr<Ipopt::NLP> const&,
> Ipopt::SmartPtr<Ipopt::AlgorithmBuilder>&) () from
> /home/miguel/Ipopt-3.11.9/build/lib/libipopt.so.1
> #9  0x00007ffff7811e6d in
> Ipopt::IpoptApplication::OptimizeNLP(Ipopt::SmartPtr<Ipopt::NLP> const&) ()
> from /home/miguel/Ipopt-3.11.9/build/lib/libipopt.so.1
> #10 0x00007ffff7808421 in
> Ipopt::IpoptApplication::OptimizeTNLP(Ipopt::SmartPtr<Ipopt::TNLP> const&)
> () from /home/miguel/Ipopt-3.11.9/build/lib/libipopt.so.1
> #11 0x0000000000406156 in main (argc=2, argv=0x7fffffffde88) at
> /home/miguel/Dropbox/AdaptiveTopOpt/QuadBeads/mainbeads.C:110
> I had a similar issue within my code and it turned out to be an underflow
> problem. I would like to know if it is something similar in Ipopt.
> On a related note, I'm not able to step into the Ipopt source files while
> debugging. I'm using eclipse and I can't find the way to include the source
> files so eclipse can display them. Does anybody know how?
> Thanks in advance
> Miguel
> _______________________________________________
> Ipopt mailing list
> Ipopt at list.coin-or.org
> http://list.coin-or.org/mailman/listinfo/ipopt

More information about the Ipopt mailing list