Run parallel version of COIN-OR CBC

338 views
Skip to first unread message

Gabriel Hjort Åkerlund

unread,
Jan 5, 2022, 8:59:50 AM1/5/22
to MiniZinc
Hi,

I want to try running the COIN-OR CBC solver in multithreaded mode. According to the documentation it says that "-p N" should do that together with "--enabled-cbc-parallel" (which I had to wrap inside "--cbcFlag", or else minizinc rejects it), but it doesn't seem to make any difference when I view the process in top. Am I doing something wrong?

The command I'm running is:
$ minizinc --solver cbc model.mzn -p 4 --cbcFlag enable-cbc-parallel

Cheers,
Gabriel

Gleb Belov

unread,
Jan 6, 2022, 4:09:44 AM1/6/22
to MiniZinc
--enable-cbc-parallel is a flag to be used when compiling CBC. Now with coinbrew there may
 be a different form to switch on multithreading in CBC code.

No need to indicate it when running, just use -p4 or --cbcFlag "threads 4" then

Gabriel Hjort Åkerlund

unread,
Jan 7, 2022, 3:32:45 AM1/7/22
to MiniZinc
Indeed, you are correct! It is sufficient to simply add -pN. The problem was that I didn't wait enough time for everything to get started; it's a huge model so it apparently takes about 5 minutes until all threads are spawned. Thanks!

Cheers,
Gabriel

Reply all
Reply to author
Forward
0 new messages