<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, May 28, 2014 at 10:24 AM, Cownie, James H <span dir="ltr"><<a href="mailto:james.h.cownie@intel.com" target="_blank">james.h.cownie@intel.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">





<div lang="EN-GB" link="blue" vlink="purple">
<div>
<p class="MsoNormal"><span style="font-size:10pt;font-family:Verdana,sans-serif;color:rgb(31,73,125)">Sorry, I read your description of the problem
<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:10pt;font-family:Verdana,sans-serif;color:rgb(31,73,125)">“</span>While the results for iomp5 are far better on darwin than those for gomp on darwin, we still are lagging behind the performance of gomp using futex
 on linux.”<u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:10pt;font-family:Verdana,sans-serif;color:rgb(31,73,125)">as being that libiomp5.so was underperforming on Linux because we’re not using futex there, so I was explaining how we could do that.<u></u><u></u></span></p>

<p class="MsoNormal"><span style="font-size:10pt;font-family:Verdana,sans-serif;color:rgb(31,73,125)"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:10pt;font-family:Verdana,sans-serif;color:rgb(31,73,125)">I now grok that what you’re saying is that you’d like to see performance on Darwin (without futexes) that is faster than on Linux (with futexes).<u></u><u></u></span></p>

<p class="MsoNormal"><span style="font-size:10pt;font-family:Verdana,sans-serif;color:rgb(31,73,125)">So, I suggest trying the TAS lock, (KMP_LOCK_KIND=tas on Darwin).</span></p></div></div></blockquote><div><br></div><div>
Not necessarily faster on darwin but at least equal in performance to linux. FYI, I posted the raw timings for this test case on both darwin and linux…</div><div><br></div><div><a href="https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61333#c13">https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61333#c13</a></div>
<div><a href="https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61333#c14">https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61333#c14</a></div><div><br></div><div>A cursory examination suggests that the ratios of the one to four OMP process timings are pretty much identical between the clang-omp and FSF gcc compilers on linux but the darwin ratios on clang-omp are about 5% lower than futex on linux and even worse for gomp on darwin.</div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div lang="EN-GB" link="blue" vlink="purple"><div><p class="MsoNormal">
<span style="font-size:10pt;font-family:Verdana,sans-serif;color:rgb(31,73,125)"><u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:10pt;font-family:Verdana,sans-serif;color:rgb(31,73,125)"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:10pt;font-family:Verdana,sans-serif;color:rgb(31,73,125)">Depending on what you think OpenMP is used for, though, locks may be irrelevant. If you look at the latest SPECOMP codes, there are none that use locks (down
 from the previous version that had a couple).<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:10pt;font-family:Verdana,sans-serif;color:rgb(31,73,125)"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:10pt;font-family:Verdana,sans-serif;color:rgb(31,73,125)">In HPC locks should be rare and heavily contended locks absent completely. (Because if there are heavily contended locks in a significant part of the code,
 it won’t perform well anyway, so doesn’t qualify for the “HPC” name </span><span style="font-size:10pt;font-family:Wingdings;color:rgb(31,73,125)">J</span><span style="font-size:10pt;font-family:Verdana,sans-serif;color:rgb(31,73,125)">).<u></u><u></u></span></p>
<div class="">
<p class="MsoNormal"><span style="font-size:10pt;font-family:Verdana,sans-serif;color:rgb(31,73,125)"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:10pt;font-family:Verdana,sans-serif;color:rgb(31,73,125)">-- Jim<br>
<br>
James Cownie <<a href="mailto:james.h.cownie@intel.com" target="_blank">james.h.cownie@intel.com</a>><br>
SSG/DPD/TCAR (Technical Computing, Analyzers and Runtimes)<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:10pt;font-family:Verdana,sans-serif;color:rgb(31,73,125)">Tel: <a href="tel:%2B44%20117%209071438" value="+441179071438" target="_blank">+44 117 9071438</a></span><span style="font-size:11pt;font-family:Calibri,sans-serif;color:rgb(31,73,125)"><u></u><u></u></span></p>

<p class="MsoNormal"><br></p></div></div></div></blockquote></div></div></div>