[Cbc] Parallell CBC

Bjørn Sigurd Johansen (Spider Solutions AS) bjorn.sigurd.johansen at spidersolutions.no
Thu Jul 14 07:09:20 EDT 2016


Thanks, I was able to download and run CBC 2.9.7, but I seem to get a hang:  During the first 3 seconds, the below output is given.  Then there is no more output, and TaskManager show no CPU activity for CBC.exe.


Welcome to the CBC MILP Solver
Version: 2.9.7
Build Date: Nov 24 2015
command line - C:\Users\bjorn_000\AppData\Roaming\Microsoft\AddIns\Solvers\win64\cbc.exe -threads 2 -directory C:\Dropbox\kh\Optimize\ModelsAndSolutions -import C:\Dropbox\kh\Optimize\ModelsAndSolutions\ModelForGurobi.lp -seconds 999 -maxIterations 50000 -ratioGap 0 -solve -solution C:\Dropbox\kh\Optimize\ModelsAndSolutions\Solution.txt (default strategy 1)
threads was changed from 0 to 2
seconds was changed from 1e+100 to 999
maxIterations was changed from 2147483647 to 50000
ratioGap was changed from 0 to 0
Continuous objective value is 178.167 - 0.08 seconds
Cgl0003I 0 fixed, 0 tightened bounds, 1 strengthened rows, 5 substitutions
Cgl0003I 0 fixed, 0 tightened bounds, 1 strengthened rows, 0 substitutions
Cgl0003I 0 fixed, 0 tightened bounds, 1 strengthened rows, 0 substitutions
Cgl0003I 0 fixed, 0 tightened bounds, 1 strengthened rows, 0 substitutions
Cgl0003I 0 fixed, 0 tightened bounds, 1 strengthened rows, 0 substitutions
Cgl0003I 0 fixed, 0 tightened bounds, 1 strengthened rows, 0 substitutions
Cgl0003I 0 fixed, 0 tightened bounds, 1 strengthened rows, 0 substitutions
Cgl0003I 0 fixed, 0 tightened bounds, 1 strengthened rows, 0 substitutions
Cgl0003I 0 fixed, 0 tightened bounds, 1 strengthened rows, 0 substitutions
Cgl0004I processed model has 2400 rows, 2976 columns (2973 integer (1497 of which binary)) and 43145 elements
Cbc0038I Initial state - 16 integers unsatisfied sum - 3.95151
Cbc0038I Pass   1: suminf.    1.27858 (7) obj. 786.122 iterations 1458
Cbc0038I Pass   2: suminf.    0.82530 (3) obj. 1498.29 iterations 288
Cbc0038I Solution found of 1498.29
Cbc0038I Branch and bound needed to clear up 3 general integers
Cbc0038I Full problem 2400 rows 2976 columns, reduced to 19 rows 17 columns
Cbc0038I Cleaned solution of 1092.61
Cbc0038I Before mini branch and bound, 2948 integers at bound fixed and 1 continuous of which 1 were internal integer and 0 internal continuous
Cbc0038I Full problem 2400 rows 2976 columns, reduced to 32 rows 24 columns
Cbc0038I Mini branch and bound did not improve solution (1.12 seconds)
Cbc0038I Freeing continuous variables gives a solution of 1092.61
Cbc0038I Round again with cutoff of 1001.22
Cbc0038I Reduced cost fixing fixed 31 variables on major pass 2
Cbc0038I Pass   3: suminf.    1.27858 (7) obj. 786.122 iterations 0
Cbc0038I Pass   4: suminf.    1.24256 (7) obj. 1001.22 iterations 961
Cbc0038I Pass   5: suminf.    0.73804 (7) obj. 1001.22 iterations 5
Cbc0038I Pass   6: suminf.    1.20089 (5) obj. 1001.22 iterations 1597
Cbc0038I Pass   7: suminf.    1.24057 (5) obj. 1001.22 iterations 622
Cbc0038I Solution found of 1001.22
Cbc0038I Branch and bound needed to clear up 5 general integers
Cbc0038I Mini branch and bound could not fix general integers
Cbc0038I No solution found this major pass
Cbc0038I Before mini branch and bound, 2941 integers at bound fixed and 1 continuous
Cbc0038I Full problem 2400 rows 2976 columns, reduced to 42 rows 32 columns
Cbc0038I Mini branch and bound did not improve solution (1.70 seconds)
Cbc0038I After 1.72 seconds - Feasibility pump exiting with objective of 1092.61 - took 0.97 seconds
Cbc0012I Integer solution of 1092.6135 found by feasibility pump after 0 iterations and 0 nodes (1.72 seconds)
Cbc0038I Full problem 2400 rows 2976 columns, reduced to 32 rows 24 columns
Cbc0012I Integer solution of 719.2773 found by RINS after 0 iterations and 0 nodes (1.87 seconds)
Cbc0031I 9 added rows had average density of 240.55556
Cbc0013I At root node, 9 cuts changed objective from 178.71006 to 179.02719 in 5 passes
Cbc0014I Cut generator 0 (Probing) - 0 row cuts average 0.0 elements, 1 column cuts (1 active)  in 0.314 seconds - new frequency is 1
Cbc0014I Cut generator 1 (Gomory) - 2 row cuts average 6.0 elements, 0 column cuts (0 active)  in 0.019 seconds - new frequency is 1
Cbc0014I Cut generator 2 (Knapsack) - 0 row cuts average 0.0 elements, 0 column cuts (0 active)  in 0.031 seconds - new frequency is -100
Cbc0014I Cut generator 3 (Clique) - 0 row cuts average 0.0 elements, 0 column cuts (0 active)  in 0.000 seconds - new frequency is -100
Cbc0014I Cut generator 4 (MixedIntegerRounding2) - 11 row cuts average 679.7 elements, 0 column cuts (0 active)  in 0.053 seconds - new frequency is 1
Cbc0014I Cut generator 5 (FlowCover) - 5 row cuts average 4.8 elements, 0 column cuts (0 active)  in 0.018 seconds - new frequency is 1
Cbc0014I Cut generator 6 (TwoMirCuts) - 2 row cuts average 6.0 elements, 0 column cuts (0 active)  in 0.033 seconds - new frequency is -100
Cbc0010I After 0 nodes, 1 on tree, 719.2773 best solution, best possible 179.02719 (2.70 seconds)
Cbc0012I Integer solution of 606.0903 found by DiveCoefficient after 106 iterations and 2 nodes (3.16 seconds)
Cbc0012I Integer solution of 606.0903 found by heuristic after 84 iterations and 1 nodes (3.28 seconds)

