CPLEX ran out of memory even after nodefile=3!!!

188 views
Skip to first unread message

Amir Lm

unread,
Nov 10, 2016, 1:25:56 PM11/10/16
to AMPL Modeling Language
Hi all,

CPLEX is giving me the memory error as follows.

CPLEX 12.6.1.0: ran out of memory.
0 MIP simplex iterations
0 branch-and-bound nodes
No basis.

I have put the command below.

ampl: model IntM-S.mod;
ampl: data IntM-S.dat;
ampl: options solver cplex;
ampl: option show_stats 1;
ampl: option cplex_options 'mipdisplay=2 nodefile=3';
ampl: solve;

and CPLEX gave the the presolve of:

Presolve eliminates 277 constraints and 955 variables.
Adjusted problem:
2695 variables:
2340 binary variables
25 integer variables
330 linear variables
902 constraints, all linear; 21926 nonzeros
385 equality constraints
517 inequality constraints
1 linear objective; 2180 nonzeros.

CPLEX 12.6.1.0: mipdisplay=2
nodefile=3
MIP Presolve eliminated 228 rows and 180 columns.
MIP Presolve modified 445 coefficients.
Reduced MIP has 519 rows, 2360 columns, and 13704 nonzeros.
Reduced MIP has 2335 binaries, 13 generals, 0 SOSs, and 0 indicators.
Probing time = 0.03 sec. (3.30 ticks)
MIP Pre solved modified 30 coefficients.
Reduced MIP has 519 rows, 2360 columns, and 13704 nonzeros.
Reduced MIP has 2335 binaries, 13 generals, 0 SOSs, and 0 indicators.
Probing time = 0.03 sec. (3.20 ticks)
Clique table members: 8227.
MIP emphasis: balance optimality and feasibility.
MIP search method: dynamic search.
Parallel mode: deterministic, using up to 4 threads.
Root relaxation solution time = 0.08 sec. (17.02 ticks)

Any idea why do I still get this?!

There may be further error information in the clone logs.

GUB cover cuts applied:  13
Clique cuts applied:  48
Cover cuts applied:  256
Implied bound cuts applied:  3
Flow cuts applied:  2
Mixed integer rounding cuts applied:  111
Zero-half cuts applied:  26
Lift and project cuts applied:  3
Gomory fractional cuts applied:  13

Root node processing (before b&c):
  Real time             =    3.35 sec. (1476.59 ticks)
Parallel b&c, 4 threads:
  Real time             =  404.18 sec. (223642.10 ticks)
  Sync time (average)   =   36.63 sec.
  Wait time (average)   =   37.01 sec.
                          ------------
Total (root+branch&cut) =  407.54 sec. (225118.69 ticks)
Freeing branch-and-bound tree with 252652 nodes
211000 nodes freed
223000 nodes freed
248000 nodes freed
CPLEX 12.6.1.0: ran out of memory.
0 MIP simplex iterations
0 branch-and-bound nodes
No basis.

Amir Lm

unread,
Nov 11, 2016, 12:11:06 PM11/11/16
to AMPL Modeling Language
Is there anyone that can give me some advice how to get rid of this problem?!

Robert Fourer

unread,
Nov 11, 2016, 9:36:49 PM11/11/16
to am...@googlegroups.com
Even with nodefile=3, there is a lot of information that CPLEX has to keep in memory. To reduce memory use try memoryemphasis=1, which compresses some data kept in memory; and threads=1, which will reduce the amount of memory needed though it will also slow the processing. Also in cplex_options, set mipdisplay=2 and mipinterval=100 to get some more useful information as to what is happening in CPLEX. (If there are too many lines then replace 100 by a larger interval.)

Bob Fourer
am...@googlegroups.com

=======

Amir Lm

unread,
Nov 12, 2016, 12:29:59 PM11/12/16
to AMPL Modeling Language, 4...@ampl.com
Thank you so much for your reply, Bob.
It was insightful as always.

Despite the fact that my model is considered a fairly small model with following characteristics, I was still not able to get the optimal results.
It looks like CPLEX can not prove optimality for the obtained solution.
============================================
ampl: reset;
ampl: model IntM-S.mod;
ampl: data IntM-S.dat;
ampl: options solver cplex;
ampl: option show_stats 1;
ampl: option cplex_options 'mipdisplay=2 nodefile=3 memoryemphasis=1 threads=1 mipinterval=100';
ampl: solve;

Presolve eliminates 281 constraints and 957 variables.
Adjusted problem:
2693 variables:
2340 binary variables
23 integer variables
330 linear variables
911 constraints, all linear; 21777 nonzeros
385 equality constraints
526 inequality constraints
1 linear objective; 2180 nonzeros.

