<div dir="auto"><div>MKL and openblas also look at OMP_NUM_THREADS. Do you know which library you're actually using?<br><div class="gmail_extra"><br><div class="gmail_quote">On Feb 12, 2017 1:04 AM,  <<a href="mailto:gio.srt@gmail.com">gio.srt@gmail.com</a>> wrote:<br type="attribution"><blockquote class="quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word">Ok, setting OMP_NUM_THREADS=1 outside Python did the trick, instead MLK_NUM_THREADS didn’t work. This is a bit strange, because OMP acts with MA86, MA97, and Pardiso while MLK acts with Blas. <div>Since Ipopt says during runtime that it is using ma27, I’m a bit confused. Not sure whether it is a bug or I’m just missing something. </div><div>Anyway, now it works as intended, thanks for your help!</div><div><br></div><div>Giorgio</div><div class="elided-text"><div><br></div><div><br></div><div><div><blockquote type="cite"><div>On 12 Feb 2017, at 15:51, Anthony D. Kelman <<a href="mailto:kelman@berkeley.edu" target="_blank">kelman@berkeley.edu</a>> wrote:</div><br class="m_4272033233512755099Apple-interchange-newline"><div><div dir="auto">Try setting them outside of python. If you've already imported the library it might be too late for the environment variable to make a difference.</div><div class="gmail_extra"><br><div class="gmail_quote">On Feb 11, 2017 11:35 PM,  <<a href="mailto:gio.srt@gmail.com" target="_blank">gio.srt@gmail.com</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word">Yes, I forgot to mention that I tried to use:<div><br></div><div>os.environ["OMP_NUM_THREADS"] = "1"<br>os.environ["MKL_NUM_THREADS"] = "1"<br>os.environ["GOTO_NUM_THREADS"] = “1"</div><div><br></div><div>at the beginning of the Python script but without success.</div><div><br></div><div>Gio </div><div><br><div><blockquote type="cite"><div>On 12 Feb 2017, at 15:16, Anthony D. Kelman <<a href="mailto:kelman@berkeley.edu" target="_blank">kelman@berkeley.edu</a>> wrote:</div><br class="m_4272033233512755099m_-3407591848735689197Apple-interchange-newline"><div><div dir="auto">Depends which blas implementation you're using, but there should be an environment variable to control the threading.</div><div class="gmail_extra"><br><div class="gmail_quote">On Feb 11, 2017 11:15 PM,  <<a href="mailto:gio.srt@gmail.com" target="_blank">gio.srt@gmail.com</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi everyone,<br>
<br>
I’m using Ipopt on a server as a guest, meaning that I have no idea how Ipopt has been compiled or maintained. Ipopt is lunched within a Python script using Pyomo with the following options:<br>
<br>
max_iter=1000<br>
acceptable_tol=0.001<br>
honor_original_bounds=no<br>
max_cpu_time=20<br>
<br>
The server is running Ipopt version 3.12.2, using ma27 (this is what the solver output says).<br>
<br>
My problem is that Ipopt is using more than one core, which I don’t like in this case. The linear solver is definitely not the source of the parallelism, since only MA86 and M97 support that, which reduce the area of research to Blas, if I’m not mistaken.<br>
<br>
Any idea how I could force Ipopt to use only one core without knowing exactly what going on in the background? Or, say that Blas is causing those parallel calls, how do I disable that during run time?<br>
<br>
Thanks,<br>
<br>
Giorgio<br>
______________________________<wbr>_________________<br>
Ipopt mailing list<br>
<a href="mailto:Ipopt@list.coin-or.org" target="_blank">Ipopt@list.coin-or.org</a><br>
<a href="http://list.coin-or.org/mailman/listinfo/ipopt" rel="noreferrer" target="_blank">http://list.coin-or.org/mailma<wbr>n/listinfo/ipopt</a><br>
</blockquote></div></div>
</div></blockquote></div><br></div></div></blockquote></div></div>
</div></blockquote></div><br></div></div></div></blockquote></div><br></div></div></div>