Hello,<div><br></div><div> 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:</div>
<div><br></div><div><br clear="all"><div><div>==30712== Invalid read of size 4</div><div>==30712== at 0x163EB945: extend_nonlinearity_domain_binary_step (uni5_for.c:3852)</div><div>==30712== by 0x163EBB66: extend_nonlinearity_domain_binary (uni5_for.c:3916)</div>
<div>==30712== by 0x163EB68E: nonl_ind_forward_safe (uni5_for.c:1890)</div><div>==30712== by 0x13EDB6C8: nlmpc_NLP::generate_tapes(int, int, int&, int&) (nlmpc_nlp.hpp:627)</div><div>==30712== by 0x13EDA638: nlmpc_NLP::get_nlp_info(int&, int&, int&, int&, Ipopt::TNLP::IndexStyleEnum&) (nlmpc_nlp.hpp:207)</div>
<div>==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)</div>
<div>==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)</div>
<div>==30712== by 0x14218CF3: Ipopt::IpoptData::InitializeDataStructures(Ipopt::IpoptNLP&, bool, bool, bool, bool, bool) (in /opt/ipopt/3102p/install/lib/libipopt.so.1.8.2)</div><div>==30712== by 0x141DF5CE: Ipopt::DefaultIterateInitializer::SetInitialIterates() (in /opt/ipopt/3102p/install/lib/libipopt.so.1.8.2)</div>
<div>==30712== by 0x141F179E: Ipopt::IpoptAlgorithm::InitializeIterates() (in /opt/ipopt/3102p/install/lib/libipopt.so.1.8.2)</div><div>==30712== by 0x141F60B5: Ipopt::IpoptAlgorithm::Optimize(bool) (in /opt/ipopt/3102p/install/lib/libipopt.so.1.8.2)</div>
<div>==30712== by 0x14183081: Ipopt::IpoptApplication::call_optimize() (in /opt/ipopt/3102p/install/lib/libipopt.so.1.8.2)</div><div>==30712== Address 0x202bc100 is 0 bytes inside a block of size 88 free'd</div><div>
==30712== at 0x4C2A82E: free (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)</div><div>==30712== by 0x163EBB07: extend_nonlinearity_domain_binary_step (uni5_for.c:3856)</div><div>==30712== by 0x163EBB66: extend_nonlinearity_domain_binary (uni5_for.c:3916)</div>
<div>==30712== by 0x163EB5A2: nonl_ind_forward_safe (uni5_for.c:1797)</div><div>==30712== by 0x13EDB6C8: nlmpc_NLP::generate_tapes(int, int, int&, int&) (nlmpc_nlp.hpp:627)</div><div>==30712== by 0x13EDA638: nlmpc_NLP::get_nlp_info(int&, int&, int&, int&, Ipopt::TNLP::IndexStyleEnum&) (nlmpc_nlp.hpp:207)</div>
<div>==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)</div>
<div>==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)</div>
<div>==30712== by 0x14218CF3: Ipopt::IpoptData::InitializeDataStructures(Ipopt::IpoptNLP&, bool, bool, bool, bool, bool) (in /opt/ipopt/3102p/install/lib/libipopt.so.1.8.2)</div><div>==30712== by 0x141DF5CE: Ipopt::DefaultIterateInitializer::SetInitialIterates() (in /opt/ipopt/3102p/install/lib/libipopt.so.1.8.2)</div>
<div>==30712== by 0x141F179E: Ipopt::IpoptAlgorithm::InitializeIterates() (in /opt/ipopt/3102p/install/lib/libipopt.so.1.8.2)</div><div>==30712== by 0x141F60B5: Ipopt::IpoptAlgorithm::Optimize(bool) (in /opt/ipopt/3102p/install/lib/libipopt.so.1.8.2)</div>
</div><div><br></div><div><br></div><div><br></div><div><br></div><div>You see that the error is in uni5_for.c. </div><div><br></div><div>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.</div>
<div><br></div><div>Thanks,</div><div><br></div><div>Kind regards,</div><div>Rishi</div><div><br></div>
</div>