[Gurobi] timelim doesn't stop gurobi

625 views
Skip to first unread message

Gianluca Brandinu

unread,
May 7, 2010, 7:59:26 AM5/7/10
to Gurobi Optimization
Hi

We are running an AMPL-Gurobi combination with Gurobi version 3.0.0.
We tried solving a problem and set the timelim to 80000 seconds.
Unfortunately Gurobi didn't stop running so we had to interrupt. Why
didn't timelim kick in after 80000 seconds?

Thanks for your answers.

Gianluca

Greg Glockner

unread,
May 7, 2010, 8:00:39 PM5/7/10
to gur...@googlegroups.com
Setting timelim should make Gurobi stop after the specified number of seconds. However, the timelim option only affects Gurobi processing - it has no effect on building the model in AMPL. So it's possible your code is taking a long time in AMPL before the model is passed to Gurobi.

To show AMPL timing, you should set:

option gentimes 1;

You should also turn on the Gurobi logfile via the following option:

option gurobi_options 'outlev 1';

Both of these statements should be done before the solve statement.

This should cover both of your questions.

Gianluca Brandinu

unread,
May 8, 2010, 5:02:41 AM5/8/10
to Gurobi Optimization
Thanks for your quick answer!

This was exactly what I was looking for!

godless

unread,
Sep 22, 2013, 1:31:10 PM9/22/13
to gur...@googlegroups.com, gloc...@gurobi.com
Hi Greg,
 
I dont't think your answer is meaningful.Your suggestion is just showing more status. Most time, AMPL processing before calling gurobi needs very short time. We also observe AMPL/Gurobi 5.5 does not follow timelim. For example
 
option gurobi_options "mipgap=0.01 timelim=60";
 
ampl/gurobi stops after 120 seconds
 
option gurobi_options "mipgap=0.01 timelim=180";
 
ampl/gurobi hangs up forever.
 
Godless

Greg Glockner

unread,
Sep 22, 2013, 3:38:51 PM9/22/13
to gur...@googlegroups.com
> Most time, AMPL processing before calling gurobi needs very short time.

Perhaps in your case but not in all cases.


> We also observe AMPL/Gurobi 5.5 does not follow timelim.

There are many possible causes of this; the way to understand this is to share the logs as suggested.

Robert Fourer

unread,
Sep 25, 2013, 10:54:25 AM9/25/13
to gur...@googlegroups.com

I strongly advise setting

 

  option gurobi_options "mipgap=0.01 timelim=60 outlev=1 logfreq=5 timing=1";

 

so you can see how much time Gurobi actually claims to be taking -- you'll see the time recorded at the end of each log line, and also in a summary at the end.  If the total time shown is very different from 60 seconds then you can post the entire log to get some help.

 

I have never known Gurobi to "hang up forever" but sometimes it does take much longer than you want to wait.  Again it is necessary to use the outlev option to get some information about what is happening.

 

Bob Fourer

4...@ampl.com

  

 

From: gur...@googlegroups.com [mailto:gur...@googlegroups.com]

On Behalf Of godless
Sent: Sunday, September 22, 2013 12:31 PM
To: gur...@googlegroups.com
Cc: gloc...@gurobi.com
Subject: Re: [Gurobi] timelim doesn't stop gurobi

 

. . . We also observe AMPL/Gurobi 5.5 does not follow timelim. For example

Reply all
Reply to author
Forward
0 new messages