BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
cuencomi
Calcite | Level 5

I ran out of memory after 2 hours with 24% relative gap.

 

NOTE: Problem generation will use 4 threads.
NOTE: The problem has 162671 variables (0 free, 0 fixed).
NOTE: The problem uses 2 implicit variables.
NOTE: The problem has 162671 binary and 0 integer variables.
NOTE: The problem has 2931 linear constraints (113 LE, 2818 EQ, 0 GE, 0 range).
NOTE: The problem has 325229 linear constraint coefficients.
NOTE: The problem has 0 nonlinear constraints (0 LE, 0 EQ, 0 GE, 0 range).
NOTE: The remaining solution time after problem generation and solver initialization is 12590.68 seconds.
NOTE: The MILP presolver value AUTOMATIC is applied.
NOTE: The MILP presolver removed 2093 variables and 8 constraints.
NOTE: The MILP presolver removed 4185 constraint coefficients.
NOTE: The MILP presolver modified 16 constraint coefficients.
NOTE: The presolved problem has 160578 variables, 2923 constraints, and 321044 constraint coefficients.
NOTE: The MILP solver is called.
NOTE: The parallel Branch and Cut algorithm is used.
NOTE: The Branch and Cut algorithm is using up to 4 threads.
Node Active Sols BestInteger BestBound Gap Time
0 1 3 1810300 2950.4854111 61256.0% 47
0 1 3 1810300 1050302 72.36% 48
0 1 3 1810300 1062232 70.42% 75
0 1 3 1810300 1066621 69.72% 96
0 1 3 1810300 1068548 69.42% 124
0 1 3 1810300 1069763 69.22% 162
0 1 3 1810300 1070563 69.10% 211
0 1 3 1810300 1071124 69.01% 276
0 1 3 1810300 1071673 68.92% 357
0 1 3 1810300 1071984 68.87% 452
0 1 3 1810300 1072216 68.84% 591
0 1 3 1810300 1072392 68.81% 691
0 1 3 1810300 1072530 68.79% 800
0 1 3 1810300 1072682 68.76% 905
0 1 3 1810300 1072829 68.74% 1014
NOTE: The MILP solver added 1988 cuts with 33934 cut coefficients at the root.
1 2 3 1810300 1072829 68.74% 1030

751 1 3 1810300 1073363 68.66% 1699
2842 2077 3 1810300 1073575 68.62% 2000
8112 7337 3 1810300 1073988 68.56% 2500
12671 11890 3 1810300 1074031 68.55% 3000
15756 14970 4 1497585 1074139 39.42% 3232
18259 17468 4 1497585 1074357 39.39% 3500
23711 22912 4 1497585 1074442 39.38% 4002
28663 27857 4 1497585 1074500 39.38% 4500
32773 31960 5 1451508 1074638 35.07% 4905
33029 32214 5 1451508 1074677 35.06% 5002
38138 37313 5 1451508 1074710 35.06% 5500
43450 42619 5 1451508 1074724 35.06% 6000
49459 48619 5 1451508 1074746 35.06% 6500
55063 54213 5 1451508 1074755 35.05% 7000
60147 59290 6 1421391 1074771 32.25% 7425
60674 59814 7 1328658 1074780 23.62% 7492
60971 60111 7 1328658 1074780 23.62% 7500
ERROR: Out of memory.
NOTE: Objective of the best integer solution found = 1328657.5189.

 

NOTE: Total profiled time is 7851.03 seconds.
NOTE: PROCEDURE OPTMODEL used (Total process time):
real time 2:10:49.75
user cpu time 6:30:06.98
system cpu time 2:04.75
memory 8129798.53k
OS Memory 8187904.00k
Timestamp 04/14/2019 02:19:53 PM
Step Count 22 Switch Count 12365
Page Faults 971
Page Reclaims 0
Page Swaps 0
Voluntary Context Switches 817916
Involuntary Context Switches 625004
Block Input Operations 1
Block Output Operations 102

RobPratt
SAS Super FREQ

Three suggestions:

  1. Use the SAS MEMSIZE option to increase the amount of memory available.
  2. Upgrade to SAS/OR 15.1.
  3. Use the NODESEL=DEPTH MILP solver option. This approach will use less memory but will likely take longer.
cuencomi
Calcite | Level 5

Increasing the memory solved the "out of memory" problem. However, after 5 hours the solver could only get down to 20% gap while yours got down to 1% in 2.5 hours. Do you think the difference can be attributed to using 15.1 version?  That will have to wait until we upgrade to that version. 

 

 

103454 102545 9 1314332 1075017 22.26% 15504
107197 106280 9 1314332 1075034 22.26% 16001
110686 109762 10 1305394 1075042 21.43% 16417
111106 110182 10 1305394 1075042 21.43% 16503
114870 113942 11 1296700 1075044 20.62% 16853
116177 115247 11 1296700 1075050 20.62% 17001
121863 120921 11 1296700 1075051 20.62% 17500
125398 124447 11 1296700 1075071 20.62% 17989
NOTE: Real time limit reached.
NOTE: Objective of the best integer solution found = 1296700.2137.

 

NOTE: PROCEDURE OPTMODEL used (Total process time):
real time 5:00:48.50
user cpu time 14:30:25.59
system cpu time 4:11.71
memory 13788369.93k
OS Memory 13848088.00k
Timestamp 04/16/2019 01:43:57 AM
Step Count 30 Switch Count 28432
Page Faults 628
Page Reclaims 0
Page Swaps 0
Voluntary Context Switches 1867507
Involuntary Context Switches 1369205
Block Input Operations 0
Block Output Operations 100

 

RobPratt
SAS Super FREQ

By using the following SOLVE statement with SAS/OR 14.3, I got to 1% gap in 4 hours:

   solve with milp / relobjgap=0.01 heuristics=aggressive;

506845 289747 99 1086819 1076058 1.00% 14670
506937 289839 99 1086819 1076058 1.00% 14675
507053 289955 99 1086819 1076058 1.00% 14680
507184 290086 99 1086819 1076058 1.00% 14685
507309 290211 99 1086819 1076058 1.00% 14690
507426 290328 99 1086819 1076058 1.00% 14695
507552 290454 99 1086819 1076058 1.00% 14700
507655 290557 99 1086819 1076058 1.00% 14705
507764 290666 99 1086819 1076058 1.00% 14710
507776 290677 99 1086819 1076058 1.00% 14710
NOTE: Optimal within relative gap.
NOTE: Objective = 1086818.8613.
...
NOTE: PROCEDURE OPTMODEL used (Total process time):
real time 4:06:05.18
user cpu time 11:20:27.75
system cpu time 2:14.91
memory 29682539.90k
OS Memory 29721888.00k
Timestamp 04/17/2019 03:11:19 PM
Step Count 1 Switch Count 5998

Also, the gap was below 10% within the first 50 minutes:

123500 122457 16 1182907 1074890 10.05% 2960
123547 122500 17 1177158 1074890 9.51% 2962

cuencomi
Calcite | Level 5

Since you were successful with using SAS/OR 14.3 also, the issue may be with the computer hardware? I am using SAS/OR on a Unix server. I will check with our hardware folks why I can't get below 20% gap in reasonable time. What do you think?

sas-innovate-2026-white.png



April 27 – 30 | Gaylord Texan | Grapevine, Texas

Registration is open

Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!

Register now

Discussion stats
  • 34 replies
  • 3891 views
  • 0 likes
  • 2 in conversation