[Ipopt] Release/Debug mode

Stefan Vigerske stefan at math.hu-berlin.de
Thu Apr 12 00:22:40 EDT 2012


Hi,

an easy guess is that you have an ipopt.opt file in your desktop, but 
not in C:\. In the AMPL interface, an ipopt.opt file is read by default, 
if available.

Another guess is that the environment is a bit different when executing 
in C:\, e.g., the environment variable that holds the working path has a 
different value. Maybe this leads to a different memory usage and then 
something in Ipopt behaves differently (e.g., due to sorting something 
by pointer adresses). But this is very unlikely.

You could rerun with a high print_level (10, or so) and try to see from 
which point on results are different.

Stefan

> Hi all,
>
> I am trying to solve a NLP problem with IPOPT (865 variables and 530
> constraints). I am using the the binary (win32) DLL.
>
> If I run the program in debug mode, all is right. The problem comes when
> I try to execute it in release mode. In release, IPOPT gives me the
> optimal solution without problems, but this solution differs depending
> on the place where it’s executed.
>
> For example, if I execute the code in my desktop, IPOPT finds the
> optimal solution in 193 iterations:
>
> iter objective inf_pr inf_du lg(mu) ||d|| lg(rg) alpha_du alpha_pr ls
>
> 0 1.8990519e+003 2.53e+006 8.73e+001 0.0 0.00e+000 - 0.00e+000 0.00e+000 0
>
> 1 8.0615445e+004 2.53e+006 1.14e+002 5.5 1.68e+006 - 3.45e-008 1.52e-006f 1
>
> 2 8.4984098e+004 2.53e+006 1.14e+002 3.7 1.63e+006 - 9.21e-007 3.44e-006f 1
>
> 3 1.5133245e+005 2.53e+006 2.79e+002 4.3 1.68e+006 - 2.15e-006 1.32e-005f 1
>
> 4 2.8394936e+005 2.53e+006 2.94e+002 3.9 1.69e+006 - 1.38e-005 3.96e-005f 1
>
> 5 2.9204821e+005 2.53e+006 2.93e+002 4.8 1.01e+006 - 2.55e-006 2.71e-006f 1
>
> 6 8.2596406e+008 2.51e+006 1.02e+006 6.1 1.89e+006 - 1.72e-006 8.16e-003f 1
>
>>
> Number of Iterations....: 193
>
> (scaled) (unscaled)
>
> Objective...............: 3.1208657806952629e+005 6.1431434113783743e+006
>
> Dual infeasibility......: 3.5501585875953514e-009 6.9881676654085783e-008
>
> Constraint violation....: 4.6566128730773926e-010 4.6566128730773926e-010
>
> Complementarity.........: 1.0000000696763270e-011 1.9684101371515826e-010
>
> Overall NLP error.......: 3.5501585875953514e-009 6.9881676654085783e-008
>
> Number of objective function evaluations = 355
>
> Number of objective gradient evaluations = 180
>
> Number of equality constraint evaluations = 355
>
> Number of inequality constraint evaluations = 0
>
> Number of equality constraint Jacobian evaluations = 196
>
> Number of inequality constraint Jacobian evaluations = 0
>
> Number of Lagrangian Hessian evaluations = 0
>
> Total CPU secs in IPOPT (w/o function evaluations) = 24.172
>
> Total CPU secs in NLP function evaluations = 48.125
>
> But if I execute the same code in C:/, the number of iterations and the
> results are different:
>
> iter objective inf_pr inf_du lg(mu) ||d|| lg(rg) alpha_du alpha_pr ls
>
> 0 1.8990519e+003 2.53e+006 8.73e+001 0.0 0.00e+000 - 0.00e+000 0.00e+000 0
>
> 1 8.0615445e+004 2.53e+006 1.14e+002 5.5 1.68e+006 - 3.45e-008 1.52e-006f 1
>
> 2 8.4984098e+004 2.53e+006 1.14e+002 3.7 1.63e+006 - 9.21e-007 3.44e-006f 1
>
> 3 1.5133245e+005 2.53e+006 2.79e+002 4.3 1.68e+006 - 2.15e-006 1.32e-005f 1
>
> 4 2.8394985e+005 2.53e+006 2.94e+002 3.9 1.69e+006 - 1.38e-005 3.96e-005f 1
>
> 5 2.9204809e+005 2.53e+006 2.93e+002 4.8 1.01e+006 - 2.55e-006 2.71e-006f 1
>
> 6 8.2597073e+008 2.51e+006 1.02e+006 6.1 1.89e+006 - 1.73e-006 8.16e-003f 1
>
>>
> Number of Iterations....: 111
>
> (scaled) (unscaled)
>
> Objective...............: 3.1208657753133564e+005 6.1431434007845754e+006
>
> Dual infeasibility......: 9.7656250000000000e-004 1.9222753906250035e-002
>
> Constraint violation....: 9.9999999999999969e-009 9.9999999999999969e-009
>
> Complementarity.........: 1.1550769498483705e-011 2.2736650188510352e-010
>
> Overall NLP error.......: 9.9999999999999969e-009 1.9222753906250035e-002
>
> Is normal this behavior?
>
> I have the same problem with versions 3.9.2 and 3.10.1.
>
> Best regards and thank you in advance
>
> Raquel
>
>
>
> _______________________________________________
> Ipopt mailing list
> Ipopt at list.coin-or.org
> http://list.coin-or.org/mailman/listinfo/ipopt



More information about the Ipopt mailing list