<HTML xmlns="http://www.w3.org/TR/REC-html40" xmlns:v = 
"urn:schemas-microsoft-com:vml" xmlns:o = 
"urn:schemas-microsoft-com:office:office" xmlns:w = 
"urn:schemas-microsoft-com:office:word" xmlns:m = 
"http://schemas.microsoft.com/office/2004/12/omml"><HEAD>
<META content="text/html; charset=iso-8859-1" http-equiv=Content-Type>
<META name=Generator content="Microsoft Word 14 (filtered medium)">
<STYLE><!--
/* Font Definitions */
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:"Calibri","sans-serif";
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri","sans-serif";}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:70.85pt 70.85pt 2.0cm 70.85pt;}
div.WordSection1
        {page:WordSection1;}
--></STYLE>
</HEAD>
<BODY lang=EN-US dir=ltr link=blue vLink=purple>
<DIV dir=ltr>
<DIV style="FONT-SIZE: 12pt; FONT-FAMILY: 'Calibri'; COLOR: #000000">
<DIV>The replies about copy-on-write and Matlab tricks for memory management are 
useful if you’re stuck using that environment (though I encourage you to 
consider looking into modern, open-source, high-performance alternatives that 
are available these days), but likely overthinking the problem. A 32k by 32k 
dense matrix of doubles would take over 8 gigabytes. The same size sparse matrix 
would take 12 bytes per nonzero element, plus 128 kb for the column pointers (or 
16 bytes per nonzero + 256 kb if the indices are saved as 64 bit ints). So most 
likely, somewhere in your code is either initially allocating or accidentally 
converting your Jacobian matrix to dense. I haven’t used Matlab’s numjac, but 
I’m going to guess that if it worked at all for a 32k-variable, 32k-constraint 
problem then it’s outputting sparse results.</DIV>
<DIV>&nbsp;</DIV>
<DIV>-Tony</DIV>
<DIV>&nbsp;</DIV>
<DIV 
style='FONT-SIZE: small; TEXT-DECORATION: none; FONT-FAMILY: "Calibri"; FONT-WEIGHT: normal; COLOR: #000000; FONT-STYLE: normal; DISPLAY: inline'>
<DIV style="FONT: 10pt tahoma">
<DIV>&nbsp;</DIV>
<DIV style="BACKGROUND: #f5f5f5">
<DIV style="font-color: black"><B>From:</B> <A 
title=Reza.Hashemi@bci.tu-dortmund.de 
href="mailto:Reza.Hashemi@bci.tu-dortmund.de">Hashemi, Reza</A> </DIV>
<DIV><B>Sent:</B> Thursday, December 18, 2014 6:49 AM</DIV>
<DIV><B>To:</B> <A title=ipopt@list.coin-or.org 
href="mailto:ipopt@list.coin-or.org">ipopt@list.coin-or.org</A> </DIV>
<DIV><B>Subject:</B> [Ipopt] IPOPT runs out of memory for analytical jacobian of 
theconstraints</DIV></DIV></DIV>
<DIV>&nbsp;</DIV></DIV>
<DIV 
style='FONT-SIZE: small; TEXT-DECORATION: none; FONT-FAMILY: "Calibri"; FONT-WEIGHT: normal; COLOR: #000000; FONT-STYLE: normal; DISPLAY: inline'>
<DIV class=WordSection1>
<P class=MsoNormal>Hello everyone,<o:p></o:p></P>
<P class=MsoNormal><o:p></o:p>&nbsp;</P>
<P class=MsoNormal>I am facing a problem in using IPOPT which some of you might 
have experience with it.<o:p></o:p></P>
<P class=MsoNormal>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 <B>numjac</B> and I am able to 
produce some results.<o:p></o:p></P>
<P class=MsoNormal>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).<o:p></o:p></P>
<P class=MsoNormal>Surprisingly, when I am using the analytical Jacobian, the 
IPOPT runs out of memory or becomes torturingly slow.<o:p></o:p></P>
<P class=MsoNormal>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…<o:p></o:p></P>
<P class=MsoNormal><o:p></o:p>&nbsp;</P>
<P class=MsoNormal>Does anyone know what might be the possible reason for this 
strange behavior of IPOPT?<o:p></o:p></P>
<P class=MsoNormal><o:p></o:p>&nbsp;</P>
<P class=MsoNormal>Thanks in advance.<o:p></o:p></P>
<P class=MsoNormal>Reza<o:p></o:p></P>
<P class=MsoNormal><o:p></o:p>&nbsp;</P>
<P class=MsoNormal><o:p></o:p>&nbsp;</P>
<P class=MsoNormal style="TEXT-AUTOSPACE: "><B><SPAN lang=DE 
style="COLOR: #1f497d">Reza Hashemi, M.Sc.<o:p></o:p></SPAN></B></P>
<P class=MsoNormal><SPAN lang=DE style="COLOR: #1f497d">Lehrstuhl für 
Systemdynamik und Prozessführung / Process Dynamics and Operations 
Group<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN style="COLOR: #1f497d">Fakultät Bio- und 
Chemieingenieurwesen</SPAN><SPAN style="COLOR: #1f497d"> / Biochemical and 
Chemical Engineering Department<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN lang=DE style="COLOR: #1f497d">TU 
Dortmund<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN lang=DE style="COLOR: #1f497d">Emil-Figge-Str. 
70<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN lang=DE style="COLOR: #1f497d">44221 Dortmund, 
Germany<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN lang=DE 
style="COLOR: #1f497d"><o:p></o:p></SPAN>&nbsp;</P>
<P class=MsoNormal><SPAN lang=DE style="COLOR: #1f497d">Phone: (+49/0) 231 755 
5165&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
Fax:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (+49/0) 231 755 
5129<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN lang=DE 
style="COLOR: #1f497d">www.dyn.bci.tu-dortmund.de<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN lang=DE><o:p></o:p></SPAN>&nbsp;</P>
<P class=MsoNormal><o:p></o:p>&nbsp;</P></DIV>
<P>
<HR>
_______________________________________________<BR>Ipopt mailing 
list<BR>Ipopt@list.coin-or.org<BR>http://list.coin-or.org/mailman/listinfo/ipopt<BR></DIV></DIV></DIV></BODY></HTML>