<div dir="ltr"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="auto"><br>Linux supports other arches than X86, </div></blockquote><div><br></div>I know - I've Linux on at least half a dozen architectures, from Itanium to POWER9.</div><div class="gmail_quote"><br></div><div class="gmail_quote">LLVM supports other operating systems besides Linux, so it must not be fully reliant on /proc/cpuinfo anyways, and lscpu doesn't increase portability because it too is Linux-specific.  While it might appear to solve a problem, the OpenMP is still going to be dependent on the stability of that output format across architectures and through time.</div><div class="gmail_quote"><br></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="auto">and the layout of cpuinfo is different across the architectures.</div></blockquote><div><br></div><div>The whole point of a runtime library like KMP is to deal with architectural support, so it seems entirely within its scope to deal with /proc/cpuinfo layout variation.  I do not know why you think this is a problem and want to solve the problem by making KMP dependent on another Linux-specific thing.</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="auto"></div><div dir="auto">In the runtime code if you take a look at already  there are ifdefs.</div></blockquote><div><br></div><div>Yes, and I see that hwloc is already supported, which suggests that the OpenMP runtime can support any platform that hwloc does, which is quite a bit more than Linux or x86.</div><div><br></div><div><p class="gmail-MsoPlainText" style="margin:0in 0in 0.0001pt;font-size:11pt;font-family:Calibri,sans-serif">#if KMP_USE_HWLOC</p>

<p class="gmail-MsoPlainText" style="margin:0in 0in 0.0001pt;font-size:11pt;font-family:Calibri,sans-serif">  case
affinity_top_method_hwloc:</p>

<p class="gmail-MsoPlainText" style="margin:0in 0in 0.0001pt;font-size:11pt;font-family:Calibri,sans-serif">    value =
"hwloc";</p>

<p class="gmail-MsoPlainText" style="margin:0in 0in 0.0001pt;font-size:11pt;font-family:Calibri,sans-serif">    break;</p>

<p class="gmail-MsoPlainText" style="margin:0in 0in 0.0001pt;font-size:11pt;font-family:Calibri,sans-serif">#endif</p>

<p class="gmail-MsoPlainText" style="margin:0in 0in 0.0001pt;font-size:11pt;font-family:Calibri,sans-serif"><br></p><p class="gmail-MsoPlainText" style="margin:0in 0in 0.0001pt;font-size:11pt;font-family:Calibri,sans-serif">Jeff</p></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="auto"></div><div dir="auto">Itaru.</div><div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Jul 3, 2020 at 23:48 Jeff Hammond <<a href="mailto:jeff.science@gmail.com" target="_blank">jeff.science@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">I’m not sure lscpu program is any better and it’s not standard on Linux the way /proc/cpuinfo is.<br>
<br>
What is the specific problem you are seeing? Perhaps you can explain that before trying to design a solution. <br>
<br>
Jeff<br>
<br>
> On Jul 2, 2020, at 10:55 PM, Itaru Kitayama via Openmp-dev <<a href="mailto:openmp-dev@lists.llvm.org" target="_blank">openmp-dev@lists.llvm.org</a>> wrote:<br>
> <br>
> Is there a plan to move away from arch dependent cpuinfo file to lscup<br>
> when creating an affinity map? It has clearly different a format on AArch64.<br>
> _______________________________________________<br>
> Openmp-dev mailing list<br>
> <a href="mailto:Openmp-dev@lists.llvm.org" target="_blank">Openmp-dev@lists.llvm.org</a><br>
> <a href="https://lists.llvm.org/cgi-bin/mailman/listinfo/openmp-dev" rel="noreferrer" target="_blank">https://lists.llvm.org/cgi-bin/mailman/listinfo/openmp-dev</a><br>
</blockquote></div></div>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature">Jeff Hammond<br><a href="mailto:jeff.science@gmail.com" target="_blank">jeff.science@gmail.com</a><br><a href="http://jeffhammond.github.io/" target="_blank">http://jeffhammond.github.io/</a></div></div>