<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Hi Stefan,<div>&nbsp;</div><div>I am embarrassed to say that my code had a bug in the way it was handling the options. When I fixed my bug, setting the "<span class="Apple-style-span" style="color: rgb(84, 0, 0); ">suppress_all_output" option to a value of "yes" worked just fine!&nbsp;</span></div><div><span class="Apple-style-span" style="color: rgb(84, 0, 0); "><br></span></div><div><span class="Apple-style-span" style="color: rgb(84, 0, 0); ">&nbsp;I am sorry I put you through the trouble of trying to figure out a non-problem.&nbsp;</span></div><div><font class="Apple-style-span" color="#540000"><br></font><div><div>On Sep 18, 2011, at 7:17 AM, Stefan Vigerske wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div>Hi,<br><br><blockquote type="cite"><blockquote type="cite">I think suppress_all_output option gets active AFTER all options have<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">been read (see IpoptApplication::Initialize(istream&amp;)). So output caused<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">while reading the option file are still printed.<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">You could try to call the IpoptApplication constructor with argument<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">"false". Then you should have no output from the beginning on.<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">I should explain how we are using Ipopt. First we are using the Python wrapper, Pyipopt ( <a href="http://code.google.com/p/pyipopt/">http://code.google.com/p/pyipopt/</a> ). It uses the C interface to Ipopt. So here is sequence of calls:<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><span class="Apple-tab-span" style="white-space:pre">        </span>1. Pyipopt calls CreateIpoptProblem<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><span class="Apple-tab-span" style="white-space:pre">        </span>2. CreateIpoptProblem calls the constructor IpoptApplication with NO arguments. ( So unfortunately, your second idea won't work unless I modify the Ipopt code, which would be easy, but I don't want to start my own fork of Ipopt ! )<br></blockquote><br>If you contribute your modifications back to Ipopt, you may not have to <br>start an own fork :-).<br>E.g., a parameter to pass a user callback function for writing Ipopt <br>messages could be added to CreateIpoptProblem. If given, <br>CreateIpoptProblem could add a journal that uses this callback for <br>writing messages, instead of using the default journal.<br><br>For example, in my code I have a class MyJournal derived from <br>Ipopt:Journal which implements the PrintImpl(), PrintfImpl() and <br>FlushBufferImpl() functions. Then I do<br> &nbsp;&nbsp;&nbsp;ipopt = new IpoptApplication(false);<br> &nbsp;&nbsp;&nbsp;SmartPtr&lt;Journal&gt; jrnl = new MyJournal(gev, "console", <br>J_ITERSUMMARY);<br> &nbsp;&nbsp;&nbsp;jrnl-&gt;SetPrintLevel(J_DBG, J_NONE);<br> &nbsp;&nbsp;&nbsp;if( !ipopt-&gt;Jnlst()-&gt;AddJournal(jrnl) )<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* ERROR */<br><br><br><blockquote type="cite">We don't read the options from a file. Rather we make calls to Pyipopt's add_XXX_option methods which in turn call Ipopt's C interface functions, AddIpoptXXXOption.<br></blockquote><br>Strange that they are called AddIpoptXXXOption if they actually set an <br>option, but do not add further ones.<br><br><blockquote type="cite">I had been setting suppress_all_output to yes after all the other options had been set so I got excited that setting it first might help, but it didn't.<br></blockquote><br>Maybe it works if you first set only suppress_all_output and an iterlim <br>of 0 via the AddIpoptXXXOption and call IpoptSolve(), so it calls the <br>Initialize() function and removes all journals from the <br>IpoptApplication. Afterwards you reset the iterlim to a useful value and <br>set all other options and to the normal IpoptSolver().<br>I haven't tried this workaround.<br><br>Stefan<br><br><blockquote type="cite">I can dig through the Ipopt code some more but that journaling system, while it seems very powerful, is kind of hard to follow! So that's why I was hoping someone would have solved my problem before.<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">Thanks for helping.<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><blockquote type="cite">Stefan<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">Hi,<br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"> &nbsp;For the purposes of some tests, I would like to suppress all output from Ipopt. I am already setting "suppress_all_output" to "yes". But I still get messages like the three below sent to the screen. Is there an option to suppress these too?<br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">( We are making use of Ipopt in a larger system ,<a href="http://openmdao.org/">http://openmdao.org/</a> . Our tests include some intentional errors. We are checking our error handling. )<br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">Thanks in advance for the help!<br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">1. Tried to set Option: invalid_parameter_name. It is not a valid option. Please check the list of available options.<br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">2. &nbsp;Setting: "-99" is not a valid setting for Option: max_iter. Check the option documentation.<br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">3.<br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">### max_iter (Integer) ###<br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">Category: Convergence<br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">Description: Maximum number of iterations.<br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">0&lt;= (3000)&lt;= +inf<br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">...Warning: overflow encountered in double_scalars<br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">_______________________________________________<br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">Ipopt mailing list<br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><a href="mailto:Ipopt@list.coin-or.org">Ipopt@list.coin-or.org</a><br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><a href="http://list.coin-or.org/mailman/listinfo/ipopt">http://list.coin-or.org/mailman/listinfo/ipopt</a><br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">-----------------------<br></blockquote><blockquote type="cite">Herb Schilling<br></blockquote><blockquote type="cite"><a href="mailto:hschilling@nasa.gov">hschilling@nasa.gov</a><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><br></div></blockquote></div><br><div>
<span class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Arial; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: auto; -khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><span class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: auto; -khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><div style="font-family: Helvetica; font-size: 12px; "><span class="Apple-style-span" style="font-family: Helvetica; font-size: 12px; ">-----------------------</span></div><div style="font-family: Helvetica; font-size: 12px; "><span class="Apple-style-span" style="font-family: Helvetica; font-size: 12px; ">Herb Schilling</span></div><div style="font-family: Helvetica; font-size: 12px; "><span class="Apple-style-span" style="font-family: Helvetica; font-size: 12px; "><a href="mailto:hschilling@nasa.gov">hschilling@nasa.gov</a></span></div><div style="font-family: Helvetica; font-size: 12px; "><br class="khtml-block-placeholder"></div><br class="Apple-interchange-newline"></span></span>
</div>
<br></div></body></html>