ApplicationError: Solver (gurobi) did not exit normally

1,187 views
Skip to first unread message

Cord Wayne

unread,
Nov 19, 2015, 4:05:26 AM11/19/15
to Gurobi Optimization
When solving a specific MIP problem with Pyomo (www.pyomo.org) it always returns an application error "ApplicationError: Solver (gurobi) did not exit normally" and shows "Killed  ERROR:pyomo.opt:Solver (gurobi) returned non-zero return code (137)".

If I change the parametrization (in reality this means changing the power plant configuration or the calculated year) everything works fine. But this specific configuration and year always returns an error.

I have already tried to track down the problem by reading the solver logs (see below) and applying "bisection methods" on the date range but couldn't find anything.

If the problem was infeasible, the solver should detect it in advance, right?

An what about the "Killed" which confuses me? Might this be a resource problem?

Does anyone have an idea how to proceed here? 

I don't have any idea how to deal with this..

Thanks in advance!

Cord

Example solver output from the IPython console:

Model creation: 9.60323 seconds
Read MIP start from file /tmp/tmpfutzluqs.gurobi.mst
Changed value of parameter MIPGap to 0.01
  Prev: 0.0001   Min: 0.0   Max: 1e+100   Default: 0.0001
Parameter MIPGap unchanged
  Value: 0.01   Min: 0.0   Max: 1e+100   Default: 0.0001
Changed value of parameter Threads to 3
  Prev: 0   Min: 0   Max: 1024   Default: 0
Optimize a model with 986701 rows, 712801 columns and 2290197 nonzeros
Coefficient statistics:
 Matrix range    [7e-02, 2e+02]
 Objective range [6e-04, 1e+02]
 Bounds range    [1e+00, 1e+05]
 RHS range       [1e+00, 3e+02]
Found heuristic solution: objective 0
Presolve removed 726436 rows and 593571 columns (presolve time = 5s) ...
Presolve removed 726442 rows and 593571 columns
Presolve time: 6.26s
Presolved: 260259 rows, 119230 columns, 690074 nonzeros
Variable types: 100495 continuous, 18735 integer (18735 binary)

Root simplex log...

Iteration    Objective       Primal Inf.    Dual Inf.      Time
      0   -2.4559068e+07   2.261496e+09   0.000000e+00     24s
    169   -1.7606861e+07   2.823654e+07   0.000000e+00     25s
   5242   -1.4826060e+07   1.672497e+07   0.000000e+00     30s
  14010   -1.3192078e+07   3.266407e+05   0.000000e+00     35s
  22625   -1.1958037e+07   1.531109e+05   0.000000e+00     40s
  28927   -1.1066910e+07   1.015503e+05   0.000000e+00     45s
  36599   -1.0293613e+07   7.529557e+04   0.000000e+00     50s
  45461   -9.7121069e+06   8.767160e+04   0.000000e+00     55s
  52422   -9.5778343e+06   1.051676e+04   0.000000e+00     60s
  55733   -9.4529572e+06   1.742050e+05   0.000000e+00     65s
  57103   -9.4526450e+06   6.044692e+03   0.000000e+00     71s
  59921   -9.3341047e+06   7.983680e+04   0.000000e+00     76s
  62387   -9.2381655e+06   3.772892e+04   0.000000e+00     80s
  64602   -9.1813306e+06   0.000000e+00   0.000000e+00     82s

Root relaxation: objective -9.181331e+06, 64602 iterations, 75.63 seconds
Total elapsed time = 93.10s
Total elapsed time = 95.65s
Total elapsed time = 100.05s

    Nodes    |    Current Node    |     Objective Bounds      |     Work
Expl Unexpl |  Obj  Depth IntInf | Incumbent    BestBd   Gap | It/Node Time

     0     0 -9181330.6    0 3690 -1752547.2 -9181330.6   424%     -  102s
    0     0 -9063675.1    0 1847 -1752547.2 -9063675.1   417%     -  140s
    0     0 -9058644.2    0 1806 -1752547.2 -9058644.2   417%     -  144s
    0     0 -9058160.6    0 1795 -1752547.2 -9058160.6   417%     -  148s
    0     0 -9058123.7    0 1801 -1752547.2 -9058123.7   417%     -  150s
    0     0 -9058119.8    0 1788 -1752547.2 -9058119.8   417%     -  158s
    0     0 -9058114.1    0 1789 -1752547.2 -9058114.1   417%     -  163s
    0     0 -9058114.1    0 1789 -1752547.2 -9058114.1   417%     -  168s
    0     0 -9058114.1    0 1789 -1752547.2 -9058114.1   417%     -  172s
    0     2 -9058114.1    0 1789 -1752547.2 -9058114.1   417%     -  484s
    5     8 -9057941.4    4 1785 -1752547.2 -9058096.8   417%   9.2  485s
    9    13 -9057911.0    5 1784 -1752547.2 -9058026.5   417%  46.2 1110s
   12    23 -9057883.8    6 1900 -1752547.2 -9058026.5   417%  55.4 1148s
Killed
ERROR:pyomo.opt:Solver (gurobi) returned non-zero return code (137)
ERROR:pyomo.opt:See the solver log above for diagnostic information.
ERROR: "[base]/dist-packages/pyomo/opt/base/solvers.py", 428, solve
       Solver (gurobi) returned non-zero return code (137)
ERROR: "[base]/dist-packages/pyomo/opt/base/solvers.py", 431, solve
       See the solver log above for diagnostic information.
