Location of gurobi log files

1,434 views
Skip to first unread message

Stuart Mitchell

unread,
May 30, 2012, 11:55:14 PM5/30/12
to gur...@googlegroups.com
Hi have an environment where several python processes (over several computers) run in the same dropbox directory.

Unfortunately, when the gurobi library is imported

>>> import gurobipy

the 'gurobi.log' file that is created becomes conflicted as multiple processes try to open this file.
After I import gurobi I move the log file elsewhere using the LogFile parameter.

Is there a configuration file or environment variable that I can use to move the location of the initial 'gurobi.log' out of the current directory?

Stu

--
Stuart Mitchell
PhD Engineering Science
Extraordinary Freelance Programmer and Optimisation Guru

Greg Glockner

unread,
Jun 4, 2012, 7:07:03 PM6/4/12
to gur...@googlegroups.com
> Is there a configuration file or environment variable that I can use to move the location of the initial 'gurobi.log' out of the current directory?

Your workaround is the recommended solution: change the value of the LogFile parameter, and the log will be opened at the new location. Do this immediately after launching the interactive shell (gurobi.sh or gurobi.bat) or after importing gurobipy.

Stuart Mitchell

unread,
Jun 4, 2012, 7:17:20 PM6/4/12
to gur...@googlegroups.com
Unfortunately it will still create an empty gurobi.log file before I can change the parameter, and this file is giving us dropbox conflicts.

Stu


On Tue, Jun 5, 2012 at 11:07 AM, Greg Glockner <gloc...@gurobi.com> wrote:
> Is there a configuration file or environment variable that I can use to move the location of the initial 'gurobi.log' out of the current directory?

Your workaround is the recommended solution: change the value of the LogFile parameter, and the log will be opened at the new location.  Do this immediately after launching the interactive shell (gurobi.sh or gurobi.bat) or after importing gurobipy.




Greg Glockner

unread,
Jun 4, 2012, 7:28:59 PM6/4/12
to gur...@googlegroups.com
> Unfortunately it will still create an empty gurobi.log file before I can change the parameter, and this file is giving us dropbox conflicts.

Why not try the following:

1. Launch Gurobi
2. Change the location of the logfile
3. Delete the initial default logfile

This should avoid any issues with Dropbox conflicted copies.

Stuart Mitchell

unread,
Jun 4, 2012, 7:29:47 PM6/4/12
to gur...@googlegroups.com
Ok thanks

Stu

Vishal Gupta

unread,
Jan 11, 2014, 1:58:54 PM1/11/14
to gur...@googlegroups.com
Hi All, 
I have a question about gurobi's default behavior with log files related to Stuart's issue.  

I have multiple processes running on the same computer, each of which is solving a (different) optimization problem.  I have not changed the default logging behavior.  Will these processes run into an I/O bottleneck when gurobi tries to access the "gurobi.log" file?  How does it handle the conflict?  What's the recommended workaround? Would specifying an explicit log file via the LogFile parameter for each process be enough?

If it matters, I, too, am calling gurobi via the gurobipy interface.

Vishal Gupta
Operations Research Center
Massachusetts Institute of Technology

Ed Rothberg

unread,
Jan 12, 2014, 4:18:30 PM1/12/14
to gur...@googlegroups.com

There's nothing wrong with having multiple processes write to the same file, as long as you don't mind the output being interleaved.  As you suggest, you can choose a different log file name for each process if you want to avoid the interleaving.

Ed



Reply all
Reply to author
Forward
0 new messages