From: Ted Ralphs [mailto:ted at lehigh.edu]
Sent: 14. juli 2016 12:12
To: Bjørn Sigurd Johansen (Spider Solutions AS) <bjorn.sigurd.johansen at spidersolutions.no>
Cc: Haroldo Gambini Santos <haroldo.santos at gmail.com>; cbc at list.coin-or.org
Subject: Re: [Cbc] Parallell CBC

It seems the binary provided by AMPL works in parallel: http://ampl.com/dl/open/cbc/cbc-win64.zip

That one is at version 2.9.7. Otherwise, it is easy to build a Cbc binary on Windows using MinGW by modifying the instructions here:

https://projects.coin-or.org/SYMPHONY/wiki/BuildAndInstall#BUILDINGWITHMSys2orCYGWIN

The instructions are for SYMPHONY, but it should be clear how to modify them for Cbc. You also need to add the configuration option --enable-parallel, as Haroldo mentioned.

By the way, I also got an automated build and test setup for Windows working via Appveyor a while back and it should be relatively easy to upload the built binaries from there to somewhere you can download:

https://ci.appveyor.com/project/tkralphs/cbc

I'm thinking about how to make that work. I'm also working on a docker image with pre-built binaries, which will be pushed soon.

Cheers,

Ted

On Wed, Jul 13, 2016 at 4:45 PM, Bjørn Sigurd Johansen (Spider Solutions AS) <bjorn.sigurd.johansen at spidersolutions.no<mailto:bjorn.sigurd.johansen at spidersolutions.no>> wrote:
Thank you, but the build from https://projects.coin-or.org/Cmpl  =>  http://www.coliop.org/download.html  seems to be even older:

C:\Users\bjorn_000>C:\tmp\cbc.exe
Welcome to the CBC MILP Solver
Version: Trunk (unstable)
Build Date: Mar  9 2015
Revision Number: 2156

Any other suggestions on how to get 2.9.8 cbc.exe for Win64 ?


-----Original Message-----
From: Haroldo Gambini Santos [mailto:haroldo.santos at gmail.com<mailto:haroldo.santos at gmail.com>]
Sent: 13. juli 2016 16:06
To: Bjørn Sigurd Johansen (Spider Solutions AS) <bjorn.sigurd.johansen at spidersolutions.no<mailto:bjorn.sigurd.johansen at spidersolutions.no>>; cbc at list.coin-or.org<mailto:cbc at list.coin-or.org>
Subject: Re: [Cbc] Parallell CBC

Hi,

AFAIK the visual studio build does not includes pthread and is not parallel.

