<br><font size=2 face="sans-serif">OK, I think I have a reproducible test
case.</font>
<br>
<br><font size=2 face="sans-serif">The background is that we are <i>not</i>
reading our problem from an MPS file; rather, we are building the model
programmatically. &nbsp;In a driver4-like application, we're getting strange
behavior including segmentation faults. &nbsp;It's likely that I'm simply
making a mistake in the way I build the model. &nbsp;All I can say in my
defense is that it <i>used</i> to work.</font>
<br>
<br><font size=2 face="sans-serif">To reproduce, start with driver4.cpp
and delete the four lines of code used to construct the model from the
MPS file. &nbsp;On the web page, these are lines 211-214 inclusive. &nbsp;Replace
them with the following code to construct a simple problem:</font>
<br>
<br><tt><font size=2>&nbsp; int nRows = 3;</font></tt>
<br><tt><font size=2>&nbsp; int nCols = 2;</font></tt>
<br><tt><font size=2>&nbsp; int nEntries = 6;</font></tt>
<br><tt><font size=2>&nbsp; double elements[6] = {1, 3, 5, 3, 1, 7};</font></tt>
<br><tt><font size=2>&nbsp; int rows[6] = {2, 1, 0, 2, 1, 0};</font></tt>
<br><tt><font size=2>&nbsp; CoinBigIndex start[3] = {0, 3, 6};</font></tt>
<br><tt><font size=2>&nbsp; int length[2] = {3, 3};</font></tt>
<br><tt><font size=2>&nbsp; CoinPackedMatrix matrix(true, nRows, nCols,
nEntries,</font></tt>
<br><tt><font size=2>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; elements, rows, start, length);</font></tt>
<br><tt><font size=2>&nbsp; double colLower[2] = {0, 0};</font></tt>
<br><tt><font size=2>&nbsp; double colUpper[2] = {1e+27, 1e+27};</font></tt>
<br><tt><font size=2>&nbsp; double objective[2] = {-1, -1};</font></tt>
<br><tt><font size=2>&nbsp; double rowLower[3] = {47, -COIN_DBL_MAX, -COIN_DBL_MAX};</font></tt>
<br><tt><font size=2>&nbsp; double rowUpper[3] = {COIN_DBL_MAX, 25, 19};</font></tt>
<br><tt><font size=2>&nbsp; solver1.loadProblem(matrix, colLower, colUpper,
objective, rowLower, rowUpper);</font></tt>
<br><tt><font size=2>&nbsp; solver1.getModelPtr()-&gt;setMoreSpecialOptions(3);</font></tt>
<br><tt><font size=2>&nbsp; solver1.setInteger(0);</font></tt>
<br>
<br><font size=2 face="sans-serif">When this modified driver4 is compiled
and run, it segfaults right around the place it ought to be printing out
the answer. &nbsp;As far as I can tell, it gets through CbcMain1 just fine,
and finds a solution ... but then blows out reporting it. &nbsp;We'd greatly
appreciate some advice. &nbsp;Thank you.</font>
<br>
<br>
<br>
<table width=100%>
<tr valign=top>
<td><font size=1 color=#5f5f5f face="sans-serif">From:</font>
<td><font size=1 face="sans-serif">John J Forrest &lt;jjforre@us.ibm.com&gt;</font>
<tr valign=top>
<td><font size=1 color=#5f5f5f face="sans-serif">To:</font>
<td>
<tr>
<td valign=top><font size=1 color=#5f5f5f face="sans-serif">Cc:</font>
<td><font size=1 face="sans-serif">cbc@list.coin-or.org</font>
<tr valign=top>
<td><font size=1 color=#5f5f5f face="sans-serif">Date:</font>
<td><font size=1 face="sans-serif">07/15/2009 10:07 PM</font>
<tr valign=top>
<td><font size=1 color=#5f5f5f face="sans-serif">Subject:</font>
<td><font size=1 face="sans-serif">Re: [Cbc] Enabling multithreading with
CbcMain1</font></table>
<br>
<hr noshade>
<br>
<br>
<br><font size=3>Not really enough to go on. Simple test seems OK. If you
can send me something to replicate I can test.<br>
<br>
John Forrest<br>
<br>
</font><img src=cid:_1_05A97EC005A97B30007622BB85257601 alt="Inactive hide details for acw---07/15/2009 06:44:53 PM---We are trying to enable multithreading in our Cbc-based application.  "><font size=3 color=#424282>acw---07/15/2009
06:44:53 PM---We are trying to enable multithreading in our Cbc-based application.
Our application was modeled o</font><font size=3><br>
</font>
<table width=100%>
<tr valign=top>
<td width=28%><img src=cid:_1_05A98DA805A989A8007622BB85257601><font size=2 color=#5f5f5f><br>
From:</font>
<td width=71%><img src=cid:_1_05B3CA7005A99358007622BB85257601><font size=2><br>
acw@ascent.com</font>
<tr valign=top>
<td><img src=cid:_1_05B3D14005B3CD6C007622BB85257601><font size=2 color=#5f5f5f><br>
To:</font>
<td><img src=cid:_1_05B3D71805B3D344007622BB85257601><font size=2><br>
cbc@list.coin-or.org</font>
<tr>
<td valign=top><img src=cid:_1_05B3DCF005B3D91C007622BB85257601><font size=2 color=#5f5f5f><br>
Cc:</font>
<td><img src=cid:_1_05B3E2C805B3DEF4007622BB85257601><font size=2><br>
dev@ascent.com</font>
<tr valign=top>
<td><img src=cid:_1_05A8CA9805B3E4CC007622BB85257601><font size=2 color=#5f5f5f><br>
Date:</font>
<td><img src=cid:_1_05A8CF2005B3E61C007622BB85257601><font size=2><br>
07/15/2009 06:44 PM</font>
<tr valign=top>
<td><img src=cid:_1_05A8D4F805A8D124007622BB85257601><font size=2 color=#5f5f5f><br>
Subject:</font>
<td><img src=cid:_1_05A8DAD005A8D6FC007622BB85257601><font size=2><br>
[Cbc] Enabling multithreading with CbcMain1</font>
<tr valign=top>
<td><img src=cid:_1_05A8E0A805A8DCD4007622BB85257601><font size=2 color=#5f5f5f><br>
Sent by:</font>
<td><img src=cid:_1_05A8E68005A8E2AC007622BB85257601><font size=2><br>
cbc-bounces@list.coin-or.org</font></table>
<br>
<hr noshade><font size=3><br>
<br>
<br>
<br>
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.</font><font size=4>
</font><font size=3><br>
<br>
We are seeing an exception and process quit in our early attempts to specify
the thread count.</font><font size=4> </font><font size=3><br>
<br>
The important bit is:</font><font size=4> </font><font size=3><br>
<br>
const char * argv2[ ] = {&quot;driver3&quot;, &quot;-threads&quot;, &quot;0&quot;,
&quot;-solve&quot;, &quot;-quit&quot;};</font><font size=4> </font><font size=3><br>
CbcMain1(5, argv2, modelA, callBack);</font><font size=4> </font><font size=3><br>
<br>
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 (&quot;driver3&quot;) but I'm pretty sure this &quot;zeroth&quot;
argument is ignored by CbcMain1.</font><font size=4> </font><font size=3><br>
<br>
My understanding is that &quot;-threads 0&quot; disables multithreading
in the command-line interface; we were just testing the syntax before trying
to enable multithreading.</font><font size=4> </font><font size=3><br>
<br>
Thanks for your assistance.</font><tt><font size=3>_______________________________________________<br>
Cbc mailing list<br>
Cbc@list.coin-or.org</font></tt><tt><font size=3 color=blue><u><br>
</u></font></tt><a href="http://list.coin-or.org/mailman/listinfo/cbc"><tt><font size=3 color=blue><u>http://list.coin-or.org/mailman/listinfo/cbc</u></font></tt></a><font size=3><br>
<br>
</font><tt><font size=2>_______________________________________________<br>
Cbc mailing list<br>
Cbc@list.coin-or.org<br>
</font></tt><a href="http://list.coin-or.org/mailman/listinfo/cbc"><tt><font size=2>http://list.coin-or.org/mailman/listinfo/cbc</font></tt></a><tt><font size=2><br>
</font></tt>
<br>