[Ipopt-tickets] [Ipopt] #119: crash problem before resolution
Ipopt
coin-trac at coin-or.org
Mon May 17 05:53:18 EDT 2010
#119: crash problem before resolution
--------------------------------+-------------------------------------------
Reporter: ycollet | Owner: andreasw
Type: defect | Status: closed
Priority: normal | Component: Ipopt
Version: 3.8 (C++ Version) | Severity: normal
Resolution: worksforme | Keywords:
--------------------------------+-------------------------------------------
Comment(by ycollet):
I added the SmartPtr everywhere I can, but I still have the problem.
Here is the complete log I've got on my problem:
{{{
The script I used (scilab one):
function y = rosenbrock_f ( x , x_new )
printf("call to function\n");
disp(x)
disp(x_new)
//y = 100.0 *(x(2)-x(1)^2)^2 + (1-x(1))^2;
y = x(1)^2+x(2)^2;
disp(y)
endfunction
function y = rosenbrock_df ( x , x_new )
printf("call to gradient function\n");
disp(x)
disp(x_new)
//y(1,1) = -400*(x(2)-x(1)^2)*x(1) - 2*(1-x(1));
//y(2,1) = 200*(x(2)-x(1)^2);
y(1,1) = 2*x(1);
y(2,1) = 2*x(2);
disp(y)
endfunction
// Nonlinear inequality constraints
function y = rosenbrock_g ( x , x_new )
printf("call to constraints\n");
disp(x)
disp(x_new)
//y(1) = x(1)^2 + x(2)^2 - 1.5;
y(1) = - x(1)^2 - x(2)^2 + 9*x(2) - 4.25;
disp(y)
endfunction
function y = rosenbrock_dg ( x , x_new )
printf("call to constraint derivative\n");
disp(x)
disp(x_new)
//y(1) = 2 * x(1);
//y(2) = 2 * x(2);
y(1) = -2*x(1);
y(2) = -2*x(2) + 9;
disp(y)
endfunction
// The sparsity structure of the constraints
sparse_dg = [1 1; ..
1 2];
upper = [4;4];
lower = [-4;-4];
//upper = [];
//lower = [];
// Not Feasible starting point
x0 = [2;3.9]; // Non feasible starting point
nb_constr = 1;
var_lin_type(1) = 1; // Non-Linear
var_lin_type(2) = 1; // Non-Linear
constr_lin_type(1) = 1; // Non-Linear
constr_rhs(1) = 0;
constr_lhs(1) = 0; // -%inf
////////////////////////////////////////////////////////////////////////
params = init_param();
params = add_param(params,"hessian_approximation","limited-memory");
params = add_param(params,"jacobian_approximation","limited-memory");
params = add_param(params,"print_level",12);
params = add_param(params,"journal_level",12);
}}}
{{{
Using option file "ipopt.opt".
List of options:
Name Value # times
used
hessian_approximation = limited-memory 6
jacobian_approximation = exact 1
option_file_name = ipopt.opt 1
print_level = 12 2
replace_bounds = no 1
******************************************************************************
This program contains Ipopt, a library for large-scale nonlinear
optimization.
Ipopt is released as open source code under the Common Public License
(CPL).
For more information visit http://projects.coin-or.org/Ipopt
******************************************************************************
NOTE: You are using Ipopt by default with the MUMPS linear solver.
Other linear solvers might be more efficient (see Ipopt
documentation).
This is Ipopt version 3.8.1, running with linear solver mumps.
Number of nonzeros in equality constraint Jacobian...: 2
Number of nonzeros in inequality constraint Jacobian.: 0
Number of nonzeros in Lagrangian Hessian.............: 0
Hessian approximation will be done in smaller space of dimension 1
(instead of 2)
call to gradient function
2.
3.89999999999999991
1.
4.
7.79999999999999982
Scaling parameter for objective function = 1.000000e+00
call to constraint derivative
2.
3.89999999999999991
0.
- 4.
1.2000000000000002
objective scaling factor = 1
No x scaling provided
No c scaling provided
No d scaling provided
DenseVector "original x_L unscaled" with 2 elements:
original x_L unscaled[ 1]=-4.0000000000000000e+00
original x_L unscaled[ 2]=-4.0000000000000000e+00
DenseVector "original x_U unscaled" with 2 elements:
original x_U unscaled[ 1]= 4.0000000000000000e+00
original x_U unscaled[ 2]= 4.0000000000000000e+00
DenseVector "original d_L unscaled" with 0 elements:
DenseVector "original d_U unscaled" with 0 elements:
DenseVector "modified x_L scaled" with 2 elements:
modified x_L scaled[ 1]=-4.0000000399999998e+00
modified x_L scaled[ 2]=-4.0000000399999998e+00
DenseVector "modified x_U scaled" with 2 elements:
modified x_U scaled[ 1]= 4.0000000399999998e+00
modified x_U scaled[ 2]= 4.0000000399999998e+00
DenseVector "modified d_L scaled" with 0 elements:
DenseVector "modified d_U scaled" with 0 elements:
DenseVector "initial x unscaled" with 2 elements:
initial x unscaled[ 1]= 2.0000000000000000e+00
initial x unscaled[ 2]= 3.8999999999999999e+00
Initial values of x sufficiently inside the bounds.
Initial values of s sufficiently inside the bounds.
call to constraint derivative
2.
3.89999999999999991
1.
- 4.
1.2000000000000002
call to gradient function
2.
3.89999999999999991
0.
4.
7.79999999999999982
CompoundVector "RHS[ 0]" with 4 components:
Component 1:
DenseVector "RHS[ 0][ 0]" with 2 elements:
RHS[ 0][ 0][ 1]=-4.0000000000000000e+00
RHS[ 0][ 0][ 2]=-7.7999999999999998e+00
Component 2:
DenseVector "RHS[ 0][ 1]" with 0 elements:
Component 3:
DenseVector "RHS[ 0][ 2]" with 1 elements:
Homogeneous vector, all elements have value 0.0000000000000000e+00
Component 4:
DenseVector "RHS[ 0][ 3]" with 0 elements:
Homogeneous vector, all elements have value 0.0000000000000000e+00
CompoundSymMatrix "KKT" with 4 rows and columns components:
Component for row 0 and column 0:
SumSymMatrix "KKT[0][0]" of dimension 2 with 2 terms:
Term 0 with factor 0.0000000000000000e+00 and the following matrix:
DiagMatrix "Term: 0" with 2 rows and columns, and with diagonal
elements:
DenseVector "Term: 0" with 2 elements:
Term: 0[ 1]= 0.0000000000000000e+00
Term: 0[ 2]= 0.0000000000000000e+00
Term 1 with factor 1.0000000000000000e+00 and the following matrix:
DiagMatrix "Term: 1" with 2 rows and columns, and with diagonal
elements:
DenseVector "Term: 1" with 2 elements:
Homogeneous vector, all elements have value 1.0000000000000000e+00
Component for row 1 and column 0:
This component has not been set.
Component for row 1 and column 1:
DiagMatrix "KKT[1][1]" with 0 rows and columns, and with diagonal
elements:
DenseVector "KKT[1][1]" with 0 elements:
Homogeneous vector, all elements have value 1.0000000000000000e+00
Component for row 2 and column 0:
GenTMatrix "KKT[2][0]" of dimension 1 by 2 with 2 nonzero elements:
KKT[2][0][ 1, 1]=-4.0000000000000000e+00 (0)
KKT[2][0][ 1, 2]= 1.2000000000000002e+00 (1)
Component for row 2 and column 1:
This component has not been set.
Component for row 2 and column 2:
DiagMatrix "KKT[2][2]" with 1 rows and columns, and with diagonal
elements:
DenseVector "KKT[2][2]" with 1 elements:
Homogeneous vector, all elements have value -0.0000000000000000e+00
Component for row 3 and column 0:
GenTMatrix "KKT[3][0]" of dimension 0 by 2 with 0 nonzero elements:
Component for row 3 and column 1:
IdentityMatrix "KKT[3][1]" with 0 rows and columns and the factor
-1.0000000000000000e+00.
Component for row 3 and column 2:
This component has not been set.
Component for row 3 and column 3:
DiagMatrix "KKT[3][3]" with 0 rows and columns, and with diagonal
elements:
DenseVector "KKT[3][3]" with 0 elements:
Homogeneous vector, all elements have value -0.0000000000000000e+00
******* KKT SYSTEM *******
(0) KKT[1][1] = 0.000000000000000e+00
(1) KKT[2][2] = 0.000000000000000e+00
(2) KKT[1][1] = 1.000000000000000e+00
(3) KKT[2][2] = 1.000000000000000e+00
(4) KKT[3][1] = -4.000000000000000e+00
(5) KKT[3][2] = 1.200000000000000e+00
(6) KKT[3][3] = -0.000000000000000e+00
Right hand side 0 in TSymLinearSolver:
Trhs[ 0, 0] = -4.0000000000000000e+00
Trhs[ 0, 1] = -7.7999999999999998e+00
Trhs[ 0, 2] = 0.0000000000000000e+00
Calling MUMPS-1 for symbolic factorization at cpu time 23.203 (wall
0.000).
Done with MUMPS-1 for symbolic factorization at cpu time 23.203 (wall
0.000).
MUMPS used permuting_scaling 5 and pivot_order 2.
scaling will be 77.
Calling MUMPS-2 for numerical factorization at cpu time 23.203 (wall
0.000).
Done with MUMPS-2 for numerical factorization at cpu time 23.203 (wall
0.000).
Number of doubles for MUMPS to hold factorization (INFO(9)) = 6
Number of integers for MUMPS to hold factorization (INFO(10)) = 30
Calling MUMPS-3 for solve at cpu time 23.203 (wall 0.000).
Done with MUMPS-3 for solve at cpu time 23.203 (wall 0.000).
Solution 0 in TSymLinearSolver:
Tsol[ 0, 0] = -2.4770642201834869e+00
Tsol[ 0, 1] = -8.2568807339449553e+00
Tsol[ 0, 2] = 3.8073394495412938e-01
Factorization successful.
CompoundVector "SOL[ 0]" with 4 components:
Component 1:
DenseVector "SOL[ 0][ 0]" with 2 elements:
SOL[ 0][ 0][ 1]=-2.4770642201834869e+00
SOL[ 0][ 0][ 2]=-8.2568807339449553e+00
Component 2:
DenseVector "SOL[ 0][ 1]" with 0 elements:
Component 3:
DenseVector "SOL[ 0][ 2]" with 1 elements:
SOL[ 0][ 2][ 1]= 3.8073394495412938e-01
Component 4:
DenseVector "SOL[ 0][ 3]" with 0 elements:
Least square estimates max(y_c) = 3.807339e-01, max(y_d) = 0.000000e+00
Total number of variables............................: 2
variables with only lower bounds: 0
variables with lower and upper bounds: 2
variables with only upper bounds: 0
Total number of equality constraints.................: 1
Total number of inequality constraints...............: 0
inequality constraints with only lower bounds: 0
inequality constraints with lower and upper bounds: 0
inequality constraints with only upper bounds: 0
call to constraints
2.
3.89999999999999991
0.
11.6400000000000006
call to function
2.
3.89999999999999991
0.
19.2100000000000009
Convergence Check:
overall_error = 1.1640000000000001e+01 IpData().tol() =
1.0000000000000000e-08
dual_inf = 8.2568807339449553e+00 dual_inf_tol_ =
1.0000000000000000e+00
constr_viol = 1.1640000000000001e+01 constr_viol_tol_ =
1.0000000000000000e-04
compl_inf = 7.9000000400000001e+00 compl_inf_tol_ =
1.0000000000000000e-04
**************************************************
*** Update HessianMatrix for Iteration 0:
**************************************************
Limited-Memory approximation started; store data at current iterate.
**************************************************
*** Summary of Iteration: 0:
**************************************************
iter objective inf_pr inf_du lg(mu) ||d|| lg(rg) alpha_du
alpha_pr ls
0 1.9210000e+01 1.16e+01 8.26e+00 0.0 0.00e+00 - 0.00e+00
0.00e+00 0 y
**************************************************
*** Beginning Iteration 0 from the following point:
**************************************************
Current barrier parameter mu = 1.0000000000000000e+00
Current fraction-to-the-boundary parameter tau = 0.0000000000000000e+00
||curr_x||_inf = 3.8999999999999999e+00
||curr_s||_inf = 0.0000000000000000e+00
||curr_y_c||_inf = 3.8073394495412938e-01
||curr_y_d||_inf = 0.0000000000000000e+00
||curr_z_L||_inf = 1.0000000000000000e+00
||curr_z_U||_inf = 1.0000000000000000e+00
||curr_v_L||_inf = 0.0000000000000000e+00
||curr_v_U||_inf = 0.0000000000000000e+00
No search direction has been computed yet.
DenseVector "curr_x" with 2 elements:
curr_x[ 1]= 2.0000000000000000e+00
curr_x[ 2]= 3.8999999999999999e+00
DenseVector "curr_s" with 0 elements:
DenseVector "curr_y_c" with 1 elements:
curr_y_c[ 1]= 3.8073394495412938e-01
DenseVector "curr_y_d" with 0 elements:
DenseVector "curr_slack_x_L" with 2 elements:
curr_slack_x_L[ 1]= 6.0000000399999998e+00
curr_slack_x_L[ 2]= 7.9000000400000001e+00
DenseVector "curr_slack_x_U" with 2 elements:
curr_slack_x_U[ 1]= 2.0000000399999998e+00
curr_slack_x_U[ 2]= 1.0000003999999985e-01
DenseVector "curr_z_L" with 2 elements:
Homogeneous vector, all elements have value 1.0000000000000000e+00
DenseVector "curr_z_U" with 2 elements:
Homogeneous vector, all elements have value 1.0000000000000000e+00
DenseVector "curr_slack_s_L" with 0 elements:
DenseVector "curr_slack_s_U" with 0 elements:
DenseVector "curr_v_L" with 0 elements:
Homogeneous vector, all elements have value 1.0000000000000000e+00
DenseVector "curr_v_U" with 0 elements:
Homogeneous vector, all elements have value 1.0000000000000000e+00
DenseVector "curr_grad_lag_x" with 2 elements:
curr_grad_lag_x[ 1]= 2.4770642201834825e+00
curr_grad_lag_x[ 2]= 8.2568807339449553e+00
DenseVector "curr_grad_lag_s" with 0 elements:
***Current NLP Values for Iteration 0:
(scaled) (unscaled)
Objective...............: 1.9210000000000001e+01
1.9210000000000001e+01
Dual infeasibility......: 8.2568807339449553e+00
8.2568807339449553e+00
Constraint violation....: 1.1640000000000001e+01
1.1640000000000001e+01
Complementarity.........: 7.9000000400000001e+00
7.9000000400000001e+00
Overall NLP error.......: 1.1640000000000001e+01
1.1640000000000001e+01
DenseVector "grad_f" with 2 elements:
grad_f[ 1]= 4.0000000000000000e+00
grad_f[ 2]= 7.7999999999999998e+00
DenseVector "curr_c" with 1 elements:
curr_c[ 1]= 1.1640000000000001e+01
DenseVector "curr_d" with 0 elements:
DenseVector "curr_d - curr_s" with 0 elements:
GenTMatrix "jac_c" of dimension 1 by 2 with 2 nonzero elements:
jac_c[ 1, 1]=-4.0000000000000000e+00 (0)
jac_c[ 1, 2]= 1.2000000000000002e+00 (1)
GenTMatrix "jac_d" of dimension 0 by 2 with 0 nonzero elements:
LowRankUpdateSymMatrix "W" with 2 rows and columns:
This matrix has reduced diagonal.
Diagonal matrix:
DenseVector "W-D" with 1 elements:
Homogeneous vector, all elements have value 1.0000000000000000e+00
MultiVectorMatrix V for positive update:
V matrix not set!
MultiVectorMatrix U for positive update:
U matrix not set!
**************************************************
*** Update Barrier Parameter for Iteration 0:
**************************************************
Setting mu_max to 4.000000e+03.
Staying in free mu mode.
The current filter has 1 entries.
phi theta iter
1 1.9210000000000001e+01 1.1640000000000001e+01 0
Solving the Primal Dual System for the affine step
Solving system with delta_x=0.000000e+00 delta_s=0.000000e+00
delta_c=0.000000e+00 delta_d=0.000000e+00
CompoundVector "RHS[ 0]" with 4 components:
Component 1:
DenseVector "RHS[ 0][ 0]" with 2 elements:
RHS[ 0][ 0][ 1]= 2.4770642201834825e+00
RHS[ 0][ 0][ 2]= 8.2568807339449553e+00
Component 2:
DenseVector "RHS[ 0][ 1]" with 0 elements:
Component 3:
DenseVector "RHS[ 0][ 2]" with 1 elements:
RHS[ 0][ 2][ 1]= 1.1640000000000001e+01
Component 4:
DenseVector "RHS[ 0][ 3]" with 0 elements:
CompoundSymMatrix "KKT" with 4 rows and columns components:
Component for row 0 and column 0:
SumSymMatrix "KKT[0][0]" of dimension 2 with 2 terms:
Term 0 with factor 1.0000000000000000e+00 and the following matrix:
DiagMatrix "Term: 0" with 2 rows and columns, and with diagonal
elements:
DenseVector "Term: 0" with 2 elements:
Term: 0[ 1]= 0.0000000000000000e+00
Term: 0[ 2]= 0.0000000000000000e+00
Term 1 with factor 1.0000000000000000e+00 and the following matrix:
DiagMatrix "Term: 1" with 2 rows and columns, and with diagonal
elements:
DenseVector "Term: 1" with 2 elements:
Term: 1[ 1]= 6.6666665555555582e-01
Term: 1[ 2]= 1.0126578277841705e+01
Component for row 1 and column 0:
This component has not been set.
Component for row 1 and column 1:
DiagMatrix "KKT[1][1]" with 0 rows and columns, and with diagonal
elements:
DenseVector "KKT[1][1]" with 0 elements:
Component for row 2 and column 0:
GenTMatrix "KKT[2][0]" of dimension 1 by 2 with 2 nonzero elements:
KKT[2][0][ 1, 1]=-4.0000000000000000e+00 (0)
KKT[2][0][ 1, 2]= 1.2000000000000002e+00 (1)
Component for row 2 and column 1:
This component has not been set.
Component for row 2 and column 2:
DiagMatrix "KKT[2][2]" with 1 rows and columns, and with diagonal
elements:
DenseVector "KKT[2][2]" with 1 elements:
Homogeneous vector, all elements have value -0.0000000000000000e+00
Component for row 3 and column 0:
GenTMatrix "KKT[3][0]" of dimension 0 by 2 with 0 nonzero elements:
Component for row 3 and column 1:
IdentityMatrix "KKT[3][1]" with 0 rows and columns and the factor
-1.0000000000000000e+00.
Component for row 3 and column 2:
This component has not been set.
Component for row 3 and column 3:
DiagMatrix "KKT[3][3]" with 0 rows and columns, and with diagonal
elements:
DenseVector "KKT[3][3]" with 0 elements:
Homogeneous vector, all elements have value -0.0000000000000000e+00
******* KKT SYSTEM *******
(0) KKT[1][1] = 0.000000000000000e+00
(1) KKT[2][2] = 0.000000000000000e+00
(2) KKT[1][1] = 6.666666555555558e-01
(3) KKT[2][2] = 1.012657827784171e+01
(4) KKT[3][1] = -4.000000000000000e+00
(5) KKT[3][2] = 1.200000000000000e+00
(6) KKT[3][3] = -0.000000000000000e+00
Right hand side 0 in TSymLinearSolver:
Trhs[ 0, 0] = 2.4770642201834825e+00
Trhs[ 0, 1] = 8.2568807339449553e+00
Trhs[ 0, 2] = 1.1640000000000001e+01
Calling MUMPS-2 for numerical factorization at cpu time 23.205 (wall
0.003).
Done with MUMPS-2 for numerical factorization at cpu time 23.205 (wall
0.003).
Number of doubles for MUMPS to hold factorization (INFO(9)) = 6
Number of integers for MUMPS to hold factorization (INFO(10)) = 30
Calling MUMPS-3 for solve at cpu time 23.205 (wall 0.003).
Done with MUMPS-3 for solve at cpu time 23.205 (wall 0.003).
Solution 0 in TSymLinearSolver:
Tsol[ 0, 0] = -2.6278051433006553e+00
Tsol[ 0, 1] = 9.4064952233114940e-01
Tsol[ 0, 2] = -1.0572335716298653e+00
Factorization successful.
CompoundVector "SOL[ 0]" with 4 components:
Component 1:
DenseVector "SOL[ 0][ 0]" with 2 elements:
SOL[ 0][ 0][ 1]=-2.6278051433006553e+00
SOL[ 0][ 0][ 2]= 9.4064952233114940e-01
Component 2:
DenseVector "SOL[ 0][ 1]" with 0 elements:
Component 3:
DenseVector "SOL[ 0][ 2]" with 1 elements:
SOL[ 0][ 2][ 1]=-1.0572335716298653e+00
Component 4:
DenseVector "SOL[ 0][ 3]" with 0 elements:
Number of trial factorizations performed: 1
Perturbation parameters: delta_x=0.000000e+00 delta_s=0.000000e+00
delta_c=0.000000e+00 delta_d=0.000000e+00
CompoundVector "resid" with 8 components:
Component 1:
DenseVector "resid[ 0]" with 2 elements:
resid[ 0][ 1]= 4.2632564145606011e-14
resid[ 0][ 2]= 0.0000000000000000e+00
Component 2:
DenseVector "resid[ 1]" with 0 elements:
Component 3:
DenseVector "resid[ 2]" with 1 elements:
resid[ 2][ 1]= 0.0000000000000000e+00
Component 4:
DenseVector "resid[ 3]" with 0 elements:
Component 5:
DenseVector "resid[ 4]" with 2 elements:
resid[ 4][ 1]= 0.0000000000000000e+00
resid[ 4][ 2]= 0.0000000000000000e+00
Component 6:
DenseVector "resid[ 5]" with 2 elements:
resid[ 5][ 1]= 0.0000000000000000e+00
resid[ 5][ 2]= 0.0000000000000000e+00
Component 7:
DenseVector "resid[ 6]" with 0 elements:
Component 8:
DenseVector "resid[ 7]" with 0 elements:
max-norm resid_x 4.263256e-14
max-norm resid_s 0.000000e+00
max-norm resid_c 0.000000e+00
max-norm resid_d 0.000000e+00
max-norm resid_zL 0.000000e+00
max-norm resid_zU 0.000000e+00
max-norm resid_vL 0.000000e+00
max-norm resid_vU 0.000000e+00
}}}
--
Ticket URL: <https://projects.coin-or.org/Ipopt/ticket/119#comment:5>
Ipopt <http://projects.coin-or.org/Ipopt>
Interior-point optimizer for nonlinear programs.
More information about the Ipopt-tickets
mailing list