[Ipopt] Fwd: IPOPT runs out of memory for analytical jacobian of the constraints

Jason Moore moorepants at gmail.com
Thu Dec 18 12:54:18 EST 2014


Thought this would be useful for the list.

Jason
moorepants.info
+01 530-601-9791

---------- Forwarded message ----------
From: Jason Moore <moorepants at gmail.com>
Date: Thu, Dec 18, 2014 at 11:51 AM
Subject: Re: [Ipopt] IPOPT runs out of memory for analytical jacobian of
the constraints
To: Deepraj Paul <deepraj222 at gmail.com>

http://www.mathworks.com/help/matlab/matlab_prog/strategies-for-efficient-use-of-memory.html?refresh=true

Just do a google search. You basically need to understand when variables
are copied Matlab (unfortunately most of the time) and avoid those copies.
Some hacks, like using a global for main giant data structure. I think you
may be able to pass classes into functions that have data member
attributes, which may not be copied. Others are simple like preallocating
arrays and avoid unnecessary array creation.


Jason
moorepants.info
+01 530-601-9791

On Thu, Dec 18, 2014 at 11:47 AM, Deepraj Paul <deepraj222 at gmail.com> wrote:
>
> Regarding "tricks"....any suggestion...any references...
>
> On Thu, Dec 18, 2014 at 9:23 PM, Jason Moore <moorepants at gmail.com> wrote:
>>
>> Matlab often does dumb things and copies arrays. For example, if you pass
>> a matrix to a function it is copied. This leads to large memory use when
>> you work with bigger data. You should carefully examine your memory use in
>> the Matlab code you are using and see where you are using all the memory.
>> It is likely that you can use some Matlab "tricks" to prevent copying.
>>
>>
>> Jason
>> moorepants.info
>> +01 530-601-9791
>>
>> On Thu, Dec 18, 2014 at 9:49 AM, Hashemi, Reza <
>> Reza.Hashemi at bci.tu-dortmund.de> wrote:
>>
>>> Hello everyone,
>>>
>>>
>>>
>>> I am facing a problem in using IPOPT which some of you might have
>>> experience with it.
>>>
>>> In the context of the optimal control, I am using the IPOPT to solve a
>>> huge NLP problem with 32,005 variables. Since the model is very complex, up
>>> to now, I have used the numeric Jacobians. I provide the numeric Jacobians
>>> using the MATLAB internal function *numjac* and I am able to produce
>>> some results.
>>>
>>> Since I need to accelerate the convergence of the algorithm, I have
>>> created a function which supplies the analytical Jacobian of the
>>> constraints (The Jacobian has a size of 32000x32005).
>>>
>>> Surprisingly, when I am using the analytical Jacobian, the IPOPT runs
>>> out of memory or becomes torturingly slow.
>>>
>>> I am pretty sure that the analytical Jacobian is correct. Moreover, I
>>> compare the analytical Jacobian and the numeric one at each step and do not
>>> see a large difference…
>>>
>>>
>>>
>>> Does anyone know what might be the possible reason for this strange
>>> behavior of IPOPT?
>>>
>>>
>>>
>>> Thanks in advance.
>>>
>>> Reza
>>>
>>>
>>>
>>>
>>>
>>> *Reza Hashemi, M.Sc.*
>>>
>>> Lehrstuhl für Systemdynamik und Prozessführung / Process Dynamics and
>>> Operations Group
>>>
>>> Fakultät Bio- und Chemieingenieurwesen / Biochemical and Chemical
>>> Engineering Department
>>>
>>> TU Dortmund
>>>
>>> Emil-Figge-Str. 70
>>>
>>> 44221 Dortmund, Germany
>>>
>>>
>>>
>>> Phone: (+49/0) 231 755 5165
>>> Fax:       (+49/0) 231 755 5129
>>>
>>> www.dyn.bci.tu-dortmund.de
>>>
>>>
>>>
>>>
>>>
>>> _______________________________________________
>>> 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
>>
>>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://list.coin-or.org/pipermail/ipopt/attachments/20141218/b4588d6e/attachment.html>


More information about the Ipopt mailing list