[Ipopt] Same initialization but different solutions (not the case with fmincon or KNitro)
Arnaud Barré
arnaud.barre at gmail.com
Wed May 28 10:49:01 EDT 2014
Thanks to Kurt Majewski message (see below), I resolved my problem somehow.
All my previous tests were done on MacOS X (10.9) with Matlab R2014a (64-bit). I downloaded the latest binary proposed for this configuration: “Ipopt-3.11.0-linux64mac64win32win64-matlabmexfiles.zip”.
As suggested by Kurt, I downloaded a newer version of Ipopt (Ipopt-3.11.3-win32win64-matlabmexfiles.zip) and I ran my code on a Window machine as the proposed Mex files are only for Windows (Windows XP 32-bit, Matlab R2008b).
This time, I have exactly the same result between the different runs! So, I try another test by using Ipopt-3.11.0 on the Windows machine and I have also the same results… However, this machine has only 1 core (in fact, this is a virtualized machine), which could explain why it works with Ipopt-3.11.0 under Windows. To see if the problem is related to the multithreading under MacOS X, I launched Matlab with the option “-singleCompThread”. But I still have the same problem.
I can provide a small example of my problem if someone has a newer version of Ipopt on MacOS X. On the other hand, I will try to compile also the latest version of Ipopt for MacOS X to see if the problem comes from the MEX file proposed in the file “Ipopt-3.11.0-linux64mac64win32win64-matlabmexfiles.zip”.
Thanks everybody for your time, and thanks to the developers for this incredible tools!
Arnaud
On May 28, 2014, at 5:56 AM, Majewski, Kurt <kurt.majewski at siemens.com> wrote:
> Hi Arnaud,
>
> I noticed that you are using Ipopt 3.11.0.
> Perhaps you should update to version 3.11.8,
> in which a bug introduced in version 3.11.0
> (related to tags) has been corrected.
> This bug can cause non-deterministic behavior,
> since its occurrence depends on the memory
> allocation. Such an update could rule out that
> this bug is the reason for your observations.
> (In my case the small differences caused
> "restoration failed" errors after about 20
> iterations.)
>
> With best regards,
> Kurt Majewski
> Siemens AG
> Corporate Technology
> CT RTC BAM ORD-DE
> Otto-Hahn-Ring 6
> 81739 Munich, Germany
> Tel.: +49 89 636-41639
> Fax: +49 89 636-42284
> mailto:kurt.majewski at siemens.com
>
> Siemens Aktiengesellschaft: Chairman of the Supervisory Board: Gerhard Cromme; Managing Board: Peter Loescher, Chairman, President and Chief Executive Officer; Roland Busch, Brigitte Ederer, Klaus Helmrich, Joe Kaeser, Barbara Kux, Hermann Requardt, Siegfried Russwurm, Peter Y. Solmssen, Michael Suess; Registered offices: Berlin and Munich, Germany; Commercial registries: Berlin Charlottenburg, HRB 12300, Munich, HRB 6684; WEEE-Reg.-No. DE 23691322
>
>
> -----Original Message-----
> From: ipopt-bounces at list.coin-or.org [mailto:ipopt-bounces at list.coin-or.org] On Behalf Of Arnaud Barré
> Sent: Tuesday, May 27, 2014 23:43
> To: ipopt at list.coin-or.org
> Subject: Re: [Ipopt] Same initialization but different solutions (not the case with fmincon or KNitro)
>
> I continue to dig the problem. I modified the Malab examples 'examplehs038' and 'examplehs071' furnished with Ipopt to use only approximation methods (i.e approximation of the gradient and the hessian). I have approximately the same result than the original example (absolute max difference around 5e-7) and the results are the same when I run the functions several times.
>
> So my problem seems not related to my configuration of Ipopt. On the other hand, as my Matlab code works fine with other solvers (fmincon and KNitro), I would say that this part is also good .
>
> Is there anything else I could attempt to find my problem?
>
> Thanks,
>
> Arnaud
>
> On May 22, 2014, at 4:46 PM, Arnaud Barré <arnaud.barre at gmail.com> wrote:
>
>> Hi,
>>
>> I use Ipopt in Matlab and I have approximately the same results than fmincon (interior-point) or KNitro (direct).
>>
>> I did a test where I run multiple times the same problem (i.e same initial conditions, same configurations) with the three algorithms. I have exactly the same results each time for fmincon and KNitro but not for Ipopt.
>>
>> If I look in the output of Ipopt (print level 5), I can see a difference in the objective value after some iterations (see the end of this message for some examples). What could be the reason?
>>
>> My problem is bound constrained only (as summarized below) using a monotone mu strategy, a partial derivate gradient approximation, a hessian approximation (limited-bfgs, max history 10) and the linear solver ma57. The other algorithms (fmincon, KNitro) are configured exactly with the same optons.
>>
>> Thanks,
>>
>> Arnaud
>>
>> This is Ipopt version 3.11.0, running with linear solver ma57.
>>
>> Number of nonzeros in equality constraint Jacobian...: 0 Number of
>> nonzeros in inequality constraint Jacobian.: 0 Number of nonzeros in
>> Lagrangian Hessian.............: 0
>>
>> Total number of variables..........: 9 variables with only lower
>> bounds: 0 variables with lower and upper bounds: 9 variables with only
>> upper bounds: 0 Total number of equality constraints.................:
>> 0 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
>>
>> ----------------------------------------------------------------------
>> --------------
>> First 10 iterations / run #1
>> ------------------------------------------------------------------------------------
>> iter objective inf_pr inf_du lg(mu) ||d|| lg(rg) alpha_du alpha_pr ls
>> 0 6.8420967e+03 0.00e+00 1.00e+02 -1.0 0.00e+00 - 0.00e+00 0.00e+00 0
>> 1 4.9813866e+02 0.00e+00 3.67e+01 -1.0 4.35e+01 - 1.30e-02 2.21e-02f 1
>> 2 2.9178274e+02 0.00e+00 3.13e+01 -1.0 4.12e-01 - 8.23e-01 7.58e-01f 1
>> 3 1.5348471e+02 0.00e+00 1.85e+01 -1.0 8.93e-02 - 1.67e-01 1.00e+00f 1
>> 4 1.4216085e+02 0.00e+00 4.43e+00 -1.0 4.92e-02 - 9.90e-01 1.00e+00f 1
>> 5 1.3684436e+02 0.00e+00 1.89e+00 -1.0 2.75e-02 - 1.00e+00 1.00e+00f 1
>> 6 1.3270432e+02 0.00e+00 1.64e+00 -1.0 2.79e-02 - 1.00e+00 1.00e+00f 1
>> 7 9.0484123e+01 0.00e+00 4.07e+00 -1.0 2.08e-01 - 6.69e-01 1.00e+00f 1
>> 8 3.5107864e+01 0.00e+00 5.58e+00 -1.0 3.94e-01 - 1.00e+00 7.24e-01f 1
>> 9 4.3406913e+01 0.00e+00 8.46e+00 -1.0 5.44e-01 - 1.00e+00 2.50e-01f 3
>>
>> ----------------------------------------------------------------------
>> -------------- First 10 iterations / run #2 (the difference starts at
>> the iteration 7)
>> ------------------------------------------------------------------------------------
>> 0 6.8420967e+03 0.00e+00 1.00e+02 -1.0 0.00e+00 - 0.00e+00 0.00e+00 0
>> 1 4.9813866e+02 0.00e+00 3.67e+01 -1.0 4.35e+01 - 1.30e-02 2.21e-02f 1
>> 2 2.9178274e+02 0.00e+00 3.13e+01 -1.0 4.12e-01 - 8.23e-01 7.58e-01f 1
>> 3 1.5348471e+02 0.00e+00 1.85e+01 -1.0 8.93e-02 - 1.67e-01 1.00e+00f 1
>> 4 1.4216085e+02 0.00e+00 4.43e+00 -1.0 4.92e-02 - 9.90e-01 1.00e+00f 1
>> 5 1.3684436e+02 0.00e+00 1.89e+00 -1.0 2.75e-02 - 1.00e+00 1.00e+00f 1
>> 6 1.3270432e+02 0.00e+00 1.64e+00 -1.0 2.79e-02 - 1.00e+00 1.00e+00f 1
>> 7 9.0484115e+01 0.00e+00 4.07e+00 -1.0 2.08e-01 - 6.69e-01 1.00e+00f 1
>> 8 3.5107870e+01 0.00e+00 5.58e+00 -1.0 3.94e-01 - 1.00e+00 7.24e-01f 1
>> 9 4.3406888e+01 0.00e+00 8.46e+00 -1.0 5.44e-01 - 1.00e+00 2.50e-01f 3
>> _______________________________________________
>> Ipopt mailing list
>> Ipopt at list.coin-or.org
>> http://list.coin-or.org/mailman/listinfo/ipopt
>
>
> _______________________________________________
> Ipopt mailing list
> Ipopt at list.coin-or.org
> http://list.coin-or.org/mailman/listinfo/ipopt
More information about the Ipopt
mailing list