[Ipopt] Suppressing Ipopt output in a loop

Brad Bell bradbell at seanet.com
Tue Sep 17 13:24:25 EDT 2013


I have also run into this problem; see
     http://list.coin-or.org/pipermail/ipopt/2009-June/001578.html

I have been dealing with this by automatically modifying the source code 
each time I download it. To be specific,
I use the following snippet of a bash script:

#
# patch Ipopt source so that it does not print message every time it runs
file="Ipopt/src/Algorithm/IpIpoptAlg.cpp"
comment="// Bradley M. Bell 2009-07-01: Suppress printing startup message"
if ! grep "$comment" $file > /dev/null
then
      echo "sed -istamp $file ..."
      sed -istamp $file -e \
      "s|\(.* bool.*[ _]message_printed *= *\)false;|$comment\n\/\/&\n\1 
true;|"
fi
if ! grep "$comment" $file > /dev/null
then
      echo "Suppression of message printing failed"
      exit 1
else
      echo "Suppression of message printing succeeded"
fi



On 9/16/2013 2:59 PM, Nittin Arora wrote:
> I am running Ipopt in a loop and every time I call ipopt I get the 
> following msg:
>
> "
> ******************************************************************************
> This program contains Ipopt, a library for large-scale nonlinear 
> optimization.
>  Ipopt is released as open source code under the Eclipse Public 
> License (EPL).
>          For more information visit http://projects.coin-or.org/Ipopt
> ******************************************************************************
>
> NOTE: You are using Ipopt by default with the MUMPS linear solver.
>       Other linear solvers might be more efficient (see Ipopt 
> documentation).
> "
>
> I have set the print level to 0. But this msg doesn't go away. I am 
> not sure how to suppress this. Can someone help please ? I understand 
> that msg may appear on the first call but on every call makes it 
> difficult to use Ipopt in a loop.
>
> Thanks,
>
> Nitin

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://list.coin-or.org/pipermail/ipopt/attachments/20130917/4ff2213d/attachment.html>


More information about the Ipopt mailing list