[ADOL-C] Trivial known bug?

Rishi Amrit rishiamrit at gmail.com
Sat Sep 15 01:10:53 EDT 2012


Hello,

   I am using ADOLC for a very large scale example, hence not sure how I
can post the whole code for reproduction of this problem. But I wanted to
share valgrind's output to check if this is a trivail known bug that I can
quickly fix.: Valgrind gives the following when calling hess_pat for
sparsity pattern generation:


==30712== Invalid read of size 4
==30712==    at 0x163EB945: extend_nonlinearity_domain_binary_step
(uni5_for.c:3852)
==30712==    by 0x163EBB66: extend_nonlinearity_domain_binary
(uni5_for.c:3916)
==30712==    by 0x163EB68E: nonl_ind_forward_safe (uni5_for.c:1890)
==30712==    by 0x13EDB6C8: nlmpc_NLP::generate_tapes(int, int, int&, int&)
(nlmpc_nlp.hpp:627)
==30712==    by 0x13EDA638: nlmpc_NLP::get_nlp_info(int&, int&, int&, int&,
Ipopt::TNLP::IndexStyleEnum&) (nlmpc_nlp.hpp:207)
==30712==    by 0x14198B54:
Ipopt::TNLPAdapter::GetSpaces(Ipopt::SmartPtr<Ipopt::VectorSpace const>&,
Ipopt::SmartPtr<Ipopt::VectorSpace const>&,
Ipopt::SmartPtr<Ipopt::VectorSpace const>&,
Ipopt::SmartPtr<Ipopt::VectorSpace const>&,
Ipopt::SmartPtr<Ipopt::MatrixSpace const>&,
Ipopt::SmartPtr<Ipopt::VectorSpace const>&,
Ipopt::SmartPtr<Ipopt::MatrixSpace const>&,
Ipopt::SmartPtr<Ipopt::VectorSpace const>&,
Ipopt::SmartPtr<Ipopt::MatrixSpace const>&,
Ipopt::SmartPtr<Ipopt::VectorSpace const>&,
Ipopt::SmartPtr<Ipopt::MatrixSpace const>&,
Ipopt::SmartPtr<Ipopt::MatrixSpace const>&,
Ipopt::SmartPtr<Ipopt::MatrixSpace const>&,
Ipopt::SmartPtr<Ipopt::SymMatrixSpace const>&) (in
/opt/ipopt/3102p/install/lib/libipopt.so.1.8.2)
==30712==    by 0x142411F0:
Ipopt::OrigIpoptNLP::InitializeStructures(Ipopt::SmartPtr<Ipopt::Vector>&,
bool, Ipopt::SmartPtr<Ipopt::Vector>&, bool,
Ipopt::SmartPtr<Ipopt::Vector>&, bool, Ipopt::SmartPtr<Ipopt::Vector>&,
bool, Ipopt::SmartPtr<Ipopt::Vector>&, bool,
Ipopt::SmartPtr<Ipopt::Vector>&, Ipopt::SmartPtr<Ipopt::Vector>&) (in
/opt/ipopt/3102p/install/lib/libipopt.so.1.8.2)
==30712==    by 0x14218CF3:
Ipopt::IpoptData::InitializeDataStructures(Ipopt::IpoptNLP&, bool, bool,
bool, bool, bool) (in /opt/ipopt/3102p/install/lib/libipopt.so.1.8.2)
==30712==    by 0x141DF5CE:
Ipopt::DefaultIterateInitializer::SetInitialIterates() (in
/opt/ipopt/3102p/install/lib/libipopt.so.1.8.2)
==30712==    by 0x141F179E: Ipopt::IpoptAlgorithm::InitializeIterates() (in
/opt/ipopt/3102p/install/lib/libipopt.so.1.8.2)
==30712==    by 0x141F60B5: Ipopt::IpoptAlgorithm::Optimize(bool) (in
/opt/ipopt/3102p/install/lib/libipopt.so.1.8.2)
==30712==    by 0x14183081: Ipopt::IpoptApplication::call_optimize() (in
/opt/ipopt/3102p/install/lib/libipopt.so.1.8.2)
==30712==  Address 0x202bc100 is 0 bytes inside a block of size 88 free'd
==30712==    at 0x4C2A82E: free (in
/usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==30712==    by 0x163EBB07: extend_nonlinearity_domain_binary_step
(uni5_for.c:3856)
==30712==    by 0x163EBB66: extend_nonlinearity_domain_binary
(uni5_for.c:3916)
==30712==    by 0x163EB5A2: nonl_ind_forward_safe (uni5_for.c:1797)
==30712==    by 0x13EDB6C8: nlmpc_NLP::generate_tapes(int, int, int&, int&)
(nlmpc_nlp.hpp:627)
==30712==    by 0x13EDA638: nlmpc_NLP::get_nlp_info(int&, int&, int&, int&,
Ipopt::TNLP::IndexStyleEnum&) (nlmpc_nlp.hpp:207)
==30712==    by 0x14198B54:
Ipopt::TNLPAdapter::GetSpaces(Ipopt::SmartPtr<Ipopt::VectorSpace const>&,
Ipopt::SmartPtr<Ipopt::VectorSpace const>&,
Ipopt::SmartPtr<Ipopt::VectorSpace const>&,
Ipopt::SmartPtr<Ipopt::VectorSpace const>&,
Ipopt::SmartPtr<Ipopt::MatrixSpace const>&,
Ipopt::SmartPtr<Ipopt::VectorSpace const>&,
Ipopt::SmartPtr<Ipopt::MatrixSpace const>&,
Ipopt::SmartPtr<Ipopt::VectorSpace const>&,
Ipopt::SmartPtr<Ipopt::MatrixSpace const>&,
Ipopt::SmartPtr<Ipopt::VectorSpace const>&,
Ipopt::SmartPtr<Ipopt::MatrixSpace const>&,
Ipopt::SmartPtr<Ipopt::MatrixSpace const>&,
Ipopt::SmartPtr<Ipopt::MatrixSpace const>&,
Ipopt::SmartPtr<Ipopt::SymMatrixSpace const>&) (in
/opt/ipopt/3102p/install/lib/libipopt.so.1.8.2)
==30712==    by 0x142411F0:
Ipopt::OrigIpoptNLP::InitializeStructures(Ipopt::SmartPtr<Ipopt::Vector>&,
bool, Ipopt::SmartPtr<Ipopt::Vector>&, bool,
Ipopt::SmartPtr<Ipopt::Vector>&, bool, Ipopt::SmartPtr<Ipopt::Vector>&,
bool, Ipopt::SmartPtr<Ipopt::Vector>&, bool,
Ipopt::SmartPtr<Ipopt::Vector>&, Ipopt::SmartPtr<Ipopt::Vector>&) (in
/opt/ipopt/3102p/install/lib/libipopt.so.1.8.2)
==30712==    by 0x14218CF3:
Ipopt::IpoptData::InitializeDataStructures(Ipopt::IpoptNLP&, bool, bool,
bool, bool, bool) (in /opt/ipopt/3102p/install/lib/libipopt.so.1.8.2)
==30712==    by 0x141DF5CE:
Ipopt::DefaultIterateInitializer::SetInitialIterates() (in
/opt/ipopt/3102p/install/lib/libipopt.so.1.8.2)
==30712==    by 0x141F179E: Ipopt::IpoptAlgorithm::InitializeIterates() (in
/opt/ipopt/3102p/install/lib/libipopt.so.1.8.2)
==30712==    by 0x141F60B5: Ipopt::IpoptAlgorithm::Optimize(bool) (in
/opt/ipopt/3102p/install/lib/libipopt.so.1.8.2)




You see that the error is in uni5_for.c.

I am using ADOLC v2.3. My application is using the ipopt interface as
suggested in the examples. Please let me know if this makes sense.

Thanks,

Kind regards,
Rishi
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://list.coin-or.org/pipermail/adol-c/attachments/20120915/5fec1b4d/attachment.html>


More information about the ADOL-C mailing list