[Ipopt] A small bug
Stefan Vigerske
stefan at math.hu-berlin.de
Sat Nov 9 11:48:55 EST 2013
Hi,
I cannot reproduce this issue.
If all variables are fixed, the code should not even get to the place
you show in your stacktrace.
In DefaultIterateInitializer::SetInitialIterates(), the call to
IpData().InitializeDataStructures() just at the beginning (line 194)
should throw an exception, so that it doesn't get to line 278
(iterates->z_L_NonConst()->ElementWiseDivide(*IpCq().trial_slack_x_L())).
The exception is thrown by IpTNLPAdapter.cpp:684,
if (status == SUCCESS) {
jnlst_->Printf(J_WARNING, J_INITIALIZATION,
"All variables are fixed and constraint
violation %e\n is below tolerance %e. Declaring success.\n", max_viol,
tol_);
and catched again in IpIpoptApplication.cpp:1048 (end of
IpoptApplication::call_optimize()).
Can you specify more which Ipopt version you are using and which interface?
Stefan
On 11/08/2013 08:48 AM, darknesswind wrote:
> When I run the solver on a problem with all fixed variables, I found the DenseVector "ip_data_->curr()->z_L()" is uninitialized in function IpoptCalculatedQuantities::trial_slack_x_L.It may cause a crash in release version because of access violation.
>
> The problem is:
> y = x1 * x2
> subject to:
> x1 * x2 = 0
> x1 = 0
> x2 = 0
>
> Here is the call stack: The dense_x->homogeneous_ equal to false but the dense_x->values_ is null.
>
>> ipopt.dll!Ipopt::DenseVector::ElementWiseDivideImpl(const Ipopt::Vector & x) Line 240 C++
> ipopt.dll!Ipopt::Vector::ElementWiseDivide(const Ipopt::Vector & x) Line 602 + 0x13 bytes C++
> ipopt.dll!Ipopt::IpoptCalculatedQuantities::CalculateSafeSlack(Ipopt::SmartPtr<Ipopt::Vector> & slack, const Ipopt::SmartPtr<Ipopt::Vector const > & bound, const Ipopt::SmartPtr<Ipopt::Vector const > & curr_point, const Ipopt::SmartPtr<Ipopt::Vector const > & multiplier) Line 481 C++
> ipopt.dll!Ipopt::IpoptCalculatedQuantities::trial_slack_x_L() Line 365 + 0x5b bytes C++
> ipopt.dll!Ipopt::DefaultIterateInitializer::SetInitialIterates() Line 278 + 0x16 bytes C++
> ipopt.dll!Ipopt::IpoptAlgorithm::InitializeIterates() Line 545 + 0x26 bytes C++
> ipopt.dll!Ipopt::IpoptAlgorithm::Optimize(bool isResto) Line 274 C++
> ipopt.dll!Ipopt::IpoptApplication::call_optimize() Line 860 + 0xd bytes C++
> ipopt.dll!Ipopt::IpoptApplication::OptimizeNLP(const Ipopt::SmartPtr<Ipopt::NLP> & nlp, Ipopt::SmartPtr<Ipopt::AlgorithmBuilder> & alg_builder) Line 754 + 0x8 bytes C++
> ipopt.dll!Ipopt::IpoptApplication::OptimizeNLP(const Ipopt::SmartPtr<Ipopt::NLP> & nlp) Line 717 + 0x17 bytes C++
> ipopt.dll!Ipopt::IpoptApplication::OptimizeTNLP(const Ipopt::SmartPtr<Ipopt::TNLP> & tnlp) Line 696 + 0x16 bytes C++
>
> _______________________________________________
> Ipopt mailing list
> Ipopt at list.coin-or.org
> http://list.coin-or.org/mailman/listinfo/ipopt
>
More information about the Ipopt
mailing list