Traceback (most recent call last):

  File "<ipython-input-14-0bef73900473>", line 1, in <module>
   runfile('/home/cord/Programmierung/DLSK/Kraftwerksmodell_Generisch/opt_main_error.py', wdir='/home/cord/Programmierung/DLSK/Kraftwerksmodell_Generisch')

  File "/usr/lib/python3/dist-packages/spyderlib/widgets/externalshell/sitecustomize.py", line 586, in runfile
   execfile(filename, namespace)

  File "/usr/lib/python3/dist-packages/spyderlib/widgets/externalshell/sitecustomize.py", line 48, in execfile
   exec(compile(open(filename, 'rb').read(), filename, 'exec'), namespace)

  File "/home/cord/Programmierung/DLSK/Kraftwerksmodell_Generisch/opt_main_error.py", line 1019, in <module>
   results = opt.solve(instance, warmstart=True, tee=True)

  File "/usr/local/lib/python3.4/dist-packages/pyomo/opt/base/solvers.py", line 435, in solve
   "Solver (%s) did not exit normally" % self.name )

ApplicationError: Solver (gurobi) did not exit normally



Sonja Mars

unread,
Nov 19, 2015, 6:35:21 AM11/19/15
to gur...@googlegroups.com
Hi Cord,

This is strange. Can you try to export your model as an MPS file and then run it using gurobi_cl. To export your model you can use the Gurobi option Resultfile=myModel.mps

So for example if you have some python code that uses pyomo, they you can modify your call to Pyomo's solve function like this:
results = opt.solve(instance, options="resultfile=myModel.mps”)

This should write an MPS file.

Then you can solve this file with

gurobi_cl myModel.mps

If the behavior is still the same and your process gets killed again, please send that model file to sup...@gurobi.com

Thanks and best regards,
Sonja

-----------------------------------------------------------------
Dr. Sonja Mars
Gurobi Optimization
> --
>
> ---
> You received this message because you are subscribed to the Google Groups "Gurobi Optimization" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to gurobi+un...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

Cord Wayne

unread,
Nov 19, 2015, 10:20:23 AM11/19/15
to Gurobi Optimization
Hi Sonja,

the export via *.mps did not work because the solver threw out an error before writing a file.

But I took the *.lp file which is written in advance and tried to solve it using gurobi_cl with the same result:

cord@crd-Laptop:~/Programmierung/DLSK/Kraftwerksmodell_Generisch$ gurobi_cl /tmp/tmprb6dip_3.pyomo.lp

Gurobi Optimizer version 6.0.4 build v6.0.4rc0 (linux64)
Copyright (c) 2015, Gurobi Optimization, Inc.

Read LP format model from file /tmp/tmprb6dip_3.pyomo.lp
Reading time = 3.49 seconds
(null): 1313209 rows, 948673 columns, 3048045 nonzeros
Optimize a model with 1313209 rows, 948673 columns and 3048045 nonzeros
Coefficient statistics:
  Matrix range    [7e-02, 2e+02]
  Objective range [6e-04, 1e+02]
  Bounds range    [1e+00, 1e+05]
  RHS range       [1e+00, 3e+02]
Found heuristic solution: objective 0
Presolve removed 1010498 rows and 787930 columns (presolve time = 5s) ...
Presolve removed 1010499 rows and 787930 columns
Presolve time: 7.51s
Presolved: 302710 rows, 160743 columns, 833750 nonzeros
Variable types: 134964 continuous, 25779 integer (25779 binary)

Root simplex log...

Iteration    Objective       Primal Inf.    Dual Inf.      Time
       0   -3.8226035e+07   3.876934e+09   0.000000e+00     38s
    2493   -2.5508226e+07   1.748985e+06   0.000000e+00     40s
   18260   -2.1140330e+07   4.553736e+05   0.000000e+00     45s
   39351   -1.7792543e+07   2.159534e+05   0.000000e+00     50s
   58300   -1.6677772e+07   1.045831e+05   0.000000e+00     55s
   72775   -1.6203836e+07   1.910451e+05   0.000000e+00     60s
   89076   -1.5641163e+07   0.000000e+00   0.000000e+00     65s

Root relaxation: objective -1.564116e+07, 89076 iterations, 57.75 seconds
Total elapsed time = 75.00s
Total elapsed time = 77.23s

    Nodes    |    Current Node    |     Objective Bounds      |     Work
 Expl Unexpl |  Obj  Depth IntInf | Incumbent    BestBd   Gap | It/Node Time

     0     0 -1.564e+07    0 5169 -2133797.0 -1.564e+07   633%     -   77s
     0     0 -1.548e+07    0 2581 -2133797.0 -1.548e+07   625%     -  141s
     0     0 -1.547e+07    0 2450 -2133797.0 -1.547e+07   625%     -  149s
     0     0 -1.547e+07    0 2441 -2133797.0 -1.547e+07   625%     -  153s
     0     0 -1.547e+07    0 2441 -2133797.0 -1.547e+07   625%     -  156s
     0     0 -1.547e+07    0 2415 -2133797.0 -1.547e+07   625%     -  165s
     0     0 -1.547e+07    0 2415 -2133797.0 -1.547e+07   625%     -  171s
     0     0 -1.547e+07    0 2415 -2133797.0 -1.547e+07   625%     -  178s
     0     0 -1.547e+07    0 2415 -2133797.0 -1.547e+07   625%     -  183s
     0     2 -1.547e+07    0 2415 -2133797.0 -1.547e+07   625%     -  700s
    12    20 -1.547e+07    8 2406 -2133797.0 -1.547e+07   625%  51.6  742s
Getötet
cord@crd-Laptop:~/Programmierung/DLSK/Kraftwerksmodell_Generisch$ 


"Getötet" in German means "killed" in English so it's the same result as the way via Pyomo.

I'll write an e-mail to the support now.

Thanks!

Cord
Reply all
Reply to author
Forward
0 new messages