gurobi.log file

1,904 views
Skip to first unread message

Gabe

unread,
Aug 18, 2011, 6:09:26 PM8/18/11
to Gurobi Optimization
I have the python API installed for Gurobi 4.5.1 and everything is
working great. I do, however, get a little annoyed by the gurobi.log
file that gets created everywhere I run my applications. Is it
possible to setup a default location where this file will be written
each time. I'm using linux, so maybe somewhere like /tmp/ ?

Greg Glockner

unread,
Aug 18, 2011, 6:50:58 PM8/18/11
to gur...@googlegroups.com
The log is controlled via the LogFile parameter.

If you want to permanently set the location of the LogFile parameter, you could either modify the gurobi.env file, or modify gurobi.sh to set LogFile upon initialization via the global setParam() function.

Greg Glockner

unread,
Aug 18, 2011, 7:33:43 PM8/18/11
to gur...@googlegroups.com
Sorry, I rechecked the software. My previous suggestions will set the logfile to a different location. However, they will not prevent Gurobi from writing an initial logfile (gurobi.log) in the current working directory. Guess the best thing is to call the following Python code:

setParam('LogFile', '/path/to/your/logfile/gurobi.log')
import os
os.unlink('gurobi.log')

If you're using the interactive shell, you could automate this by adding it to gurobi.py.

Gabe

unread,
Aug 18, 2011, 9:25:47 PM8/18/11
to Gurobi Optimization
Thank you

Greg Glockner

unread,
Nov 5, 2012, 4:22:07 PM11/5/12
to gur...@googlegroups.com
> Is not being able to prevent an initial log file from being written deemed a bug or a feature? I would hope the former.

It's only an issue for the Python API. See previous posts in this thread for a workaround.

brandon willard

unread,
Jun 5, 2014, 2:02:59 PM6/5/14
to gur...@googlegroups.com
I'm seeing the same thing with gurobi_cl.


On Monday, November 5, 2012 4:34:19 PM UTC-6, Hamish Waterer wrote:


> Is not being able to prevent an initial log file from being written deemed a bug or a feature? I would hope the former.

It's only an issue for the Python API.  See previous posts in this thread for a workaround.

So it's a bug. :)

Greg Glockner

unread,
Jun 5, 2014, 2:06:58 PM6/5/14
to gur...@googlegroups.com
This is a known issue with the interactive versions. Except for Python, it is not an issue for the APIs.

Reply all
Reply to author
Forward
0 new messages