<div dir="ltr"><div>I still haven't seen a problem statement from the original poster, but it seems like hwloc is the solution if maintaining architecture-specific porting of /proc/cpuinfo is too difficult. However, this should be demonstrated with a bug report and unsupported use case before alternatives are discussed.<br></div><div><br></div><div>Jeff<br><div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Jul 3, 2020 at 2:18 PM Hal Finkel <<a href="mailto:hfinkel@anl.gov">hfinkel@anl.gov</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">
<div>
<p><br>
</p>
<div>On 7/3/20 3:42 PM, Itaru Kitayama via
Openmp-dev wrote:<br>
</div>
<blockquote type="cite">
<div>
<div dir="auto">Jeff,</div>
</div>
<div dir="auto">Linux supports other arches than X86, and the</div>
<div dir="auto">layout of cpuinfo is different across the
architectures.</div>
<div dir="auto"><br>
</div>
<div dir="auto">In the runtime code if you take a look at already
there are ifdefs.</div>
<div dir="auto"><br>
</div>
<div dir="auto">Itaru.</div>
</blockquote>
<p><br>
</p>
<p>The alternative that you're proposing is to fork lscpu to read
/proc/cpuinfo instead?</p>
<p>We do understand that /proc/cpuinfo has architecture
dependencies, and this is unfortunate in this context, but it is
the interface that Linux provides. How does lscpu deal with those
dependencies? Should our parser just be more robust?<br>
</p>
<p> -Hal<br>
</p>
<p><br>
</p>
<blockquote type="cite">
<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>
<br>
<fieldset></fieldset>
<pre>_______________________________________________
Openmp-dev mailing list
<a href="mailto:Openmp-dev@lists.llvm.org" target="_blank">Openmp-dev@lists.llvm.org</a>
<a href="https://lists.llvm.org/cgi-bin/mailman/listinfo/openmp-dev" target="_blank">https://lists.llvm.org/cgi-bin/mailman/listinfo/openmp-dev</a>
</pre>
</blockquote>
<pre cols="72">--
Hal Finkel
Lead, Compiler Technology and Programming Languages
Leadership Computing Facility
Argonne National Laboratory</pre>
</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></div></div>