[Ipopt] Help for a problem in IpCompoundVector.hpp:90
Stefan Vigerske
svigerske at gams.com
Sun Sep 13 07:39:03 EDT 2020
Hi,
the address 0xd0 doesn't look right. Normally, memory addresses are
larger, so this looks more like an offset on a NULL-pointer. Thus, the
std::vector in Ipopt::CompoundVector which operator[] is called here
(comps_ or const_comps_), has it actually been initialized? Or is the
CompoundVector itself NULL?
You could configure Ipopt with --with-ipopt-checklevel=1 to enable more
asserts (not sure why that isn't the default, actually).
valgrind with --num-callers=30 should give a better idea whether Ipopt
is in restoration mode (where Ipopt calls itself) or not. Not sure, this
information would be useful, though.
Stefan
On 9/12/20 4:32 AM, Wendel Melo wrote:
> Hello experts
>
> I have used the C API of Ipopt 3.13.2 in my work with success. However,
> today, I got a segmentation fault error while I was solving a linear
> optimization problem with Ipopt. I have checked with Valgring and got the
> following:
>
>
> ==13696== Invalid read of size 8
> ==13696== at 0x470FA0: std::vector<Ipopt::SmartPtr<Ipopt::Vector>,
> std::allocator<Ipopt::SmartPtr<Ipopt::Vector> > >::operator[](unsigned
> long) const (stl_vector.h:816)
> ==13696== by 0x47124A: Ipopt::CompoundVector::IsCompNull(int) const
> (IpCompoundVector.hpp:90)
> ==13696== by 0x47159B: Ipopt::IteratesVector::GetIterateFromComp(int)
> const (IpIteratesVector.hpp:637)
> ==13696== by 0xBBAAFC9: Ipopt::IteratesVector::z_L() const
> (IpIteratesVector.hpp:276)
> ==13696== by 0xBD0F5B4:
> Ipopt::PDSearchDirCalculator::ComputeSearchDirection()
> (IpPDSearchDirCalc.cpp:90)
> ==13696== by 0xBC737DD: Ipopt::IpoptAlgorithm::ComputeSearchDirection()
> (IpIpoptAlg.cpp:543)
> ==13696== by 0xBC7057B: Ipopt::IpoptAlgorithm::Optimize(bool)
> (IpIpoptAlg.cpp:325)
> ==13696== by 0xBD40FE5:
> Ipopt::MinC_1NrmRestorationPhase::PerformRestoration()
> (IpRestoMinC_1Nrm.cpp:164)
> ==13696== by 0xBC3DB8D:
> Ipopt::BacktrackingLineSearch::FindAcceptableTrialPoint()
> (IpBacktrackingLineSearch.cpp:599)
> ==13696== by 0xBC73D36:
> Ipopt::IpoptAlgorithm::ComputeAcceptableTrialPoint() (IpIpoptAlg.cpp:568)
> ==13696== by 0xBC70909: Ipopt::IpoptAlgorithm::Optimize(bool)
> (IpIpoptAlg.cpp:350)
> ==13696== by 0xBBA1E05: Ipopt::IpoptApplication::call_optimize()
> (IpIpoptApplication.cpp:922)
> ==13696== Address 0xd0 is not stack'd, malloc'd or (recently) free'd
> ==13696==
>
> ==13696== Process terminating with default action of signal 11 (SIGSEGV)
> ==13696== Access not within mapped region at address 0xD0
> ==13696== at 0x470FA0: std::vector<Ipopt::SmartPtr<Ipopt::Vector>,
> std::allocator<Ipopt::SmartPtr<Ipopt::Vector> > >::operator[](unsigned
> long) const (stl_vector.h:816)
> ==13696== by 0x47124A: Ipopt::CompoundVector::IsCompNull(int) const
> (IpCompoundVector.hpp:90)
> ==13696== by 0x47159B: Ipopt::IteratesVector::GetIterateFromComp(int)
> const (IpIteratesVector.hpp:637)
> ==13696== by 0xBBAAFC9: Ipopt::IteratesVector::z_L() const
> (IpIteratesVector.hpp:276)
> ==13696== by 0xBD0F5B4:
> Ipopt::PDSearchDirCalculator::ComputeSearchDirection()
> (IpPDSearchDirCalc.cpp:90)
> ==13696== by 0xBC737DD: Ipopt::IpoptAlgorithm::ComputeSearchDirection()
> (IpIpoptAlg.cpp:543)
> ==13696== by 0xBC7057B: Ipopt::IpoptAlgorithm::Optimize(bool)
> (IpIpoptAlg.cpp:325)
> ==13696== by 0xBD40FE5:
> Ipopt::MinC_1NrmRestorationPhase::PerformRestoration()
> (IpRestoMinC_1Nrm.cpp:164)
> ==13696== by 0xBC3DB8D:
> Ipopt::BacktrackingLineSearch::FindAcceptableTrialPoint()
> (IpBacktrackingLineSearch.cpp:599)
> ==13696== by 0xBC73D36:
> Ipopt::IpoptAlgorithm::ComputeAcceptableTrialPoint() (IpIpoptAlg.cpp:568)
> ==13696== by 0xBC70909: Ipopt::IpoptAlgorithm::Optimize(bool)
> (IpIpoptAlg.cpp:350)
> ==13696== by 0xBBA1E05: Ipopt::IpoptApplication::call_optimize()
> (IpIpoptApplication.cpp:922)
>
>
> So, my software is having a problem in IpCompoundVector.hpp:90. Probably I
> have done something wrong using the C API, but I have printed all data
> passed by means of callback and Valgrind does not complain about no
> initialized data in the printing. I have checked the indices also with an
> assert function to guarantee all indices are in the valid range for
> variables, constraints, and nonzeros derivatives. Does anyone have some
> idea what can be wrong here?
>
> PS: When I try to solve the same problem by means of AMPL interface, IPOPT
> completes execution with success and declares local infeasibility.
>
> Thank you for your attention.
>
> Best regards
>
>
> _______________________________________________
> Ipopt mailing list
> Ipopt at list.coin-or.org
> https://list.coin-or.org/mailman/listinfo/ipopt
>
More information about the Ipopt
mailing list