Reputation: 21
I'm using Julia language (Version 1.3.1), JuMP package (Version 0.20.1) and Cbc package (Version 0.6.6) to solve an optimization problem in a docker container with ubuntu:16.04. The optimizer Cbc seems to be hung, with 100% cpu usage, without exiting and without any message. The problems happens rarely on similar problem and seems to be not replicable: if I run the same code with the same data it doesn't hang anymore. Hope that backtrace got through gdb can be useful.
I can share my model, if needed. It has 11520 variables, 4652 constraints, 10080 variables used in linear objective function.
This is the log of Cbc optimizer:
Welcome to the CBC MILP Solver Version: 2.10.3 Build Date: Oct 7 2019
command line - Cbc_C_Interface -threads 0 -seconds 360.0 -maxNodes 30000 -logLevel 1 -solve -quit (default strategy 1) seconds was changed from 1e+100 to 360 maxNodes was changed from 2147483647 to 30000 Continuous objective value is 2.3607e+08 - 0.11 seconds Cgl0002I 3197 variables fixed Cgl0005I 7 SOS with 8323 members Cgl0004I processed model has 15 rows, 8323 columns (8323 integer (8323 of which binary)) and 26556 elements Cbc0045I Fixing only non-zero variables. Cbc0045I Warning: mipstart values could not be used to build a solution.
Here Cbc seems to be hung and becomes unresponsive, with 100% cpu usage.
Here the backtrace on the running pid process:
#0 0x00007f163c3facc9 in ?? () from target:/root/.julia/packages/Cbc/vWzyC/deps/usr/lib/libCbcSolver.so #1 0x00007f163c4125b3 in ?? () from target:/root/.julia/packages/Cbc/vWzyC/deps/usr/lib/libCbcSolver.so #2 0x00007f163c467586 in ?? () from target:/root/.julia/packages/Cbc/vWzyC/deps/usr/lib/libCbcSolver.so #3 0x00007f163c46aebc in ?? () from target:/root/.julia/packages/Cbc/vWzyC/deps/usr/lib/libCbcSolver.so #4 0x00007f163c40594a in ?? () from target:/root/.julia/packages/Cbc/vWzyC/deps/usr/lib/libCbcSolver.so #5 0x00007f163c29afbe in ?? () from target:/root/.julia/packages/Cbc/vWzyC/deps/usr/lib/libCbcSolver.so #6 0x00007f163c2ad844 in ?? () from target:/root/.julia/packages/Cbc/vWzyC/deps/usr/lib/libCbcSolver.so #7 0x00007f163b8ea31f in CbcHeuristicDive::solution(double&, int&, int&, OsiRowCut**, CbcSubProblem&, double*) () from target:/root/.julia/packages/Cbc/vWzyC/deps/usr/lib/libCbc.so.3 #8 0x00007f163b8ebf42 in CbcHeuristicDive::solution(double&, double*) () from target:/root/.julia/packages/Cbc/vWzyC/deps/usr/lib/libCbc.so.3 #9 0x00007f163b938fd2 in CbcModel::solveWithCuts(OsiCuts&, int, CbcNode*) () from target:/root/.julia/packages/Cbc/vWzyC/deps/usr/lib/libCbc.so.3 #10 0x00007f163b9472d7 in CbcModel::branchAndBound(int) () from target:/root/.julia/packages/Cbc/vWzyC/deps/usr/lib/libCbc.so.3 #11 0x00007f163c214c47 in CbcMain1(int, char const, CbcModel&, int ()(CbcModel, int), CbcSolverUsefulData&) () from target:/root/.julia/packages/Cbc/vWzyC/deps/usr/lib/libCbcSolver.so #12 0x00007f163c2252ae in CbcMain1(int, char const**, CbcModel&) () from target:/root/.julia/packages/Cbc/vWzyC/deps/usr/lib/libCbcSolver.so #13 0x00007f163c19bc50 in Cbc_solve () from target:/root/.julia/packages/Cbc/vWzyC/deps/usr/lib/libCbcSolver.so #14 0x00007f16698e7e71 in ?? () #15 0x000000000000000c in ?? () #16 0x00007fff70694480 in ?? () #17 0x00007f16604ce110 in ?? () #18 0x000000000000262e in ?? () #19 0x0000000000000006 in ?? () #20 0x00007fff70694480 in ?? () #21 0x00007f165966ab40 in ?? () #22 0x00007f164a7ce1d0 in ?? () #23 0x00007f164a7ce220 in ?? () #24 0x00007f164a7ce1d0 in ?? () #25 0x00007f1688be7b00 in ?? () at /buildworker/worker/package_linux64/build/src/array.c:738 from target:/opt/julia/bin/../lib/libjulia.so.1 #26 0x00007f163d909af0 in ?? () #27 0x00007f164439d3c0 in ?? () #28 0x00007f1689524200 in ?? () #29 0x0000000000000000 in ?? ()
Using next
command in gdb
console, than a StackOverflowError() error is catched on CbC.
Has the objective function too many terms?
Any help is really appreciable.
Thank you
Upvotes: 1
Views: 668
Reputation: 1
You can set the time limit using the seconds parameter as follows.
For newer package versions:
model = Model(optimizer_with_attributes(Cbc.Optimizer
,"seconds" => 60
,"threads" => 4
,"loglevel" => 0
,"ratioGap" => 0.0001))
Or like this for older package versions:
model = Model(with_optimizer(Cbc.Optimizer
,seconds=60
,threads=4
,loglevel=0
,ratioGap=0.0001))
Upvotes: 0
Reputation: 2574
This appears to be an issue with Cbc. It's impossible to provide more advice without a reproducible example. I suggest you try to simplify your model and create an MPS file.
Upvotes: 0