How to suppress ALL solver output?

548 views
Skip to first unread message

sverkunoff

unread,
Jan 28, 2011, 11:03:31 PM1/28/11
to am...@googlegroups.com
The following used to do the job: (last line because I was using knitro, it also had other options)

option show_stats 0;
option solver_msg 0; 
option knitro_options "outlev=0";

That was on a Windows. Now, I moved to a Mac and the exact same code results in the following output each time 'solve' is issued:

KNITRO 6.0.1: alg=1
honorbnds=1
maxit=3000
maxcrossit=150
ms_enable=0
ms_maxsolves=30
ms_maxbndrange=2
outlev=0

Any ideas on how to silence the solver would be really appreciated (since solve needs to be done thousands of times..)


Richard

unread,
Jan 29, 2011, 11:57:26 PM1/29/11
to AMPL Modeling Language
Unfortunately, as you have seen, the solver name and non-default
option settings still get printed when using Knitro with Ampl even
with "outlev=0" and "option solver_msg 0;" (there is no easy way I
know of to get rid of this printing in the Knitro-Ampl link).

Try changing your "solve" commands to something like

solve >scratch-file;

where scratch-file is the name of some temporary file where the
unwanted output can be sent. Under Unix, "solve >/dev/null"
automatically throws away the unwanted output, but under Windows you
need to redirect output to an actual file.

Best,
Richard Waltz
Ziena Optimization

sverkunoff

unread,
Jan 30, 2011, 3:54:28 PM1/30/11
to am...@googlegroups.com
"solve >/dev/null" together with "option solver_msg 0;" do the job on Mac(Unix).
Thank you Richard!



Reply all
Reply to author
Forward
0 new messages