<!DOCTYPE html PUBLIC '-//W3C//DTD HTML 4.01 Transitional//EN'>
<html>
<head>
<meta http-equiv='Content-Type' content='text/html;charset=us-ascii'>
<style>BODY{font:10pt Tahoma, Verdana, sans-serif;}</style>
</head>
<body>
Guys,<br><br>There was some stuff on the MUMPS list about this kind of thing a few weeks ago. It's supposed to be fixed in MUMPS 4.8.0 which was released last week. I haven't had the chance to run 4.8.0 in IPOPT yet but I'll try this weekend.<br><br>Damien <br><blockquote style="border-left: 2px solid rgb(0, 0, 255); padding-left: 5px; margin-left: 5px; margin-right: 0px;"><hr><b>From:</b> Andreas Waechter [mailto:andreasw@watson.ibm.com]<br><b>To:</b> Krish Krishnan [mailto:rkrishnan8216@yahoo.com]<br><b>Cc:</b> ipopt@list.coin-or.org<br><b>Sent:</b> Fri, 01 Aug 2008 09:05:13 -0600<br><b>Subject:</b> Re: [Ipopt] A large optimization problem<br><br>Hi Krish,<br>
<br>
Did you run your code through a memory checker? Is this first element <br>
in IRN being set in your code?<br>
<br>
We have been using MUMPS for a few years now, and it seems to run very <br>
robustly. However, Stefan in his posting seems to indicate that MUMPS <br>
crashes (but I doubt that this is a hard crash like a seg fault, or rather <br>
some problem like exceeding memory). You could of course try to see what <br>
happens when you use MA27 as an experiment.<br>
<br>
But I would carefully check if you are setting the values correctly in <br>
your method that are called by Ipopt to get the sparsity pattern. Maybe <br>
for some reason you skip the first entry. It might really be helpful to <br>
run your code with a derivative checker (like valgrind on windows) on a <br>
preferrably small instance of your problem (otherwise you have to wait <br>
forever) - if you do that, I would set the Ipopt print_level very high, so <br>
that it will print out the values of the Jacobian and Hessian as well, and <br>
if there is something uninitialized, valgrind would complain about before <br>
the problem is detected in MUMPS.<br>
<br>
Regards,<br>
<br>
Andreas<br>
<br>
<br>
On Fri, 1 Aug 2008, Krish Krishnan wrote:<br>
<br>
> Hi all:<br>
><br>
> I have a rather large portfolio optimization problem. I am trying to use IpOpt with Mumps (due to licensing issues).<br>
> I first outline the steps to create the problem.<br>
><br>
> I derive a class COpt from IpOpt.<br>
> An instance of COpt is p_optdata<br>
><br>
> I next create the two smart pointers as follows:<br>
> SmartPtr<COpt> p_optdata;<br>
> SmartPtr<TNLP> p_optdata_tnlp;<br>
><br>
> p_optdata = new COpt();<br>
> p_optdata_tnlp = GetRawPtr(p_optdata);<br>
><br>
> I set up the problem as follows:<br>
><br>
> void CBMOptDoc::optimize()<br>
> {<br>
> // Create an instance of the IpoptApplication<br>
> SmartPtr<IpoptApplication> app = new IpoptApplication(false, false);<br>
> // Initialize the IpoptApplication and process the options<br>
> ApplicationReturnStatus status;<br>
> status = app->Initialize();<br>
> if (status != Solve_Succeeded)<br>
> {<br>
> AfxMessageBox("Error during initialization");<br>
> return;<br>
> }<br>
> status = app->OptimizeTNLP(p_optdata_tnlp);<br>
><br>
> if (status == Solve_Succeeded)<br>
> {<br>
> Index iter_count = app->Statistics()->IterationCount();<br>
> Number final_obj = app->Statistics()->FinalObjective();<br>
> }<br>
> }<br>
><br>
><br>
><br>
><br>
><br>
> bool COpt::get_nlp_info(Index& n, Index& m, Index& nnz_jac_g,<br>
> Index& nnz_h_lag, IndexStyleEnum& index_style)<br>
> {<br>
> int nassets = ml.m_nAssets;<br>
> int kvars = nRI + nInd;<br>
> n = 2 * nassets;<br>
><br>
> m = 4 + kvars;<br>
><br>
> // nonzeros in the jacobian,<br>
> nnz_jac_g = (7 + 2 * kvars) * nassets ;<br>
><br>
> // and nonzeros in the hessian of the lagrangian<br>
> nnz_h_lag = (2 * nassets + 1) * (nassets + 1);<br>
><br>
> // We use the C index style for row/col entries<br>
> index_style = C_STYLE;<br>
><br>
> return true;<br>
> }<br>
><br>
><br>
><br>
> Here nassets = 501, kvars = 22 so the number of non-zeros are fairly <br>
> large. I provide the needed jacobians and hessians.<br>
><br>
> When I get into app->OptimizeTNLP(p_optdata_tnlp), the application gets <br>
> as far as line 1022 of dmumps-part7.f and crashes. The reason is that <br>
> the arrays IRN and ICN in the module are corrupted . A partial look at <br>
> IRN shows that IRN(1) has garbage in it.<br>
><br>
> - IRN {...} INTEGER(4)<br>
> IRN(1) -842150450 INTEGER(4)<br>
> IRN(2) 1 INTEGER(4)<br>
> IRN(3) 2 INTEGER(4)<br>
> IRN(4) 2 INTEGER(4)<br>
> IRN(5) 3 INTEGER(4)<br>
> IRN(6) 3 INTEGER(4)<br>
><br>
> Similarly ICN is also corrupted at ICN(1).<br>
><br>
> Any thoughts on where I could be going wrong? Appreciate your help as I have put in a lot of effort over the last two months on this.I wouldn't have gotten this far without your feedback. If needed I can provide the jacobian and hessians.<br>
><br>
> Thanks a lot.<br>
><br>
> Krish<br>
><br>
><br>
><br>
><br>
_______________________________________________<br>
Ipopt mailing list<br>
<a href="mailto:Ipopt@list.coin-or.org">Ipopt@list.coin-or.org</a><br>
<a href="http://list.coin-or.org/mailman/listinfo/ipopt" target="_blank">http://list.coin-or.org/mailman/listinfo/ipopt</a><br>
</blockquote><style>
</style>
</body></html>