It is possible to build in windows a parallel version using MINGW
(http://www.mingw.org/) by adding --enable-cbc-parallel .

I strongly suggest that you update to version 2.9.8, many bugs were solved.

I think that CMPL provides the 2.9.8 CBC version for windows bundled.
https://projects.coin-or.org/Cmpl


Cheers,



Em 13-07-2016 03:54, Bjørn Sigurd Johansen (Spider Solutions AS) escreveu:
> Dear CBC,
>
>
>
> I am using CBC 2.9.4 for MILP problem, but is not able to run in
> parallel.  Using the option "-threads <some number>" makes CBC hang
> after a few seconds.
>
> Is there a new Win64 cbc.exe that properly handles the "-threads"
> option?  (And possibly with improved MILP performance?)
>
>
>
>
>
> *CBC stops after the following print:*
>
> C:\Users\bjorn_000>C:\Users\bjorn_000\AppData\Roaming\Microsoft\AddIns
> \Solvers\win64\cbc.exe -threads 2 -directory
> "C:\Dropbox\kh\Optimize\ModelsAndSolutions"
> -import "C:\Dropbox\kh\Optimize\ModelsAndSolutions\ModelForGurobi.lp"
> -seconds 20 -maxIterations 50000 -ratioGap 0 -solve -solution
> "C:\Dropbox\kh\Optimize\ModelsAndSolutions\Solution.txt"
>
> Welcome to the CBC MILP Solver
>
> Version: 2.9.4
>
> Build Date: May 18 2015
>
>
>
> command line -
> C:\Users\bjorn_000\AppData\Roaming\Microsoft\AddIns\Solvers\win64\cbc.
> exe -threads
> 2 -directory C:\Dropbox\kh\Optimize\ModelsAndSolutions -import
> C:\Dropbox\kh\Optimize\ModelsAndSolutions\ModelForGurobi.lp -seconds
> 20 -maxIterations 50000 -ratioGap 0 -solve -solution
> C:\Dropbox\kh\Optimize\ModelsAndSolutions\Solution.txt (default
> strategy 1)
>
> threads was changed from 0 to 2
>
> seconds was changed from 1e+100 to 20
>
> maxIterations was changed from 2147483647 to 50000
>
> ratioGap was changed from 0 to 0
>
> Continuous objective value is 178.167 - 0.09 seconds
>
> Cgl0003I 0 fixed, 0 tightened bounds, 1 strengthened rows, 5
> substitutions
>
> Cgl0003I 0 fixed, 0 tightened bounds, 1 strengthened rows, 0
> substitutions
>
> Cgl0003I 0 fixed, 0 tightened bounds, 1 strengthened rows, 0
> substitutions
>
> Cgl0003I 0 fixed, 0 tightened bounds, 1 strengthened rows, 0
> substitutions
>
> Cgl0003I 0 fixed, 0 tightened bounds, 1 strengthened rows, 0
> substitutions
>
> Cgl0003I 0 fixed, 0 tightened bounds, 1 strengthened rows, 0
> substitutions
>
> Cgl0003I 0 fixed, 0 tightened bounds, 1 strengthened rows, 0
> substitutions
>
> Cgl0003I 0 fixed, 0 tightened bounds, 1 strengthened rows, 0
> substitutions
>
> Cgl0003I 0 fixed, 0 tightened bounds, 1 strengthened rows, 0
> substitutions
>
> Cgl0004I processed model has 2400 rows, 2976 columns (2973 integer
> (1497 of which binary)) and 43145 elements
>
> Cbc0038I Initial state - 16 integers unsatisfied sum - 3.95151
>
> Cbc0038I Pass   1: suminf.    1.27858 (7) obj. 786.122 iterations 1458
>
> Cbc0038I Pass   2: suminf.    0.82530 (3) obj. 1498.29 iterations 288
>
> Cbc0038I Solution found of 1498.29
>
> Cbc0038I Branch and bound needed to clear up 3 general integers
>
> Cbc0038I Full problem 2400 rows 2976 columns, reduced to 19 rows 17
> columns
>
> Cbc0038I Cleaned solution of 1092.61
>
> Cbc0038I Before mini branch and bound, 2948 integers at bound fixed
> and
> 1 continuous of which 1 were internal integer and 0 internal
> continuous
>
> Cbc0038I Full problem 2400 rows 2976 columns, reduced to 32 rows 24
> columns
>
> Cbc0038I Mini branch and bound did not improve solution (1.10 seconds)
>
> Cbc0038I Freeing continuous variables gives a solution of 1092.61
>
> Cbc0038I Round again with cutoff of 1001.22
>
> Cbc0038I Reduced cost fixing fixed 31 variables on major pass 2
>
> Cbc0038I Pass   3: suminf.    1.27858 (7) obj. 786.122 iterations 0
>
> Cbc0038I Pass   4: suminf.    1.24256 (7) obj. 1001.22 iterations 961
>
> Cbc0038I Pass   5: suminf.    0.73804 (7) obj. 1001.22 iterations 5
>
> Cbc0038I Pass   6: suminf.    1.20089 (5) obj. 1001.22 iterations 1597
>
> Cbc0038I Pass   7: suminf.    1.24057 (5) obj. 1001.22 iterations 622
>
> Cbc0038I Solution found of 1001.22
>
> Cbc0038I Branch and bound needed to clear up 5 general integers
>
> Cbc0038I Mini branch and bound could not fix general integers
>
> Cbc0038I No solution found this major pass
>
> Cbc0038I Before mini branch and bound, 2941 integers at bound fixed
> and
> 1 continuous
>
> Cbc0038I Full problem 2400 rows 2976 columns, reduced to 42 rows 32
> columns
>
> Cbc0038I Mini branch and bound did not improve solution (1.69 seconds)
>
> Cbc0038I After 1.69 seconds - Feasibility pump exiting with objective
> of
> 1092.61 - took 0.94 seconds
>
> Cbc0012I Integer solution of 1092.6135 found by feasibility pump after
> 0 iterations and 0 nodes (1.69 seconds)
>
> Cbc0038I Full problem 2400 rows 2976 columns, reduced to 32 rows 24
> columns
>
> Cbc0012I Integer solution of 719.2773 found by RINS after 0 iterations
> and 0 nodes (1.84 seconds)
>
> Cbc0031I 11 added rows had average density of 528.81818
>
> Cbc0013I At root node, 11 cuts changed objective from 178.71006 to
> 179.04079 in 10 passes
>
> Cbc0014I Cut generator 0 (Probing) - 0 row cuts average 0.0 elements,
> 1 column cuts (1 active)  in 0.598 seconds - new frequency is 1
>
> Cbc0014I Cut generator 1 (Gomory) - 12 row cuts average 1499.0
> elements,
> 0 column cuts (0 active)  in 0.095 seconds - new frequency is 1
>
> Cbc0014I Cut generator 2 (Knapsack) - 0 row cuts average 0.0 elements,
> 0 column cuts (0 active)  in 0.054 seconds - new frequency is -100
>
> Cbc0014I Cut generator 3 (Clique) - 0 row cuts average 0.0 elements, 0
> column cuts (0 active)  in 0.002 seconds - new frequency is -100
>
> Cbc0014I Cut generator 4 (MixedIntegerRounding2) - 14 row cuts average
> 652.2 elements, 0 column cuts (0 active)  in 0.166 seconds - new
> frequency is 1
>
> Cbc0014I Cut generator 5 (FlowCover) - 8 row cuts average 4.5
> elements,
> 0 column cuts (0 active)  in 0.023 seconds - new frequency is 1
>
> Cbc0014I Cut generator 6 (TwoMirCuts) - 2 row cuts average 6.0
> elements,
> 0 column cuts (0 active)  in 0.058 seconds - new frequency is -100
>
> Cbc0010I After 0 nodes, 1 on tree, 719.2773 best solution, best
> possible
> 179.04079 (3.24 seconds)
>
> Cbc0012I Integer solution of 266.2883 found by DiveCoefficient after
> 104 iterations and 1 nodes (3.38 seconds)
>
> Cbc0012I Integer solution of 266.2883 found by heuristic after 98
> iterations and 0 nodes (3.56 seconds)
>
>
>
> Best regards,
>
>
>
>
>
> _______________________________________________
> Cbc mailing list
> Cbc at list.coin-or.org<mailto:Cbc at list.coin-or.org>
> http://list.coin-or.org/mailman/listinfo/cbc
>

--
==================================================
Haroldo Gambini Santos
D.Sc, Computer Science
Universidade Federal de Ouro Preto
http://www.decom.ufop.br/haroldo/

_______________________________________________
Cbc mailing list
Cbc at list.coin-or.org<mailto:Cbc at list.coin-or.org>
http://list.coin-or.org/mailman/listinfo/cbc



--
Dr. Ted Ralphs
Professor, Lehigh University
(610) 628-1280
ted 'at' lehigh 'dot' edu
coral.ie.lehigh.edu/~ted<http://coral.ie.lehigh.edu/~ted>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://list.coin-or.org/pipermail/cbc/attachments/20160714/d51ecd97/attachment-0001.html>


More information about the Cbc mailing list