[Cbc] Enabling multithreading with CbcMain1

acw at ascent.com acw at ascent.com
Tue Jul 28 17:30:21 EDT 2009


OK, I think I have a reproducible test case.

The background is that we are not reading our problem from an MPS file; 
rather, we are building the model programmatically.  In a driver4-like 
application, we're getting strange behavior including segmentation faults. 
 It's likely that I'm simply making a mistake in the way I build the 
model.  All I can say in my defense is that it used to work.

To reproduce, start with driver4.cpp and delete the four lines of code 
used to construct the model from the MPS file.  On the web page, these are 
lines 211-214 inclusive.  Replace them with the following code to 
construct a simple problem:

  int nRows = 3;
  int nCols = 2;
  int nEntries = 6;
  double elements[6] = {1, 3, 5, 3, 1, 7};
  int rows[6] = {2, 1, 0, 2, 1, 0};
  CoinBigIndex start[3] = {0, 3, 6};
  int length[2] = {3, 3};
  CoinPackedMatrix matrix(true, nRows, nCols, nEntries,
                          elements, rows, start, length);
  double colLower[2] = {0, 0};
  double colUpper[2] = {1e+27, 1e+27};
  double objective[2] = {-1, -1};
  double rowLower[3] = {47, -COIN_DBL_MAX, -COIN_DBL_MAX};
  double rowUpper[3] = {COIN_DBL_MAX, 25, 19};
  solver1.loadProblem(matrix, colLower, colUpper, objective, rowLower, 
rowUpper);
  solver1.getModelPtr()->setMoreSpecialOptions(3);
  solver1.setInteger(0);

When this modified driver4 is compiled and run, it segfaults right around 
the place it ought to be printing out the answer.  As far as I can tell, 
it gets through CbcMain1 just fine, and finds a solution ... but then 
blows out reporting it.  We'd greatly appreciate some advice.  Thank you.



From:
John J Forrest <jjforre at us.ibm.com>
To:

Cc:
cbc at list.coin-or.org
Date:
07/15/2009 10:07 PM
Subject:
Re: [Cbc] Enabling multithreading with CbcMain1



Not really enough to go on. Simple test seems OK. If you can send me 
something to replicate I can test.

John Forrest

acw---07/15/2009 06:44:53 PM---We are trying to enable multithreading in 
our Cbc-based application. Our application was modeled o


From:

acw at ascent.com

To:

cbc at list.coin-or.org

Cc:

dev at ascent.com

Date:

07/15/2009 06:44 PM

Subject:

[Cbc] Enabling multithreading with CbcMain1

Sent by:

cbc-bounces at list.coin-or.org




We are trying to enable multithreading in our Cbc-based application. Our 
application was modeled on Cbc/examples/driver4.cpp, though we use custom 
code to assemble the model, rather than reading from an MPS file. 

We are seeing an exception and process quit in our early attempts to 
specify the thread count. 

The important bit is: 

const char * argv2[ ] = {"driver3", "-threads", "0", "-solve", "-quit"}; 
CbcMain1(5, argv2, modelA, callBack); 

The failure definitely occurs after control is handed to CbcMain1. Have we 
specified argv2 wrongly? I just noticed that we got the command name wrong 
("driver3") but I'm pretty sure this "zeroth" argument is ignored by 
CbcMain1. 

My understanding is that "-threads 0" disables multithreading in the 
command-line interface; we were just testing the syntax before trying to 
enable multithreading. 

Thanks for your assistance._______________________________________________
Cbc mailing list
Cbc at list.coin-or.org
http://list.coin-or.org/mailman/listinfo/cbc

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

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://list.coin-or.org/pipermail/cbc/attachments/20090728/c27cc539/attachment.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: image/gif
Size: 105 bytes
Desc: not available
Url : http://list.coin-or.org/pipermail/cbc/attachments/20090728/c27cc539/attachment.gif 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: image/gif
Size: 45 bytes
Desc: not available
Url : http://list.coin-or.org/pipermail/cbc/attachments/20090728/c27cc539/attachment-0001.gif 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: image/gif
Size: 45 bytes
Desc: not available
Url : http://list.coin-or.org/pipermail/cbc/attachments/20090728/c27cc539/attachment-0002.gif 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: image/gif
Size: 45 bytes
Desc: not available
Url : http://list.coin-or.org/pipermail/cbc/attachments/20090728/c27cc539/attachment-0003.gif 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: image/gif
Size: 45 bytes
Desc: not available
Url : http://list.coin-or.org/pipermail/cbc/attachments/20090728/c27cc539/attachment-0004.gif 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: image/gif
Size: 45 bytes
Desc: not available
Url : http://list.coin-or.org/pipermail/cbc/attachments/20090728/c27cc539/attachment-0005.gif 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: image/gif
Size: 45 bytes
Desc: not available
Url : http://list.coin-or.org/pipermail/cbc/attachments/20090728/c27cc539/attachment-0006.gif 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: image/gif
Size: 45 bytes
Desc: not available
Url : http://list.coin-or.org/pipermail/cbc/attachments/20090728/c27cc539/attachment-0007.gif 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: image/gif
Size: 45 bytes
Desc: not available
Url : http://list.coin-or.org/pipermail/cbc/attachments/20090728/c27cc539/attachment-0008.gif 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: image/gif
Size: 45 bytes
Desc: not available
Url : http://list.coin-or.org/pipermail/cbc/attachments/20090728/c27cc539/attachment-0009.gif 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: image/gif
Size: 45 bytes
Desc: not available
Url : http://list.coin-or.org/pipermail/cbc/attachments/20090728/c27cc539/attachment-0010.gif 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: image/gif
Size: 45 bytes
Desc: not available
Url : http://list.coin-or.org/pipermail/cbc/attachments/20090728/c27cc539/attachment-0011.gif 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: image/gif
Size: 45 bytes
Desc: not available
Url : http://list.coin-or.org/pipermail/cbc/attachments/20090728/c27cc539/attachment-0012.gif 


More information about the Cbc mailing list