Friday, February 11, 2011

GAMS/Cplex out of memory: no solution

After running a model for a long time I see:

   4137  1636        cutoff         512716.0000   514293.0971   903786    0.31%
   4203  1671   512839.0257 10501   512716.0000   514291.4522   907404    0.31%
Compressing row and column files.
CPLEX Error  1001: Out of memory.

Gomory fractional cuts applied:  7
Warning: MIP starts not constructed because of out-of-memory status.
MIP status(109): error termination
*** CPLEX Error  1001: Out of memory.

Fixing integer variables, and solving final LP...
Tried aggregator 1 time.
LP Presolve eliminated 89702 rows and 45151 columns.
All rows and columns eliminated.
Presolve time =    0.05 sec.
CPLEX Error  1001: Out of memory.
Fixed MIP status(0):
*** CPLEX Error  1001: Out of memory.

OK, no problem, just give me the best solution you found so far… But the GAMS listing file says:

**** SOLVER STATUS     4 Terminated By Solver     
**** MODEL STATUS      14 No Solution Returned    
**** OBJECTIVE VALUE                0.0000

That is of course very bad.

This is probably more a problem with the GAMS link than with Cplex per se. The link should not run the final LP in case the MIP was running out of memory. This final LP is just there to calculate duals which are in most cases not used anyway. Without running the final LP indeed the best solution will be returned if Cplex runs out of memory.

Another issue with this final LP is discussed here: http://yetanothermathprogrammingconsultant.blogspot.com/2010/04/gamscplex-final-solve-can-be-expensive.html.

1 comment:

  1. There are a few things that you can do to reduce memory requirements: reduce the number of threads for parallel MIP, swap to nodefiles, and move to a 64-bit system if possible. These ideas apply both to CPLEX and Gurobi.

    ReplyDelete