Stopping Gurobi prints on stdout

4,075 views
Skip to first unread message

Akhil

unread,
Dec 7, 2010, 9:50:04 PM12/7/10
to Gurobi Optimization
I am using Gurobi 4.0 (academic license) on Linux. Is there any way to
stop the printouts that the gurobi does on the standard output while
solving the LP?
The prints on the screen/ file affect performance of the program. Can
we stop it?

Greg Glockner

unread,
Dec 8, 2010, 6:02:53 PM12/8/10
to gur...@googlegroups.com
Set the OutputFlag parameter to 0. See:

http://www.gurobi.com/doc/40/refman/node572.html

Kris

unread,
Dec 9, 2010, 11:27:11 PM12/9/10
to Gurobi Optimization
Hi Greg

Documentation
http://www.gurobi.com/doc/40/refman/node572.html
is wrong with regard to OutputFlag:

"OutputFlag int 1 0 1 Enables or disables solver output."

This says that the optimal solution itself is suppressed.
(It does not say that stdout is suppressed.)

The balance of parameter documentation, on that page, is incomplete.

Kris

Greg Glockner

unread,
Dec 10, 2010, 12:17:54 AM12/10/10
to gur...@googlegroups.com
> "OutputFlag int 1 0 1 Enables or disables solver output."
>
> This says that the optimal solution itself is suppressed.
> (It does not say that stdout is suppressed.)

"Solver output" indicates the log information, not the solution values.
OutputFlag = 1 means that the log information is written to the screen (stdout).
OutputFlag = 0 means that the log information is not written to the screen (stdout).

Akhil

unread,
Dec 17, 2010, 2:49:51 PM12/17/10
to Gurobi Optimization
Can anyone please tell what exactly I need to do to reset this flag. I
tried some options but I am getting compiler errors e.g.

model.set(GRB_IntParam_OutputFlag, 0); -- this does not work

Thanks,
AKhil

Zonghao Gu

unread,
Dec 17, 2010, 7:38:54 PM12/17/10
to gur...@googlegroups.com
Try
model.getEnv().set(GRB_IntParam_OutputFlag, 0);

Akhil

unread,
Dec 19, 2010, 5:50:06 PM12/19/10
to Gurobi Optimization
Thanks a lot, that worked!!

On Dec 17, 6:38 pm, Zonghao Gu <g...@gurobi.com> wrote:
> Try
> model.getEnv().set(GRB_IntParam_OutputFlag, 0);
>

G Abouelseoud

unread,
Dec 5, 2017, 7:15:36 AM12/5/17
to Gurobi Optimization
I have the same problem. However, despite trying suggested solutions, I still keep getting the message:
Changed value of parameter TimeLimit to 60.0
   Prev: 1e+100  Min: 0.0  Max: 1e+100  Default: 1e+100

How can I stop such message?

G Abouelseoud

unread,
Dec 5, 2017, 7:26:07 AM12/5/17
to Gurobi Optimization
I found a solution at: https://github.com/opencobra/cobrapy/issues/248
simply the verbosity stopping should be at the very start of the code so that no messages are displayed as result of running future commands.
Reply all
Reply to author
Forward
0 new messages