[Openmp-dev] cpuinfo file reliance

Jeff Hammond via Openmp-dev openmp-dev at lists.llvm.org
Fri Jul 3 14:41:44 PDT 2020


>
>
> Linux supports other arches than X86,
>

I know - I've Linux on at least half a dozen architectures, from Itanium to
POWER9.

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.

and the layout of cpuinfo is different across the architectures.
>

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.


> In the runtime code if you take a look at already  there are ifdefs.
>

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.

#if KMP_USE_HWLOC

  case affinity_top_method_hwloc:

    value = "hwloc";

    break;

#endif


Jeff


> Itaru.
>
> On Fri, Jul 3, 2020 at 23:48 Jeff Hammond <jeff.science at gmail.com> wrote:
>
>> I’m not sure lscpu program is any better and it’s not standard on Linux
>> the way /proc/cpuinfo is.
>>
>> What is the specific problem you are seeing? Perhaps you can explain that
>> before trying to design a solution.
>>
>> Jeff
>>
>> > On Jul 2, 2020, at 10:55 PM, Itaru Kitayama via Openmp-dev <
>> openmp-dev at lists.llvm.org> wrote:
>> >
>> > Is there a plan to move away from arch dependent cpuinfo file to lscup
>> > when creating an affinity map? It has clearly different a format on
>> AArch64.
>> > _______________________________________________
>> > Openmp-dev mailing list
>> > Openmp-dev at lists.llvm.org
>> > https://lists.llvm.org/cgi-bin/mailman/listinfo/openmp-dev
>>
>

-- 
Jeff Hammond
jeff.science at gmail.com
http://jeffhammond.github.io/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/openmp-dev/attachments/20200703/75046bf0/attachment.html>


More information about the Openmp-dev mailing list