CPLEX 12.6.1.0: mipdisplay=2
nodefile=3
memoryemphasis=1
threads=1
mipinterval=100
MIP Presolve eliminated 263 rows and 200 columns.
MIP Presolve modified 3559 coefficients.
Reduced MIP has 503 rows, 2348 columns, and 13413 nonzeros.
Reduced MIP has 2325 binaries, 11 generals, 0 SOSs, and 0 indicators.
Probing time = 0.02 sec. (3.19 ticks)
MIP Presolve modified 5 coefficients.
Reduced MIP has 503 rows, 2348 columns, and 13413 nonzeros.
Reduced MIP has 2325 binaries, 11 generals, 0 SOSs, and 0 indicators.
Probing time = 0.02 sec. (3.14 ticks)
Clique table members: 8074.
MIP emphasis: balance optimality and feasibility.
MIP search method: dynamic search.
Parallel mode: none, using 1 thread.
Root relaxation solution time = 0.03 sec. (14.38 ticks)


        Nodes                                         Cuts/
   Node  Left     Objective  IInf  Best Integer    Best Bound    ItCnt     Gap

      0     0    12921.7081   141                  12921.7081      772         
      0     0    12923.5210   225                   Cuts: 225     1228         
      0     0    12923.5740   245                   Cuts: 225     1662         
      0     0    12924.1634   228                   Cuts: 225     3183         
      0     0    12924.7409   288                   Cuts: 225     4115         
      0     0    12925.4059   333                   Cuts: 207     5542         
      0     0    12926.0790   246                   Cuts: 189     6312         
      0     0    12926.1596   278                   Cuts: 225     6967         
      0     2    12926.1596   278                  12926.1596     6967         

        Nodes                                         Cuts/
   Node  Left     Objective  IInf  Best Integer    Best Bound    ItCnt     Gap

      0     0    12921.7081   141                  12921.7081      772         
      0     0    12923.5210   225                   Cuts: 225     1228         
      0     0    12923.5740   245                   Cuts: 225     1662         
      0     0    12924.1634   228                   Cuts: 225     3183         
      0     0    12924.7409   288                   Cuts: 225     4115         
      0     0    12925.4059   333                   Cuts: 207     5542         
      0     0    12926.0790   246                   Cuts: 189     6312         
      0     0    12926.1596   278                   Cuts: 225     6967         
      0     2    12926.1596   278                  12926.1596     6967         
Elapsed time = 2.42 sec. (1273.46 ticks, tree = 0.00 MB)
    100   102    12932.3146    95                  12926.1596    14249         
    200   202    12946.4404    37                  12926.1596    15264         
    300   283    12926.3449   126                  12926.1596    20245         
    400   383    12935.1371    62                  12926.1596    25797         
    500   469    12954.8483    22                  12926.1596    26632         
    600   556    12926.9074   151                  12926.2037    34008         
    700   656    12928.9205    98                  12926.2037    48189         
    800   754    12946.4989    47                  12926.2037    49444         
    900   854    12926.6216   107                  12926.2037    66528         
   1000   954    12936.0334    69                  12926.2037    69176         

.
.
.

Elapsed time = 3842.37 sec. (1645488.74 ticks, tree = 1755.55 MB)
 1506100 1400957    12931.9093    57    12944.0000    12927.0000  9599439    0.13%
 1506200 1401052    12925.9279    70    12944.0000    12927.0000  9600005    0.13%
 1506300 1401150    12932.0634    52    12944.0000    12927.0000  9600540    0.13%
 1506400 1401241    12932.5283    62    12944.0000    12927.0000  9601215    0.13%
 1506500 1401338    12927.5025    72    12944.0000    12927.0000  9601856    0.13%
 1506600 1401433    12925.3909    91    12944.0000    12927.0000  9602338    0.13%
 1506700 1401533    12933.8317    52    12944.0000    12927.0000  9602811    0.13%
 1506800 1401627    12927.8280    71    12944.0000    12927.0000  9603439    0.13%
 1506900 1401724    12926.5709    68    12944.0000    12927.0000  9604222    0.13%
 1507000 1401824    12933.6508    47    12944.0000    12927.0000  9604904    0.13%
Elapsed time = 3844.64 sec. (1646473.14 ticks, tree = 1756.74 MB)
 1507100 1401918    12931.3799    73    12944.0000    12927.0000  9605519    0.13%
 1507200 1402009    12926.9555    69    12944.0000    12927.0000  9605980    0.13%
 1507300 1402103    12927.2025    90    12944.0000    12927.0000  9606381    0.13%
 1507400 1402203    12934.2211    71    12944.0000    12927.0000  9606907    0.13%
 1507500 1402297    12932.5559    71    12944.0000    12927.0000  9607657    0.13%

Root node processing (before b&c):
  Real time             =  194.64 sec. (1248.83 ticks)
Sequential b&c:
  Real time             = 3843.83 sec. (1647466.70 ticks)
                          ------------
Total (root+branch&cut) = 4038.48 sec. (1648715.53 ticks)
CPLEX 12.6.1.0: ran out of memory.
0 MIP simplex iterations
0 branch-and-bound nodes
No basis.
=====================================================
Is there any way that I can obtain the optimal solution by further increasing the solving time or reducing the memory usage in AMPL?

Thank you so much in advance for your insights!
Amir

Robert Fourer

unread,
Nov 13, 2016, 10:21:32 AM11/13/16
to am...@googlegroups.com
Considering that after generating 1.5 million nodes, CPLEX still has 1.4 million to be examined, and the number of unexamined nodes is still increasing, a successful proof of optimality seems very unlikely. Check out the CPLEX options (http://ampl.com/products/solvers/solvers-we-sell/cplex/options/) for stopping after a given amount of time or number of nodes, which will cause CPLEX to return the solution with objective 12944 that it has found. This may be the optimal solution (just not proven optimal yet) and if there is a better solution (that CPLEX has not found despite all the searching so far) it will not have an objective better than 12927.
--
You received this message because you are subscribed to the Google Groups "AMPL Modeling Language" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ampl+uns...@googlegroups.com.
To post to this group, send email to am...@googlegroups.com.
Visit this group at https://groups.google.com/group/ampl.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages