[Ipopt] segmentation fault for unbounded convex QP with mehrotra_algorithm
Joris Gillis
Joris.Gillis at mech.kuleuven.be
Thu Oct 11 19:27:05 EDT 2012
Hello all,
Thanks to Jonathan for helping me out in a private thread.
However, he was not able to reproduce this using the matlab interface.
Further details of my situation: the same fault occurs with ma57, ma27, mumps.
The programs outputs:
This is Ipopt version 3.10.2, running with linear solver ma27.
Number of nonzeros in equality constraint Jacobian...: 0
Number of nonzeros in inequality constraint Jacobian.: 0
Number of nonzeros in Lagrangian Hessian.............: 0
Total number of variables............................: 5
variables with only lower bounds: 0
variables with lower and upper bounds: 5
variables with only upper bounds: 0
Total number of equality constraints.................: 0
Total number of inequality constraints...............: 0
inequality constraints with only lower bounds: 0
inequality constraints with lower and upper bounds: 0
inequality constraints with only upper bounds: 0
iter objective inf_pr inf_du lg(mu) ||d|| lg(rg) alpha_du alpha_pr ls
0 0.0000000e+00 0.00e+00 1.00e+00 0.0 0.00e+00 - 0.00e+00 0.00e+00 0
1 -2.4999996e+00 0.00e+00 3.85e-06 -5.0 1.00e+00 - 9.90e-01 1.00e+00f 1
2 -2.5000000e+00 0.00e+00 3.81e-06 -11.0 3.84e-04 - 9.90e-01 1.00e+00f 1
3 -2.5000000e+00 0.00e+00 3.81e-08 -11.0 1.54e-11 - 9.90e-01 1.00e+00f 1
4 -2.5000000e+00 0.00e+00 3.81e-10 -11.0 3.55e-17 - 9.90e-01 1.00e+00 0
5 -2.5000000e+00 0.00e+00 3.81e-14 -11.0 3.55e-17 - 1.00e+00 1.00e+00T 0
Segmentation fault (core dumped)
Stack trace:
#0 0x00007ffff3852eb2 in std::vector<Ipopt::SmartPtr<Ipopt::Vector>, std::allocator<Ipopt::SmartPtr<Ipopt::Vector> > >::operator[] (this=0xd0, __n=4)
at /usr/include/c++/4.6/bits/stl_vector.h:711
#1 0x00007ffff38525aa in Ipopt::CompoundVector::IsCompNull (this=0x0, i=4)
at ../../../../Ipopt/src/Interfaces/../LinAlg/IpCompoundVector.hpp:79
#2 0x00007ffff385284c in Ipopt::IteratesVector::GetIterateFromComp (this=0x0,
i=4)
at ../../../../Ipopt/src/Interfaces/../Algorithm/IpIteratesVector.hpp:501
#3 0x00007ffff3852798 in Ipopt::IteratesVector::z_L (this=0x0)
at ../../../../Ipopt/src/Interfaces/../Algorithm/IpIteratesVector.hpp:233
#4 0x00007ffff3941482 in Ipopt::PDSearchDirCalculator::ComputeSearchDirection
(this=0x10819f0)
at ../../../../Ipopt/src/Algorithm/IpPDSearchDirCalc.cpp:88
#5 0x00007ffff38d803e in Ipopt::IpoptAlgorithm::ComputeSearchDirection (
this=0x1081a40) at ../../../../Ipopt/src/Algorithm/IpIpoptAlg.cpp:507
#6 0x00007ffff38d7176 in Ipopt::IpoptAlgorithm::Optimize (this=0x1081a40,
isResto=false) at ../../../../Ipopt/src/Algorithm/IpIpoptAlg.cpp:314
#7 0x00007ffff384e438 in Ipopt::IpoptApplication::call_optimize (
this=0xb2ed30)
at ../../../../Ipopt/src/Interfaces/IpIpoptApplication.cpp:816
#8 0x00007ffff384d59a in Ipopt::IpoptApplication::OptimizeNLP (this=0xb2ed30,
nlp=..., alg_builder=...)
at ../../../../Ipopt/src/Interfaces/IpIpoptApplication.cpp:713
---Type <return> to continue, or q <return> to quit---
#9 0x00007ffff384d291 in Ipopt::IpoptApplication::OptimizeNLP (this=0xb2ed30,
nlp=...) at ../../../../Ipopt/src/Interfaces/IpIpoptApplication.cpp:676
#10 0x00007ffff384ce64 in Ipopt::IpoptApplication::OptimizeTNLP (
this=0xb2ed30, tnlp=...)
at ../../../../Ipopt/src/Interfaces/IpIpoptApplication.cpp:655
Any more ideas to debug this?
Thanks in advance,
Joris Gillis
________________________________
From: Jonathan Currie [jonathan.currie at aut.ac.nz]
Sent: Wednesday, October 10, 2012 11:49 PM
To: Joris Gillis; 'ipopt at list.coin-or.org'
Subject: RE: segmentation fault for unbounded convex QP with mehrotra_algorithm
Using the Matlab interface with the option ‘mehrotra_algorithm’ = ‘yes’ gives the following exception:
Exception of type: OPTION_INVALID in file "..\..\..\src\Algorithm\IpAlgBuilder.cpp" at line 724:
Exception message: !mehrotra_algorithm || smuoracle=="probing" evaluated false: If mehrotra_algorithm=yes, mu_oracle must be "probing".
EXIT: Invalid option encountered.
Have you enabled mu_oracle as per the above? If not, and you are not catching the exception, this could be your problem.
Jonathan
From: ipopt-bounces at list.coin-or.org [mailto:ipopt-bounces at list.coin-or.org] On Behalf Of Joris Gillis
Sent: Thursday, 11 October 2012 5:29 a.m.
To: ipopt at list.coin-or.org
Subject: [Ipopt] segmentation fault for unbounded convex QP with mehrotra_algorithm
Dear all,
I’m experiencing a segmentation fault that occurs in PDSearchDirCalculator::ComputeSearchDirection for a problem with the following characteristics:
Sparse convex QP
No constraints
Decision variable bounds that are large but finite
mehrotra_algorithm active
Hessian approximation exact or limited-memory, does not matter.
Since we are using our own python interface (CasADi), it is possible that the error lies in our interface.
So could someone here please reconstruct this problem by more conventional means so I can file a proper ticket?
I’m adding the code of the failing case here for further reference:
======
from casadi import *
N = 5
x = ssym("x",N)
x0 = DMatrix.ones(N,1)
H = DMatrix.eye(N)
A = DMatrix.ones(0,N)
G = mul(H,x0)
obj = 0.5*mul([x.T,H,x])-mul(G.T,x)
f = SXFunction([x],[obj])
g = SXFunction([x],[mul(A,x)])
j = SXFunction([x],[A])
solver = IpoptSolver(f,g,FX(),j)
solver.setOption("mehrotra_algorithm","yes");
solver.init()
solver.input(NLP_LBX).setAll(-1000)
solver.input(NLP_UBX).setAll(1000)
solver.solve()
======
Best regards,
Joris Gillis
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://list.coin-or.org/pipermail/ipopt/attachments/20121011/0f37c567/attachment.html>
More information about the Ipopt
mailing list