[Ipopt] Suppressing Ipopt output in a loop
Jacek Blaszczyk
J.Blaszczyk at elka.pw.edu.pl
Tue Sep 17 13:57:15 EDT 2013
Hi All,
I am using the flowing line to suppress printing startup message
of Ipopt:
app->Options()->SetStringValue("sb","yes");
I have found this solution by analyzing the source code of Ipopt.
Best Regards,
Jacek Blaszczyk
> 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
More information about the Ipopt
mailing list