<div>&nbsp;</div>
<div>Hi Ted,</div>
<div>&nbsp;</div>
<div>Thanks for the quick reply. Actually, i am not expecting Cbc itself to run parallelly. In my case, I am coding my own algorithm, where Cbc is called as a library for solving IPs.&nbsp;The parallelization is in my own code, where i hope&nbsp;multiple&nbsp;processors&nbsp;are able to call&nbsp;Cbc and solve multiple IPs concurrently. For instances:
<br>&nbsp;</div>
<div>#pragma omp parallel</div>
<div>{</div>
<div>&nbsp;&nbsp; ......</div>
<div>#pragma omp for</div>
<div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; for ( ... ) {</div>
<div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ......</div>
<div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; OsiSolverInterface *si;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; si = new OsiCbcSolverInterface();</div>
<div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; si-&gt;loadFromCoinModel(Parallel_model, true);</div>
<div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if(MIP)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; si-&gt;branchAndBound();<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; else<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; si-&gt;initialSolve();</div>
<div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;......</div>
<div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }</div>
<div>}<br>&nbsp;</div>
<div>I have taken care of the private and public variables. Do you think it will work parallelly as expected? or libCbc and libOsiCbc&nbsp;just can&#39;t be called in this way.</div>
<div>&nbsp;</div>
<div>Thanks -- yang</div>
<div>&nbsp;</div>
<div><span class="gmail_quote">On 3/23/07, <b class="gmail_sendername">Ted Ralphs</b> &lt;<a href="mailto:tkralphs@lehigh.edu">tkralphs@lehigh.edu</a>&gt; wrote:</span>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">Yang,<br><br>OpenMP does not do any &quot;automatic&quot; parallelization. OpenMP is just a<br>standard set of compiler directives that tell an OpenMP-aware compiler
<br>how to parallelize things. I don&#39;t see any OpenMP directives in Cbc<br>source code (they all start with &quot;#pragma omp&quot;), so it doesn&#39;t look like<br>it will run in parallel. In principle, it&#39;s not that difficult to
<br>parallelize a tree search algorithm using OpenMP, but if you&#39;re not the<br>author of the code, that would probably make it significantly more<br>difficult. Also, the code has to be thread-safe to begin with. It didn&#39;t
<br>take me that long to convert SYMPHONY, only adding a few dozen lines of<br>code.<br><br>Cheers,<br><br>Ted<br>--<br>Dr. Ted Ralphs<br>Associate Professor<br>Industrial and Systems Engineering<br>Lehigh University<br>(610)758-4784
<br><a href="mailto:tkralphs@lehigh.edu">tkralphs@lehigh.edu</a><br><a href="http://www.lehigh.edu/~tkr2">www.lehigh.edu/~tkr2</a><br>_______________________________________________<br>Coin-discuss mailing list<br><a href="mailto:Coin-discuss@list.coin-or.org">
Coin-discuss@list.coin-or.org</a><br><a href="http://list.coin-or.org/mailman/listinfo/coin-discuss">http://list.coin-or.org/mailman/listinfo/coin-discuss</a><br></blockquote></div><br>