<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<p>Hi Zhiyu,</p>
<p><br>
</p>
<p>I think there has been some misunderstanding on how SCIP and
Pyomo interact.<br>
<br>
</p>
<p>The parameter you mention is related to to the non-standard
optimization call of SCIP. This can be reached by calling
`concurrentopt` instead of `optimize` on the SCIP command line
interface. What that call does is run multiple instances of SCIP
in parallel. So it is not a parallelisation of a single SCIP call,
but rather many different SCIP instances (different seeds etc)
running in parallel and sharing bound + solution information. This
feature (maybe someone will correct me) is not that well
documented or supported. The feature you were probably expecting
of a parallelised search procedure does not yet exist in SCIP.<br>
<br>
The interface we have to Pyomo currently only supports the code
behind the standard `optimize` call. Therefore, any parameter
changes related to the `concurrentopt` call do not effect the
subsequent optimization procedure in your setup. One would need to
add the explicit option to Pyomo to call SCIPsolveConcurrent for
your parameters to make any difference. If this feature is truly
in demand then I will consider adding it to the hopefully soon to
exist persistent SCIP interface for Pyomo. <br>
</p>
<p><br>
</p>
<p>Cheers,</p>
<p>Mark</p>
<p><br>
</p>
<div class="moz-cite-prefix">On 22.10.24 13:40, Zhang Zhiyu wrote:<br>
</div>
<blockquote type="cite"
cite="mid:PH8PR19MB7144ABE458F248586C228C30904C2@PH8PR19MB7144.namprd19.prod.outlook.com">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<style type="text/css" style="display:none;">P {margin-top:0;margin-bottom:0;}</style>
<div class="elementToProof"
style="text-align: left; text-indent: 0px; background-color: rgb(255, 255, 255); margin: 1em 0px; font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Dear SCIP,</div>
<div
style="text-align: left; text-indent: 0px; background-color: rgb(255, 255, 255); margin: 1em 0px; font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
I hope this message finds you well. I am currently working on
solving a nonlinear programming (NLP) problem using Pyomo and
SCIP, and I am seeking guidance on effectively utilizing
multithreading to improve solve times.</div>
<div
style="text-align: left; text-indent: 0px; background-color: rgb(255, 255, 255); margin: 1em 0px; font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Here is the setup I am using:</div>
<ul
style="text-align: left; background-color: rgb(255, 255, 255);">
<li
style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<div style="margin: 0px;">Installed Pyomo version 6.8.0 and
SCIP version 9.1.0 via conda.</div>
</li>
<li
style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<div style="margin: 0px;">Created the solver in Pyomo using:</div>
</li>
<ul style="list-style-type: circle;">
<li
style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<div style="margin: 0px;">solver = pyo.SolverFactory('scip')</div>
</li>
</ul>
<li
style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<div style="margin: 0px;">Set the multithreading option:</div>
</li>
<ul style="list-style-type: circle;">
<li
style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<div style="margin: 0px;">solver.options['parallel/maxnthreads']
= 16</div>
</li>
</ul>
</ul>
<div
style="text-align: left; text-indent: 0px; background-color: rgb(255, 255, 255); margin: 0px; font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Despite setting the number of threads to 16, I have observed
that the solve time does not seem to improve. I would greatly
appreciate any insights or recommendations you might have for
enabling efficient multithreading with SCIP in this context.</div>
<div
style="text-align: left; text-indent: 0px; background-color: rgb(255, 255, 255); margin: 0px; font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div
style="text-align: left; text-indent: 0px; background-color: rgb(255, 255, 255); margin: 1em 0px; font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Thank you for your time and assistance.</div>
<div
style="text-align: left; text-indent: 0px; background-color: rgb(255, 255, 255); margin: 1em 0px; font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Best regards,</div>
<div
style="text-align: left; text-indent: 0px; background-color: rgb(255, 255, 255); margin: 1em 0px; font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Zhiyu Zhang<br>
<a class="moz-txt-link-abbreviated" href="mailto:zhidaoxiayu_Biu@outlook.com">zhidaoxiayu_Biu@outlook.com</a></div>
<div class="elementToProof"
style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<br>
<fieldset class="moz-mime-attachment-header"></fieldset>
<pre class="moz-quote-pre" wrap="">_______________________________________________
Scip mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Scip@zib.de">Scip@zib.de</a>
<a class="moz-txt-link-freetext" href="https://listserv.zib.de/mailman/listinfo/scip">https://listserv.zib.de/mailman/listinfo/scip</a>
</pre>
</blockquote>
</body>
</html>