-
-
Notifications
You must be signed in to change notification settings - Fork 280
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
crash problem before resolution #119
Comments
Comment by ycollet created at 2010-04-28 13:22:26 Sorry, I forgot to preview ... YC
|
Comment by @andrea5w created at 2010-04-28 15:33:47 I'm not sure what to suggest except to point out that you need to be a little careful when you use Ipopt objects - you must store them always in a SmartPtr, see also http://www.coin-or.org/Ipopt/documentation/node58.html A problem might occur if you store a pointer to an Ipopt object in a regular pointer and when the reference counter is going to zero because all other SmartPtr are going away, and you are left with a pointer to an object that has been deleted. Also, I would try to find out with a memory checker like valgrind where exactly the first time something goes wrong with the memory. Finally, you can compiler Ipopt with a bunch of debug checks, by configuring it with --enable-debug --with-ipopt-checklevel=1 I should also enable a check for the SmartPtr |
Comment by ycollet created at 2010-04-30 14:22:30 OK, thanks for these advices. YC |
Comment by @andrea5w created at 2010-04-30 14:28:25 Resolution: worksforme |
Comment by ycollet created at 2010-05-17 09:53:18 I added the SmartPtr everywhere I can, but I still have the problem.
|
Comment by ycollet created at 2010-05-17 11:23:33 I have applied valgrind to scilab + the ipopt interface on two problems. The differences I noticed in the valgrind report:
|
Comment by ycollet created at 2010-05-17 11:41:14 The same valgrind report (obtained using bonmin-1.3.3 compiled with the debug flag on mandriva-2010.0 64 bits):
|
Comment by ycollet created at 2010-05-20 09:18:09 Bug found in MY code :) (as usual) YC |
Issue created by migration from Trac.
Original creator: ycollet
Original creation time: 2010-04-28 13:20:55
Assignee: ipopt-team
Version: 3.8
I have developped an interface between scilab and ipopt.
For a particular problem, if I try to solve it using my interface, everything crashes.
If I solve (with success) another problem and then try again to solve my buggy problem, it solves with success.
So, I fill there is an allocation pb somewhere.
I managed to create a gdb trace:
(gdb) where
#0 0x00007f3266b6e545 in raise (sig=) at ../nptl/sysdeps/unix/sysv/linux/raise.c:64
#1 0x00007f3266b6fb60 in abort () at abort.c:88
#2 0x00007f3266badbd0 in malloc_printerr (action=2, str=0x7f3266c64363 "free(): invalid pointer", ptr=0x73bb) at malloc.c:6222
#3 0x00007f323dadf239 in Ipopt::DenseVectorSpace::FreeInternalStorage (this=0x1ef6800, values=0x22ba670) at IpDenseVector.hpp:413
#4 0x00007f323dad9e89 in ~DenseVector (this=0x22ba560) at IpDenseVector.cpp:52
#5 0x00007f323d750e1b in Ipopt::SmartPtr<Ipopt::Vector const>::ReleasePointer_ (this=0x1efa040) at ./../../Common/IpSmartPtr.hpp:516
#6 0x00007f323d751124 in Ipopt::SmartPtr<Ipopt::Vector const>::SetFromRawPtr_ (this=0x1efa040, rhs=0x1b9bae0) at ./../../Common/IpSmartPtr.hpp:473
#7 0x00007f323d9b7ab9 in Ipopt::SmartPtr<Ipopt::Vector const>::operator= (this=0x1efa040, rhs=0x1b9bae0) at ./../Common/IpSmartPtr.hpp:447
#8 0x00007f323da2c713 in Ipopt::DiagMatrix::SetDiag (this=0x1ef9ff0, diag=
@
0x1b9bae0) at ./../LinAlg/IpDiagMatrix.hpp:37#9 0x00007f323da29c97 in Ipopt::LowRankAugSystemSolver::UpdateFactorization (this=0x1d6bb20, W=0x1ef8d90, W_factor=1, D_x=0x22b90a0, delta_x=0,
D_s=0x22b93e0, delta_s=0, J_c=
@
0x1ef86f0, D_c=0x0, delta_c=1e-08, J_d=@
0x1ef9130, D_d=0x0, delta_d=1e-08, proto_rhs_x=@
0x22b9620,proto_rhs_s=
@
0x22b9730, proto_rhs_c=@
0x1b9bde0, proto_rhs_d=@
0x1b9bf50, check_NegEVals=true, numberOfNegEVals=1) at IpLowRankAugSystemSolver.cpp:274#10 0x00007f323da28fc3 in Ipopt::LowRankAugSystemSolver::Solve (this=0x1d6bb20, W=0x1ef8d90, W_factor=1, D_x=0x22b90a0, delta_x=0, D_s=0x22b93e0,
delta_s=0, J_c=0x1ef86f0, D_c=0x0, delta_c=1e-08, J_d=0x1ef9130, D_d=0x0, delta_d=1e-08, rhs_x=
@
0x22b9620, rhs_s=@
0x22b9730, rhs_c=@
0x1b9bde0,rhs_d=
@
0x1b9bf50, sol_x=@
0x22b9990, sol_s=@
0x22b9aa0, sol_c=@
0x22b9bb0, sol_d=@
0x22b9cc0, check_NegEVals=true, numberOfNegEVals=1)at IpLowRankAugSystemSolver.cpp:110
#11 0x00007f323da54692 in Ipopt::PDFullSpaceSolver::SolveOnce (this=0x1d6bcf0, resolve_with_better_quality=false, pretend_singular=false, W=
@
0x1ef8d90,J_c=
@
0x1ef86f0, J_d=@
0x1ef9130, Px_L=@
0x1ef73b0, Px_U=@
0x1ef7520, Pd_L=@
0x1ef7690, Pd_U=@
0x1ef7800, z_L=@
0x1ef8c50, z_U=@
0x1ef9810, v_L=@
0x1ef9920,v_U=
@
0x1ef9a30, slack_x_L=@
0x1ba0f30, slack_x_U=@
0x1ba14b0, slack_s_L=@
0x1ba1900, slack_s_U=@
0x1ba1c00, sigma_x=@
0x22b90a0, sigma_s=@
0x22b93e0,alpha=1, beta=0, rhs=
@
0x22b8280, res=@
0x22b8650) at IpPDFullSpaceSolver.cpp:509#12 0x00007f323da521e4 in Ipopt::PDFullSpaceSolver::Solve (this=0x1d6bcf0, alpha=-1, beta=0, rhs=
@
0x22b8280, res=@
0x22b8650, allow_inexact=true,improve_solution=false) at IpPDFullSpaceSolver.cpp:207
#13 0x00007f323da68388 in Ipopt::QualityFunctionMuOracle::CalculateMu (this=0x1ef5e40, mu_min=9.9999999999999994e-12, mu_max=10, new_mu=
@
0x7fff75a18168)at IpQualityFunctionMuOracle.cpp:226
#14 0x00007f323d9a1a0f in Ipopt::AdaptiveMuUpdate::UpdateBarrierParameter (this=0x1ef6000) at IpAdaptiveMuUpdate.cpp:391
#15 0x00007f323d9e64cc in Ipopt::IpoptAlgorithm::UpdateBarrierParameter (this=0x1ef63a0) at IpIpoptAlg.cpp:515
#16 0x00007f323d9e53dc in Ipopt::IpoptAlgorithm::Optimize (this=0x1ef63a0, isResto=false) at IpIpoptAlg.cpp:332
#17 0x00007f323d74ab94 in Ipopt::IpoptApplication::call_optimize (this=0x1b90780) at IpIpoptApplication.cpp:783
#18 0x00007f323d749925 in Ipopt::IpoptApplication::OptimizeNLP (this=0x1b90780, nlp=
@
0x1b907d0, alg_builder=@
0x7fff75a18c90) at IpIpoptApplication.cpp:681#19 0x00007f323d749538 in Ipopt::IpoptApplication::OptimizeNLP (this=0x1b90780, nlp=
@
0x1b907d0) at IpIpoptApplication.cpp:644#20 0x00007f323d748fc3 in Ipopt::IpoptApplication::OptimizeTNLP (this=0x1b90780, tnlp=
@
0x7fff75a18de0) at IpIpoptApplication.cpp:623#21 0x00007f323ddc5dd5 in sciipopt (fname=0x7f323dde3bd8 "sciipopt") at sciipopt.cpp:1088
The text was updated successfully, but these errors were encountered: