Remove output messages

354 views
Skip to first unread message

Andres Codas

unread,
Jul 19, 2011, 8:54:29 AM7/19/11
to AMPL Modeling Language
Hi,

I'm solving a batch of easy problems, and I would like to suppress
all presolve messages and cplex messages output to the console.

How can i do this?

Thanks

Andres

Paul

unread,
Jul 20, 2011, 7:59:48 PM7/20/11
to am...@googlegroups.com
http://bit.ly/ohqflE

You can search this group for other replies -- it's a FAQ.

Paul

Andres Codas

unread,
Jul 23, 2011, 8:39:05 AM7/23/11
to AMPL Modeling Language
Paul,

Thanks for your quick response, in fact I saw that thread before.

Since in the batch of easy problems most of them are infeasible, I'm
using the options:

option presolve_warnings 100000000000000;
option eexit -10000000000;
option solver_msg 0;

And then when solving I do:

solve > solveOutput.txt;

However I can still see the presolve messages like:


suffix dunbdd OUT;
presolve: constraint pressDef cannot hold:
body >= 0 cannot be <= -64.4445; difference = 64.4445
1 presolve messages suppressed.
2 presolve messages suppressed.
1 presolve messages suppressed.
1 presolve messages suppressed.
1 presolve messages suppressed.
1 presolve messages suppressed.
3 presolve messages suppressed.
2 presolve messages suppressed.
2 presolve messages suppressed.
9 presolve messages suppressed.
2 presolve messages suppressed.
Setting $presolve_eps >= 1.4e-10 might help.
2 presolve messages suppressed.
Setting $presolve_eps >= 1.4e-10 might help.
4 presolve messages suppressed.

Is it possible to remove these messages?

Thanks again

Andres

Paul

unread,
Jul 23, 2011, 5:15:14 PM7/23/11
to am...@googlegroups.com
I'm not positive, but I don't think so.  CPLEX is a chatty little bugger, and even if you redirect stdout to /dev/null or a log file, I think it writes some status messages to stderr (and hence to the screen).  I think it should be possible to redirect stderr to stdout in the command line that runs AMPL (exactly how is probably operating system dependent); doing that and redirecting output to a file in the solve command (which temporarily reroutes stdout) might work, but I've never tried it.

Paul

Robert Fourer

unread,
Jul 27, 2011, 7:13:59 PM7/27/11
to am...@googlegroups.com
All of the presolve output, including the summaries of messages suppressed,
should be suppressed by setting "option presolve_warnings -1". (This is
reported in www.netlib.org/ampl/changes but is not mentioned in the AMPL
book.)

We are checking into why "suffix dunbdd OUT;" appears even when the solve
output is redirected. However if you do not have need for the values in the
dual unboundedness ray (which are given by appending the suffix .dunbdd)
then you can suppress this message by adding 'rays 0' to the cplex_options
string. In any case this message will appear only once per run.

Bob Fourer
4...@ampl.com

AMPL Optimization

unread,
Aug 6, 2011, 3:17:24 PM8/6/11
to am...@googlegroups.com, 4...@ampl.com
A better way to suppress the "suffix dunbdd OUT;" message is to declare 

     suffix dunbdd;

or

      suffix dunbdd OUT; 
once in your script, before the first "solve;" where the suffix might be relevant.  Then the solver doesn't have to create this suffix and won't issue the unwanted message saying that it has been created.  This works whether or not your script actually uses the dual ray.
 
Reply all
Reply to author
Forward
0 new messages