Out of Memory Problem
AnsweredHi everyone!
I am solving a MIP model in Python with the Gurobi package. I encountered an "Out of memory" error after 2000 seconds and did not know how to deal with it. I just read an article on your website and tried the changes below. It did not work either.
model.setParam('NodefileStart', 0.5)
model.setParam('PreSparsify', 1)
model.setParam('Threads', 2)
In the following, you can find other information about the software, hardware, and problem size.
Gurobi Optimizer version 11.0.1 build v11.0.1rc0 (win64 - Windows 10.0 (19045.2)) CPU model: 11th Gen Intel(R) Core(TM) i5-1145G7 @ 2.60GHz, instruction set [SSE2|AVX|AVX2|AVX512] Thread count: 4 physical cores, 8 logical processors, using up to 2 threads Optimize a model with 2048794 rows, 3263023 columns and 139451032 nonzeros Model fingerprint: 0xaf8ac214 Model has 407694 general constraints Variable types: 3250528 continuous, 12495 integer (12495 binary)
Thank you so much for your help in advance!
-
Hi Vida,
Please note that the NodefileStart parameter applies only if the out-of-memory error happens during the B&B tree. If your machine runs out of memory already before entering the B&B tree, i.e., before the root node has been solved, then a different workaround is needed.
Please note that a model with ~140 million nonzeros is expected to require a lot of memory. How much memory does your machine have? Do you have the possibility to switch the a different machine, e.g., to a Cloud machine?
Could you please share the full log output until the OOM error occurs?
Best regards,
Jaromił0 -
Hi Jaromil,
Thank you for your reply.
The installed RAM is 8 GB, and the processor is 11th Gen Intel(R) Core(TM) i5-1145G7 @ 2.60GHz 2.61 GHz.
Also, the full log before the error is as follows:
Gurobi Optimizer version 11.0.1 build v11.0.1rc0 (win64 - Windows 10.0 (19045.2)) CPU model: 11th Gen Intel(R) Core(TM) i5-1145G7 @ 2.60GHz, instruction set [SSE2|AVX|AVX2|AVX512] Thread count: 4 physical cores, 8 logical processors, using up to 2 threads Optimize a model with 2048794 rows, 3263023 columns and 139451032 nonzeros Model fingerprint: 0xaf8ac214 Model has 407694 general constraints Variable types: 3250528 continuous, 12495 integer (12495 binary) Coefficient statistics: Matrix range [1e+00, 1e+03] Objective range [1e+00, 3e+01] Bounds range [1e+00, 1e+02] RHS range [1e+00, 1e+03] Presolve removed 0 rows and 0 columns (presolve time = 49s) ... Presolve removed 0 rows and 0 columns (presolve time = 64s) ... Presolve removed 0 rows and 0 columns (presolve time = 76s) ... Presolve removed 407670 rows and 1353006 columns (presolve time = 89s) ... Presolve removed 407670 rows and 1353006 columns (presolve time = 127s) ... Presolve removed 968812 rows and 1908112 columns (presolve time = 133s) ... Presolve removed 1164580 rows and 1908112 columns (presolve time = 140s) ... Presolve removed 1165058 rows and 1908112 columns (presolve time = 140s) ... Presolve removed 1165058 rows and 2067497 columns (presolve time = 147s) ... Presolve removed 1166815 rows and 2067497 columns (presolve time = 151s) ... Presolve removed 1180389 rows and 2081071 columns (presolve time = 157s) ... Presolve removed 1188252 rows and 2338352 columns (presolve time = 167s) ... Presolve removed 1192582 rows and 2338352 columns (presolve time = 181s) ... Presolve removed 1192582 rows and 2338352 columns (presolve time = 205s) ... Presolve removed 1192582 rows and 2338352 columns (presolve time = 213s) ... Presolve removed 1192582 rows and 2338352 columns (presolve time = 222s) ... Presolve removed 1237646 rows and 2353524 columns (presolve time = 225s) ... Presolve removed 1237646 rows and 2353524 columns (presolve time = 231s) ... Presolve removed 1237646 rows and 2353524 columns (presolve time = 265s) ... Presolve removed 1237646 rows and 2353524 columns (presolve time = 270s) ... Presolve removed 1237646 rows and 2353524 columns (presolve time = 276s) ... Presolve removed 1237646 rows and 2353524 columns (presolve time = 280s) ... Presolve removed 1237646 rows and 2353524 columns (presolve time = 285s) ... Presolve removed 1237646 rows and 2353524 columns (presolve time = 290s) ... Presolve removed 1237646 rows and 2353524 columns (presolve time = 295s) ... Presolve removed 1237646 rows and 2353524 columns (presolve time = 300s) ... Presolve removed 1237646 rows and 2353524 columns (presolve time = 305s) ... Presolve removed 1237646 rows and 2353524 columns (presolve time = 310s) ... Presolve removed 1237646 rows and 2353524 columns (presolve time = 315s) ... Presolve removed 1237646 rows and 2353524 columns (presolve time = 347s) ... Presolve removed 1712084 rows and 2827962 columns (presolve time = 350s) ... Presolve removed 1720662 rows and 2827962 columns (presolve time = 355s) ... Presolve removed 1840235 rows and 2834975 columns (presolve time = 360s) ... Presolve removed 1845007 rows and 2845501 columns (presolve time = 365s) ... Presolve removed 1845045 rows and 2845539 columns (presolve time = 370s) ... Presolve removed 1845045 rows and 2845539 columns (presolve time = 375s) ... Presolve removed 1845045 rows and 2859064 columns (presolve time = 381s) ... Presolve removed 1845045 rows and 2878919 columns (presolve time = 387s) ... Presolve removed 1845045 rows and 2891932 columns (presolve time = 391s) ... Presolve removed 1845045 rows and 2911151 columns (presolve time = 397s) ... Presolve removed 1845045 rows and 2923588 columns (presolve time = 401s) ... Presolve removed 1845045 rows and 2941990 columns (presolve time = 407s) ... Presolve removed 1845045 rows and 2953930 columns (presolve time = 410s) ... Presolve removed 1845045 rows and 2971367 columns (presolve time = 416s) ... Presolve removed 1845045 rows and 2988364 columns (presolve time = 421s) ... Presolve removed 1845045 rows and 3004724 columns (presolve time = 426s) ... Presolve removed 1845045 rows and 3020267 columns (presolve time = 431s) ... Presolve removed 1845045 rows and 3035300 columns (presolve time = 436s) ... Presolve removed 1845045 rows and 3053545 columns (presolve time = 441s) ... Presolve removed 1845045 rows and 3065855 columns (presolve time = 445s) ... Presolve removed 1845045 rows and 3083591 columns (presolve time = 451s) ... Presolve removed 1845045 rows and 3098410 columns (presolve time = 455s) ... Presolve removed 1845045 rows and 3102111 columns (presolve time = 460s) ... Presolve removed 2103121 rows and 3106082 columns (presolve time = 465s) ... Presolve removed 2409305 rows and 3412266 columns (presolve time = 470s) ... Presolve removed 2674864 rows and 3675668 columns (presolve time = 475s) ... Presolve removed 878741 rows and 2136167 columns Presolve time: 475.65s Presolved: 1170053 rows, 1126856 columns, 9696825 nonzeros Variable types: 866643 continuous, 260213 integer (260213 binary) Deterministic concurrent LP optimizer: dual simplex and barrier Showing barrier log only... Root barrier log... Elapsed ordering time = 5s Elapsed ordering time = 10s Elapsed ordering time = 14s Elapsed ordering time = 15s Elapsed ordering time = 20s Ordering time: 22.12s Barrier statistics: Dense cols : 15 Free vars : 45 AA' NZ : 1.098e+07 Factor NZ : 1.037e+08 (roughly 1.6 GB of memory) Factor Ops : 1.004e+11 (roughly 3 seconds per iteration) Threads : 1 Objective Residual Iter Primal Dual Primal Dual Compl Time 0 1.83775338e+08 -6.15473769e+08 1.97e+04 1.80e+03 1.51e+04 557s 1 1.55390416e+08 -8.16831571e+08 1.69e+04 4.94e+02 1.28e+04 565s 2 3.20182804e+07 -8.14414961e+08 3.50e+03 5.79e+01 2.87e+03 570s 3 8.27115527e+06 -5.73148218e+08 8.72e+02 1.12e-02 8.01e+02 576s 4 2.24820085e+06 -2.85363223e+08 1.87e+02 1.11e-03 2.16e+02 582s 5 1.39919581e+06 -1.04191211e+08 9.03e+01 2.76e-04 7.53e+01 587s 6 8.47649907e+05 -3.98578660e+07 3.46e+01 6.98e-05 2.62e+01 593s 7 5.78132640e+05 -1.38941783e+07 1.05e+01 1.79e-05 8.28e+00 599s 8 4.58973089e+05 -3.75018769e+06 1.67e+00 4.07e-06 2.10e+00 606s 9 4.15132964e+05 -1.89983136e+06 6.26e-01 2.69e-06 1.10e+00 612s 10 3.49963928e+05 -2.38882886e+05 1.63e-01 3.04e-06 2.69e-01 620s 11 3.05654611e+05 -3.88577274e+03 7.11e-02 2.75e-06 1.40e-01 627s 12 2.75467294e+05 1.21166127e+05 3.84e-02 2.17e-06 6.94e-02 634s 13 2.48368514e+05 1.72641031e+05 1.72e-02 1.76e-06 3.39e-02 641s 14 2.30878017e+05 1.90621514e+05 5.37e-03 1.37e-06 1.79e-02 647s 15 2.26909277e+05 2.06599047e+05 3.54e-03 8.82e-07 9.07e-03 653s 16 2.23936015e+05 2.14313984e+05 2.16e-03 4.73e-07 4.30e-03 658s 17 2.22858838e+05 2.15381496e+05 1.72e-03 4.13e-07 3.35e-03 663s 18 2.21462647e+05 2.17447689e+05 1.09e-03 2.67e-07 1.80e-03 669s 19 2.20997675e+05 2.18014808e+05 8.85e-04 2.18e-07 1.34e-03 674s 20 2.20300944e+05 2.18204067e+05 5.74e-04 2.53e-07 9.40e-04 679s 21 2.19946753e+05 2.18569131e+05 4.18e-04 3.01e-07 6.19e-04 684s 22 2.19614026e+05 2.18833510e+05 2.73e-04 3.01e-07 3.51e-04 689s 23 2.19331164e+05 2.18926725e+05 1.55e-04 2.17e-07 1.82e-04 694s 24 2.19108686e+05 2.18940424e+05 6.01e-05 2.85e-07 7.58e-05 700s 25 2.18983385e+05 2.18959596e+05 1.04e-05 6.83e-08 1.08e-05 705s 26 2.18968063e+05 2.18964772e+05 1.51e-06 5.60e-09 1.49e-06 711s 27 2.18965430e+05 2.18965226e+05 4.66e-07 1.44e-09 9.17e-08 717s 28 2.18965387e+05 2.18965252e+05 1.43e-06 6.68e-10 6.06e-08 723s 29 2.18965384e+05 2.18965252e+05 3.64e-06 6.83e-10 5.94e-08 728s 30 2.18965384e+05 2.18965252e+05 5.77e-06 6.84e-10 5.94e-08 734s 31 2.18965384e+05 2.18965252e+05 1.02e-05 1.13e-09 5.92e-08 740s 32 2.18965382e+05 2.18965251e+05 1.00e-05 3.26e-09 5.88e-08 745s 33 2.18965363e+05 2.18965253e+05 8.44e-06 2.79e-09 4.94e-08 751s 34 2.18965363e+05 2.18965253e+05 8.41e-06 2.78e-09 4.92e-08 757s 35 2.18965363e+05 2.18965253e+05 8.41e-06 2.78e-09 4.92e-08 763s 36 2.18965362e+05 2.18965253e+05 1.51e-05 2.88e-09 4.89e-08 769s 37 2.18965362e+05 2.18965253e+05 2.31e-05 2.89e-09 4.89e-08 774s 38 2.18965361e+05 2.18965252e+05 2.28e-05 6.45e-09 4.90e-08 780s 39 2.18965347e+05 2.18965253e+05 1.97e-05 5.50e-09 4.23e-08 786s 40 2.18965346e+05 2.18965253e+05 1.94e-05 5.42e-09 4.17e-08 792s Barrier performed 40 iterations in 792.31 seconds (408.59 work units) Barrier solve interrupted - model solved by another algorithm Concurrent spin time: 0.29s Solved with dual simplex Root simplex log... Iteration Objective Primal Inf. Dual Inf. Time 789900 2.1896526e+05 0.000000e+00 0.000000e+00 795s Extra simplex iterations after uncrush: 2108 Root relaxation: objective 2.189653e+05, 789900 iterations, 272.83 seconds (159.45 work units) Total elapsed time = 795.57s (DegenMoves) Total elapsed time = 810.34s (DegenMoves) Nodes | Current Node | Objective Bounds | Work Expl Unexpl | Obj Depth IntInf | Incumbent BestBd Gap | It/Node Time 0 0 218965.260 0 1966 - 218965.260 - - 816s 0 0 221753.681 0 2400 - 221753.681 - - 912s 0 0 221757.817 0 2393 - 221757.817 - - 943s 0 0 221757.896 0 2392 - 221757.896 - - 947s 0 0 222976.728 0 1971 - 222976.728 - - 1038s 0 0 222976.728 0 1968 - 222976.728 - - 1039s 0 0 222977.005 0 1942 - 222977.005 - - 1058s 0 0 222999.565 0 1850 - 222999.565 - - 1125s 0 0 223000.315 0 1852 - 223000.315 - - 1155s 0 0 223000.315 0 1856 - 223000.315 - - 1158s 0 0 223011.508 0 1809 - 223011.508 - - 1193s 0 0 223011.779 0 1828 - 223011.779 - - 1214s 0 0 223012.826 0 1834 - 223012.826 - - 1261s 0 0 223012.826 0 1837 - 223012.826 - - 1278s 0 0 223013.282 0 1844 - 223013.282 - - 1296s 0 0 223013.282 0 1843 - 223013.282 - - 1297s 0 0 223013.359 0 1825 - 223013.359 - - 1322s 0 0 223013.373 0 1835 - 223013.373 - - 1334s 0 0 223013.399 0 1836 - 223013.399 - - 1350s 0 0 223013.579 0 1836 - 223013.579 - - 1365s 0 0 223013.673 0 1829 - 223013.673 - - 1380s 0 0 223013.849 0 1801 - 223013.849 - - 1394s 0 0 223013.849 0 1355 - 223013.849 - - 1452s 0 2 223013.849 0 1314 - 223013.849 - - 1702s 1 5 223013.849 1 1313 - 223013.849 - 2289 1706s 3 6 223016.658 2 1342 - 223013.849 - 2986 1720s 5 8 223013.849 2 1311 - 223013.849 - 1946 1725s 11 14 223013.849 4 1313 - 223013.849 - 1126 1730s 23 32 223013.849 9 1309 - 223013.849 - 637 1740s 31 48 223013.849 11 1311 - 223013.849 - 655 1757s 47 65 223013.849 19 1301 - 223013.849 - 589 1788s Cutting planes: Learned: 1 Gomory: 16 Lift-and-project: 12 Implied bound: 124 MIR: 1854 Flow cover: 1997 Flow path: 52 RLT: 173 Relax-and-lift: 236 Explored 64 nodes (1324513 simplex iterations) in 1799.80 seconds (952.30 work units) Thread count was 2 (of 8 available processors) Solution count 0 Solve interrupted (error code 10001) Best objective -, best bound 2.230138490788e+05, gap -
0 -
Thank you for sharing the output.
I cannot see that the parameter NodefileStart has been actually set. Is this output just missing in your post?
Do you have writing permissions on this machine? You can specify a particular location for the node files via the NodefileDir parameter.
You could try setting Method=1 to use the Dual Simplex only.
If you are setting the NodefileStart parameter, you could set it to a lower value. It is possible that already the root node takes most of the RAM and the B&B tree actually never reaches the 0.5GB threshold set by the NodefileStart parameter.
Best regards,
Jaromił0 -
Sorry for the inconvenience. You can see the output in the following again.
What do you mean by writing permission? I guess you are asking about license. I am using academic license.
Set parameter NodefileStart to value 0.5 Set parameter PreSparsify to value 1 Set parameter Threads to value 2 p: 365 Length of dummy_matrix columns: 7 Gurobi Optimizer version 11.0.1 build v11.0.1rc0 (win64 - Windows 10.0 (19045.2)) CPU model: 11th Gen Intel(R) Core(TM) i5-1145G7 @ 2.60GHz, instruction set [SSE2|AVX|AVX2|AVX512] Thread count: 4 physical cores, 8 logical processors, using up to 2 threads Optimize a model with 2048794 rows, 3263023 columns and 139451032 nonzeros Model fingerprint: 0xaf8ac214 Model has 407694 general constraints Variable types: 3250528 continuous, 12495 integer (12495 binary) Coefficient statistics: Matrix range [1e+00, 1e+03] Objective range [1e+00, 3e+01] Bounds range [1e+00, 1e+02] RHS range [1e+00, 1e+03] Presolve removed 0 rows and 0 columns (presolve time = 49s) ... Presolve removed 0 rows and 0 columns (presolve time = 64s) ... Presolve removed 0 rows and 0 columns (presolve time = 76s) ... Presolve removed 407670 rows and 1353006 columns (presolve time = 89s) ... Presolve removed 407670 rows and 1353006 columns (presolve time = 127s) ... Presolve removed 968812 rows and 1908112 columns (presolve time = 133s) ... Presolve removed 1164580 rows and 1908112 columns (presolve time = 140s) ... Presolve removed 1165058 rows and 1908112 columns (presolve time = 140s) ... Presolve removed 1165058 rows and 2067497 columns (presolve time = 147s) ... Presolve removed 1166815 rows and 2067497 columns (presolve time = 151s) ... Presolve removed 1180389 rows and 2081071 columns (presolve time = 157s) ... Presolve removed 1188252 rows and 2338352 columns (presolve time = 167s) ... Presolve removed 1192582 rows and 2338352 columns (presolve time = 181s) ... Presolve removed 1192582 rows and 2338352 columns (presolve time = 205s) ... Presolve removed 1192582 rows and 2338352 columns (presolve time = 213s) ... Presolve removed 1192582 rows and 2338352 columns (presolve time = 222s) ... Presolve removed 1237646 rows and 2353524 columns (presolve time = 225s) ... Presolve removed 1237646 rows and 2353524 columns (presolve time = 231s) ... Presolve removed 1237646 rows and 2353524 columns (presolve time = 265s) ... Presolve removed 1237646 rows and 2353524 columns (presolve time = 270s) ... Presolve removed 1237646 rows and 2353524 columns (presolve time = 276s) ... Presolve removed 1237646 rows and 2353524 columns (presolve time = 280s) ... Presolve removed 1237646 rows and 2353524 columns (presolve time = 285s) ... Presolve removed 1237646 rows and 2353524 columns (presolve time = 290s) ... Presolve removed 1237646 rows and 2353524 columns (presolve time = 295s) ... Presolve removed 1237646 rows and 2353524 columns (presolve time = 300s) ... Presolve removed 1237646 rows and 2353524 columns (presolve time = 305s) ... Presolve removed 1237646 rows and 2353524 columns (presolve time = 310s) ... Presolve removed 1237646 rows and 2353524 columns (presolve time = 315s) ... Presolve removed 1237646 rows and 2353524 columns (presolve time = 347s) ... Presolve removed 1712084 rows and 2827962 columns (presolve time = 350s) ... Presolve removed 1720662 rows and 2827962 columns (presolve time = 355s) ... Presolve removed 1840235 rows and 2834975 columns (presolve time = 360s) ... Presolve removed 1845007 rows and 2845501 columns (presolve time = 365s) ... Presolve removed 1845045 rows and 2845539 columns (presolve time = 370s) ... Presolve removed 1845045 rows and 2845539 columns (presolve time = 375s) ... Presolve removed 1845045 rows and 2859064 columns (presolve time = 381s) ... Presolve removed 1845045 rows and 2878919 columns (presolve time = 387s) ... Presolve removed 1845045 rows and 2891932 columns (presolve time = 391s) ... Presolve removed 1845045 rows and 2911151 columns (presolve time = 397s) ... Presolve removed 1845045 rows and 2923588 columns (presolve time = 401s) ... Presolve removed 1845045 rows and 2941990 columns (presolve time = 407s) ... Presolve removed 1845045 rows and 2953930 columns (presolve time = 410s) ... Presolve removed 1845045 rows and 2971367 columns (presolve time = 416s) ... Presolve removed 1845045 rows and 2988364 columns (presolve time = 421s) ... Presolve removed 1845045 rows and 3004724 columns (presolve time = 426s) ... Presolve removed 1845045 rows and 3020267 columns (presolve time = 431s) ... Presolve removed 1845045 rows and 3035300 columns (presolve time = 436s) ... Presolve removed 1845045 rows and 3053545 columns (presolve time = 441s) ... Presolve removed 1845045 rows and 3065855 columns (presolve time = 445s) ... Presolve removed 1845045 rows and 3083591 columns (presolve time = 451s) ... Presolve removed 1845045 rows and 3098410 columns (presolve time = 455s) ... Presolve removed 1845045 rows and 3102111 columns (presolve time = 460s) ... Presolve removed 2103121 rows and 3106082 columns (presolve time = 465s) ... Presolve removed 2409305 rows and 3412266 columns (presolve time = 470s) ... Presolve removed 2674864 rows and 3675668 columns (presolve time = 475s) ... Presolve removed 878741 rows and 2136167 columns Presolve time: 475.65s Presolved: 1170053 rows, 1126856 columns, 9696825 nonzeros Variable types: 866643 continuous, 260213 integer (260213 binary) Deterministic concurrent LP optimizer: dual simplex and barrier Showing barrier log only... Root barrier log... Elapsed ordering time = 5s Elapsed ordering time = 10s Elapsed ordering time = 14s Elapsed ordering time = 15s Elapsed ordering time = 20s Ordering time: 22.12s Barrier statistics: Dense cols : 15 Free vars : 45 AA' NZ : 1.098e+07 Factor NZ : 1.037e+08 (roughly 1.6 GB of memory) Factor Ops : 1.004e+11 (roughly 3 seconds per iteration) Threads : 1 Objective Residual Iter Primal Dual Primal Dual Compl Time 0 1.83775338e+08 -6.15473769e+08 1.97e+04 1.80e+03 1.51e+04 557s 1 1.55390416e+08 -8.16831571e+08 1.69e+04 4.94e+02 1.28e+04 565s 2 3.20182804e+07 -8.14414961e+08 3.50e+03 5.79e+01 2.87e+03 570s 3 8.27115527e+06 -5.73148218e+08 8.72e+02 1.12e-02 8.01e+02 576s 4 2.24820085e+06 -2.85363223e+08 1.87e+02 1.11e-03 2.16e+02 582s 5 1.39919581e+06 -1.04191211e+08 9.03e+01 2.76e-04 7.53e+01 587s 6 8.47649907e+05 -3.98578660e+07 3.46e+01 6.98e-05 2.62e+01 593s 7 5.78132640e+05 -1.38941783e+07 1.05e+01 1.79e-05 8.28e+00 599s 8 4.58973089e+05 -3.75018769e+06 1.67e+00 4.07e-06 2.10e+00 606s 9 4.15132964e+05 -1.89983136e+06 6.26e-01 2.69e-06 1.10e+00 612s 10 3.49963928e+05 -2.38882886e+05 1.63e-01 3.04e-06 2.69e-01 620s 11 3.05654611e+05 -3.88577274e+03 7.11e-02 2.75e-06 1.40e-01 627s 12 2.75467294e+05 1.21166127e+05 3.84e-02 2.17e-06 6.94e-02 634s 13 2.48368514e+05 1.72641031e+05 1.72e-02 1.76e-06 3.39e-02 641s 14 2.30878017e+05 1.90621514e+05 5.37e-03 1.37e-06 1.79e-02 647s 15 2.26909277e+05 2.06599047e+05 3.54e-03 8.82e-07 9.07e-03 653s 16 2.23936015e+05 2.14313984e+05 2.16e-03 4.73e-07 4.30e-03 658s 17 2.22858838e+05 2.15381496e+05 1.72e-03 4.13e-07 3.35e-03 663s 18 2.21462647e+05 2.17447689e+05 1.09e-03 2.67e-07 1.80e-03 669s 19 2.20997675e+05 2.18014808e+05 8.85e-04 2.18e-07 1.34e-03 674s 20 2.20300944e+05 2.18204067e+05 5.74e-04 2.53e-07 9.40e-04 679s 21 2.19946753e+05 2.18569131e+05 4.18e-04 3.01e-07 6.19e-04 684s 22 2.19614026e+05 2.18833510e+05 2.73e-04 3.01e-07 3.51e-04 689s 23 2.19331164e+05 2.18926725e+05 1.55e-04 2.17e-07 1.82e-04 694s 24 2.19108686e+05 2.18940424e+05 6.01e-05 2.85e-07 7.58e-05 700s 25 2.18983385e+05 2.18959596e+05 1.04e-05 6.83e-08 1.08e-05 705s 26 2.18968063e+05 2.18964772e+05 1.51e-06 5.60e-09 1.49e-06 711s 27 2.18965430e+05 2.18965226e+05 4.66e-07 1.44e-09 9.17e-08 717s 28 2.18965387e+05 2.18965252e+05 1.43e-06 6.68e-10 6.06e-08 723s 29 2.18965384e+05 2.18965252e+05 3.64e-06 6.83e-10 5.94e-08 728s 30 2.18965384e+05 2.18965252e+05 5.77e-06 6.84e-10 5.94e-08 734s 31 2.18965384e+05 2.18965252e+05 1.02e-05 1.13e-09 5.92e-08 740s 32 2.18965382e+05 2.18965251e+05 1.00e-05 3.26e-09 5.88e-08 745s 33 2.18965363e+05 2.18965253e+05 8.44e-06 2.79e-09 4.94e-08 751s 34 2.18965363e+05 2.18965253e+05 8.41e-06 2.78e-09 4.92e-08 757s 35 2.18965363e+05 2.18965253e+05 8.41e-06 2.78e-09 4.92e-08 763s 36 2.18965362e+05 2.18965253e+05 1.51e-05 2.88e-09 4.89e-08 769s 37 2.18965362e+05 2.18965253e+05 2.31e-05 2.89e-09 4.89e-08 774s 38 2.18965361e+05 2.18965252e+05 2.28e-05 6.45e-09 4.90e-08 780s 39 2.18965347e+05 2.18965253e+05 1.97e-05 5.50e-09 4.23e-08 786s 40 2.18965346e+05 2.18965253e+05 1.94e-05 5.42e-09 4.17e-08 792s Barrier performed 40 iterations in 792.31 seconds (408.59 work units) Barrier solve interrupted - model solved by another algorithm Concurrent spin time: 0.29s Solved with dual simplex Root simplex log... Iteration Objective Primal Inf. Dual Inf. Time 789900 2.1896526e+05 0.000000e+00 0.000000e+00 795s Extra simplex iterations after uncrush: 2108 Root relaxation: objective 2.189653e+05, 789900 iterations, 272.83 seconds (159.45 work units) Total elapsed time = 795.57s (DegenMoves) Total elapsed time = 810.34s (DegenMoves) Nodes | Current Node | Objective Bounds | Work Expl Unexpl | Obj Depth IntInf | Incumbent BestBd Gap | It/Node Time 0 0 218965.260 0 1966 - 218965.260 - - 816s 0 0 221753.681 0 2400 - 221753.681 - - 912s 0 0 221757.817 0 2393 - 221757.817 - - 943s 0 0 221757.896 0 2392 - 221757.896 - - 947s 0 0 222976.728 0 1971 - 222976.728 - - 1038s 0 0 222976.728 0 1968 - 222976.728 - - 1039s 0 0 222977.005 0 1942 - 222977.005 - - 1058s 0 0 222999.565 0 1850 - 222999.565 - - 1125s 0 0 223000.315 0 1852 - 223000.315 - - 1155s 0 0 223000.315 0 1856 - 223000.315 - - 1158s 0 0 223011.508 0 1809 - 223011.508 - - 1193s 0 0 223011.779 0 1828 - 223011.779 - - 1214s 0 0 223012.826 0 1834 - 223012.826 - - 1261s 0 0 223012.826 0 1837 - 223012.826 - - 1278s 0 0 223013.282 0 1844 - 223013.282 - - 1296s 0 0 223013.282 0 1843 - 223013.282 - - 1297s 0 0 223013.359 0 1825 - 223013.359 - - 1322s 0 0 223013.373 0 1835 - 223013.373 - - 1334s 0 0 223013.399 0 1836 - 223013.399 - - 1350s 0 0 223013.579 0 1836 - 223013.579 - - 1365s 0 0 223013.673 0 1829 - 223013.673 - - 1380s 0 0 223013.849 0 1801 - 223013.849 - - 1394s 0 0 223013.849 0 1355 - 223013.849 - - 1452s 0 2 223013.849 0 1314 - 223013.849 - - 1702s 1 5 223013.849 1 1313 - 223013.849 - 2289 1706s 3 6 223016.658 2 1342 - 223013.849 - 2986 1720s 5 8 223013.849 2 1311 - 223013.849 - 1946 1725s 11 14 223013.849 4 1313 - 223013.849 - 1126 1730s 23 32 223013.849 9 1309 - 223013.849 - 637 1740s 31 48 223013.849 11 1311 - 223013.849 - 655 1757s 47 65 223013.849 19 1301 - 223013.849 - 589 1788s Cutting planes: Learned: 1 Gomory: 16 Lift-and-project: 12 Implied bound: 124 MIR: 1854 Flow cover: 1997 Flow path: 52 RLT: 173 Relax-and-lift: 236 Explored 64 nodes (1324513 simplex iterations) in 1799.80 seconds (952.30 work units) Thread count was 2 (of 8 available processors) Solution count 0 Solve interrupted (error code 10001) Best objective -, best bound 2.230138490788e+05, gap -
0 -
What do you mean by writing permission? I guess you are asking about license. I am using academic license.
I mean whether you have permissions to generate and write into new files on the machine you are using. It is not correlated to your Gurobi license. If this is not your machine you are running on, then it is possible that you do have only reading permissions.
You could try setting NodefileStart=0. This should start writing the node files as soon as the optimization reaches the B&B tree.
Best regards,
Jaromił0 -
Dear Jaromil,
Thank you for your help.
I am using Jupyter Notebook on my laptop with an academic license. I tried setting NodefileStart = 0, but it did not work. I have got the same error. You can see below for more information.
Set parameter NodefileStart to value 0 Set parameter PreSparsify to value 1 Set parameter Threads to value 2 p: 365 Length of dummy_matrix columns: 7 Gurobi Optimizer version 11.0.1 build v11.0.1rc0 (win64 - Windows 10.0 (19045.2)) CPU model: 11th Gen Intel(R) Core(TM) i5-1145G7 @ 2.60GHz, instruction set [SSE2|AVX|AVX2|AVX512] Thread count: 4 physical cores, 8 logical processors, using up to 2 threads Optimize a model with 2048794 rows, 3263023 columns and 139451032 nonzeros Model fingerprint: 0xaf8ac214 Model has 407694 general constraints Variable types: 3250528 continuous, 12495 integer (12495 binary) Coefficient statistics: Matrix range [1e+00, 1e+03] Objective range [1e+00, 3e+01] Bounds range [1e+00, 1e+02] RHS range [1e+00, 1e+03] Presolve removed 0 rows and 0 columns (presolve time = 71s) ... Presolve removed 0 rows and 0 columns (presolve time = 92s) ... Presolve removed 0 rows and 0 columns (presolve time = 112s) ... Presolve removed 407670 rows and 1353006 columns (presolve time = 130s) ... Presolve removed 407670 rows and 1353006 columns (presolve time = 185s) ... Presolve removed 968812 rows and 1908112 columns (presolve time = 192s) ... Presolve removed 1164580 rows and 1908112 columns (presolve time = 223s) ... Presolve removed 1165058 rows and 1908590 columns (presolve time = 249s) ... Presolve removed 1165058 rows and 2067497 columns (presolve time = 258s) ... Presolve removed 1166815 rows and 2067497 columns (presolve time = 267s) ... Presolve removed 1166815 rows and 2067497 columns (presolve time = 283s) ... Presolve removed 1180389 rows and 2081071 columns (presolve time = 311s) ... Presolve removed 1180419 rows and 2081071 columns (presolve time = 327s) ... Presolve removed 1180419 rows and 2081071 columns (presolve time = 343s) ... Presolve removed 1180419 rows and 2081071 columns (presolve time = 346s) ... Presolve removed 1180419 rows and 2081071 columns (presolve time = 357s) ... Presolve removed 1188252 rows and 2338352 columns (presolve time = 368s) ... Presolve removed 1192582 rows and 2338352 columns (presolve time = 385s) ... Presolve removed 1192582 rows and 2338352 columns (presolve time = 385s) ... Presolve removed 1192582 rows and 2338352 columns (presolve time = 412s) ... Presolve removed 1192582 rows and 2338352 columns (presolve time = 423s) ... Presolve removed 1192582 rows and 2338352 columns (presolve time = 429s) ... Presolve removed 1192582 rows and 2338352 columns (presolve time = 432s) ... Presolve removed 1237646 rows and 2353524 columns (presolve time = 435s) ... Presolve removed 1237646 rows and 2353524 columns (presolve time = 452s) ... Presolve removed 1237646 rows and 2353524 columns (presolve time = 486s) ... Presolve removed 1237646 rows and 2353524 columns (presolve time = 490s) ... Presolve removed 1237646 rows and 2353524 columns (presolve time = 495s) ... Presolve removed 1237646 rows and 2353524 columns (presolve time = 500s) ... Presolve removed 1237646 rows and 2353524 columns (presolve time = 505s) ... Presolve removed 1237646 rows and 2353524 columns (presolve time = 510s) ... Presolve removed 1237646 rows and 2353524 columns (presolve time = 515s) ... Presolve removed 1237646 rows and 2353524 columns (presolve time = 520s) ... Presolve removed 1237646 rows and 2353524 columns (presolve time = 525s) ... Presolve removed 1237646 rows and 2353524 columns (presolve time = 530s) ... Presolve removed 1237646 rows and 2353524 columns (presolve time = 535s) ... Presolve removed 1237646 rows and 2353524 columns (presolve time = 540s) ... Presolve removed 1237646 rows and 2353524 columns (presolve time = 545s) ... Presolve removed 1237646 rows and 2353524 columns (presolve time = 551s) ... Presolve removed 1237646 rows and 2353524 columns (presolve time = 606s) ... Presolve removed 1712084 rows and 2827962 columns (presolve time = 610s) ... Presolve removed 1720662 rows and 2827962 columns (presolve time = 615s) ... Presolve removed 1840235 rows and 2834975 columns (presolve time = 621s) ... Presolve removed 1844983 rows and 2839723 columns (presolve time = 625s) ... Presolve removed 1845006 rows and 2839723 columns (presolve time = 630s) ... Presolve removed 1845007 rows and 2845501 columns (presolve time = 635s) ... Presolve removed 1845045 rows and 2845539 columns (presolve time = 640s) ... Presolve removed 1845045 rows and 2845539 columns (presolve time = 645s) ... Presolve removed 1845045 rows and 2845539 columns (presolve time = 650s) ... Presolve removed 1845045 rows and 2859064 columns (presolve time = 658s) ... Presolve removed 1845045 rows and 2865669 columns (presolve time = 661s) ... Presolve removed 1845045 rows and 2878919 columns (presolve time = 668s) ... Presolve removed 1845045 rows and 2885484 columns (presolve time = 672s) ... Presolve removed 1845045 rows and 2898384 columns (presolve time = 678s) ... Presolve removed 1845045 rows and 2904757 columns (presolve time = 682s) ... Presolve removed 1845045 rows and 2911151 columns (presolve time = 685s) ... Presolve removed 1845045 rows and 2923588 columns (presolve time = 692s) ... Presolve removed 1845045 rows and 2935948 columns (presolve time = 698s) ... Presolve removed 1845045 rows and 2941990 columns (presolve time = 701s) ... Presolve removed 1845045 rows and 2953930 columns (presolve time = 708s) ... Presolve removed 1845045 rows and 2959803 columns (presolve time = 711s) ... Presolve removed 1845045 rows and 2971367 columns (presolve time = 717s) ... Presolve removed 1845045 rows and 2982784 columns (presolve time = 722s) ... Presolve removed 1845045 rows and 2988364 columns (presolve time = 725s) ... Presolve removed 1845045 rows and 2999435 columns (presolve time = 731s) ... Presolve removed 1845045 rows and 3010002 columns (presolve time = 736s) ... Presolve removed 1845045 rows and 3020267 columns (presolve time = 742s) ... Presolve removed 1845045 rows and 3030349 columns (presolve time = 747s) ... Presolve removed 1845045 rows and 3039998 columns (presolve time = 752s) ... Presolve removed 1845045 rows and 3049152 columns (presolve time = 757s) ... Presolve removed 1845045 rows and 3057801 columns (presolve time = 762s) ... Presolve removed 1845045 rows and 3065855 columns (presolve time = 766s) ... Presolve removed 1845045 rows and 3076997 columns (presolve time = 772s) ... Presolve removed 1845045 rows and 3083591 columns (presolve time = 776s) ... Presolve removed 1845045 rows and 3092074 columns (presolve time = 780s) ... Presolve removed 1845045 rows and 3101750 columns (presolve time = 785s) ... Presolve removed 1845045 rows and 3102111 columns (presolve time = 790s) ... Presolve removed 1845045 rows and 3102111 columns (presolve time = 795s) ... Presolve removed 2102221 rows and 3105182 columns (presolve time = 800s) ... Presolve removed 2103121 rows and 3106082 columns (presolve time = 805s) ... Presolve removed 2409305 rows and 3412266 columns (presolve time = 810s) ... Presolve removed 2409422 rows and 3412266 columns (presolve time = 815s) ... Presolve removed 878741 rows and 2136167 columns Presolve time: 819.81s Presolved: 1170053 rows, 1126856 columns, 9696825 nonzeros Variable types: 866643 continuous, 260213 integer (260213 binary) Deterministic concurrent LP optimizer: dual simplex and barrier Showing barrier log only... Root barrier log... Elapsed ordering time = 5s Elapsed ordering time = 10s Elapsed ordering time = 15s Elapsed ordering time = 20s Elapsed ordering time = 23s Elapsed ordering time = 25s Elapsed ordering time = 30s Elapsed ordering time = 35s Ordering time: 38.00s Barrier statistics: Dense cols : 15 Free vars : 45 AA' NZ : 1.098e+07 Factor NZ : 1.037e+08 (roughly 1.6 GB of memory) Factor Ops : 1.004e+11 (roughly 3 seconds per iteration) Threads : 1 Objective Residual Iter Primal Dual Primal Dual Compl Time 0 1.83775338e+08 -6.15473769e+08 1.97e+04 1.80e+03 1.51e+04 960s 1 1.55390416e+08 -8.16831571e+08 1.69e+04 4.94e+02 1.28e+04 974s 2 3.20182804e+07 -8.14414961e+08 3.50e+03 5.79e+01 2.87e+03 983s 3 8.27115527e+06 -5.73148218e+08 8.72e+02 1.12e-02 8.01e+02 992s 4 2.24820085e+06 -2.85363223e+08 1.87e+02 1.11e-03 2.16e+02 1001s 5 1.39919581e+06 -1.04191211e+08 9.03e+01 2.76e-04 7.53e+01 1011s 6 8.47649907e+05 -3.98578660e+07 3.46e+01 6.98e-05 2.62e+01 1020s 7 5.78132640e+05 -1.38941783e+07 1.05e+01 1.79e-05 8.28e+00 1031s 8 4.58973089e+05 -3.75018769e+06 1.67e+00 4.07e-06 2.10e+00 1042s 9 4.15132964e+05 -1.89983136e+06 6.26e-01 2.69e-06 1.10e+00 1053s 10 3.49963928e+05 -2.38882886e+05 1.63e-01 3.04e-06 2.69e-01 1067s 11 3.05654611e+05 -3.88577274e+03 7.11e-02 2.75e-06 1.40e-01 1079s 12 2.75467294e+05 1.21166127e+05 3.84e-02 2.17e-06 6.94e-02 1091s 13 2.48368514e+05 1.72641031e+05 1.72e-02 1.76e-06 3.39e-02 1102s 14 2.30878017e+05 1.90621514e+05 5.37e-03 1.37e-06 1.79e-02 1113s 15 2.26909277e+05 2.06599047e+05 3.54e-03 8.82e-07 9.07e-03 1123s 16 2.23936015e+05 2.14313984e+05 2.16e-03 4.73e-07 4.30e-03 1132s 17 2.22858838e+05 2.15381496e+05 1.72e-03 4.13e-07 3.35e-03 1141s 18 2.21462647e+05 2.17447689e+05 1.09e-03 2.67e-07 1.80e-03 1149s 19 2.20997675e+05 2.18014808e+05 8.85e-04 2.18e-07 1.34e-03 1157s 20 2.20300944e+05 2.18204067e+05 5.74e-04 2.53e-07 9.40e-04 1165s 21 2.19946753e+05 2.18569131e+05 4.18e-04 3.01e-07 6.19e-04 1173s 22 2.19614026e+05 2.18833510e+05 2.73e-04 3.01e-07 3.51e-04 1182s 23 2.19331164e+05 2.18926725e+05 1.55e-04 2.17e-07 1.82e-04 1190s 24 2.19108686e+05 2.18940424e+05 6.01e-05 2.85e-07 7.58e-05 1199s 25 2.18983385e+05 2.18959596e+05 1.04e-05 6.83e-08 1.08e-05 1208s 26 2.18968063e+05 2.18964772e+05 1.51e-06 5.60e-09 1.49e-06 1218s 27 2.18965430e+05 2.18965226e+05 4.66e-07 1.44e-09 9.17e-08 1228s 28 2.18965387e+05 2.18965252e+05 1.43e-06 6.68e-10 6.06e-08 1238s 29 2.18965384e+05 2.18965252e+05 3.64e-06 6.83e-10 5.94e-08 1248s 30 2.18965384e+05 2.18965252e+05 5.77e-06 6.84e-10 5.94e-08 1257s 31 2.18965384e+05 2.18965252e+05 1.02e-05 1.13e-09 5.92e-08 1267s 32 2.18965382e+05 2.18965251e+05 1.00e-05 3.26e-09 5.88e-08 1277s 33 2.18965363e+05 2.18965253e+05 8.44e-06 2.79e-09 4.94e-08 1287s 34 2.18965363e+05 2.18965253e+05 8.41e-06 2.78e-09 4.92e-08 1297s 35 2.18965363e+05 2.18965253e+05 8.41e-06 2.78e-09 4.92e-08 1308s 36 2.18965362e+05 2.18965253e+05 1.51e-05 2.88e-09 4.89e-08 1318s 37 2.18965362e+05 2.18965253e+05 2.31e-05 2.89e-09 4.89e-08 1327s 38 2.18965361e+05 2.18965252e+05 2.28e-05 6.45e-09 4.90e-08 1337s Barrier performed 38 iterations in 1338.06 seconds (398.93 work units) Barrier solve interrupted - model solved by another algorithm Concurrent spin time: 0.93s Solved with dual simplex Root simplex log... Iteration Objective Primal Inf. Dual Inf. Time 789900 2.1896526e+05 0.000000e+00 0.000000e+00 1342s Extra simplex iterations after uncrush: 2108 Root relaxation: objective 2.189653e+05, 789900 iterations, 441.77 seconds (159.45 work units) Total elapsed time = 1343.24s (DegenMoves) Total elapsed time = 1369.31s (DegenMoves) Total elapsed time = 1377.06s (DegenMoves) Nodes | Current Node | Objective Bounds | Work Expl Unexpl | Obj Depth IntInf | Incumbent BestBd Gap | It/Node Time 0 0 218965.260 0 1966 - 218965.260 - - 1380s 0 0 221753.681 0 2400 - 221753.681 - - 1544s 0 0 221757.817 0 2393 - 221757.817 - - 1596s 0 0 221757.896 0 2392 - 221757.896 - - 1602s 0 0 222976.728 0 1971 - 222976.728 - - 1758s 0 0 222976.728 0 1968 - 222976.728 - - 1759s 0 0 222977.005 0 1942 - 222977.005 - - 1791s 0 0 222999.565 0 1850 - 222999.565 - - 1911s 0 0 223000.315 0 1852 - 223000.315 - - 1963s 0 0 223000.315 0 1856 - 223000.315 - - 1967s 0 0 223011.508 0 1809 - 223011.508 - - 2029s 0 0 223011.779 0 1828 - 223011.779 - - 2063s 0 0 223012.826 0 1834 - 223012.826 - - 2150s 0 0 223012.826 0 1837 - 223012.826 - - 2178s 0 0 223013.282 0 1844 - 223013.282 - - 2210s 0 0 223013.282 0 1843 - 223013.282 - - 2211s 0 0 223013.359 0 1825 - 223013.359 - - 2253s 0 0 223013.373 0 1835 - 223013.373 - - 2276s 0 0 223013.399 0 1836 - 223013.399 - - 2303s 0 0 223013.579 0 1836 - 223013.579 - - 2330s 0 0 223013.673 0 1829 - 223013.673 - - 2354s 0 0 223013.849 0 1801 - 223013.849 - - 2377s 0 0 223013.849 0 1355 - 223013.849 - - 2477s 0 2 223013.849 0 1314 - 223013.849 - - 2899s 1 5 223013.849 1 1313 - 223013.849 - 2289 2905s 3 6 223016.658 2 1342 - 223013.849 - 2986 2928s 5 8 223013.849 2 1311 - 223013.849 - 1946 2935s 11 14 223013.849 4 1313 - 223013.849 - 1126 2943s 15 18 223013.849 6 1310 - 223013.849 - 924 2947s 17 24 223013.849 7 1311 - 223013.849 - 828 2950s 23 32 223013.849 9 1309 - 223013.849 - 637 2959s 31 48 223013.849 11 1311 - 223013.849 - 655 2987s Cutting planes: Learned: 1 Gomory: 16 Lift-and-project: 12 Implied bound: 124 MIR: 1854 Flow cover: 1997 Flow path: 52 RLT: 173 Relax-and-lift: 236 Explored 47 nodes (1302946 simplex iterations) in 3010.43 seconds (922.96 work units) Thread count was 2 (of 8 available processors) Solution count 0 Solve interrupted (error code 10001) Best objective -, best bound 2.230138490788e+05, gap -
Regards,
Vida
0 -
Hi Vida,
You could try setting Method=0 or 1 and reducing the Threads parameter to 1. If this also does not help, then I think that unfortunately the only option remaining is to switch to a machine with more memory.
Alternatively, you could try to reduce the model size. Depending on the application, this may not be possible.
Best regards,
Jaromił0 -
Hi Jaromil,
Thanks for your comment and sorry for my late response.
I have to change my machine. Could you please guide me on choosing the best machine that suits my optimization problem?
Regards,
Vida
0 -
Hi Vida,
For you models I would recommend at least 64GB RAM. You can find more information in the Knowledge Base article How does Gurobi perform on different computer hardware?
You could use a cloud machine. Those are usually very strong with enough RAM and you might get some discount as a student.
Best regards,
Jaromił0 -
Hi Jaromil,
Thank you for your response. Could you please guide me on using cloud machine service? I am using Python. Now, I am using the following CPU on another machine, but I am not sure if it will be helpful or not.
CPU model: Intel(R) Xeon(R) Platinum 8488C, instruction set [SSE2|AVX|AVX2|AVX512] Thread count: 16 physical cores, 32 logical processors, using up to 32 threads
Regards,
Vida
0 -
Hi Vida,
The Knowledge Base article How do I switch to using Gurobi Instant Cloud? provides the steps to use Gurobi in an Instant Cloud. I would only recommend switching to a Cloud machine if you do not have access to a different machine with enough RAM.
Now, I am using the following CPU on another machine, but I am not sure if it will be helpful or not.
The CPU looks fine. For your application it is important to have enough memory. How much RAM does the machine have? As mentioned before, 64GB should be enough for you. Anything more than that cannot hurt either.
Best regards,
Jaromił0 -
For users with academic licenses, please see What are the options for using an academic license on the cloud?
0
Please sign in to leave a comment.
Comments
12 comments