[Openmp-dev] Removing spec versioning from the OpenMP runtime
Joachim Protze via Openmp-dev
openmp-dev at lists.llvm.org
Fri May 22 06:14:33 PDT 2020
Am 21.05.20 um 19:51 schrieb Churbanov, Andrey:
> What if the code was compiled my multiple compilers?
> User can link objects compiled by gcc5, gcc9, clang9, clang10, clang11, icc19, icc19.1, etc. into a single application. Supported version in different objects may not match of cause.
>
I'm not too worried about such scenario, as this is working in
unspecified behavior land.
I think, if the application was compiled with an OpenMP compiler, the
compile time value of _OPENMP should be printed and also be used for the
execution.
If multiple OpenMP objects are linked, probably the first one loaded wins?
A function omp_get_version would actually allow a linked object (like a
numerics / BLAS library) to check at runtime, whether the expected
OpenMP version is used in the execution. (The method in
https://github.com/OpenMP/examples-internal/issues/112 should actually
work for any such library)
- Joachim
> -- Andrey
>
> -----Original Message-----
> From: Openmp-dev <openmp-dev-bounces at lists.llvm.org> On Behalf Of Johannes Doerfert via Openmp-dev
> Sent: Thursday, May 21, 2020 8:28 PM
> To: Joachim Protze <protze.joachim at gmail.com>; Wilmarth, Terry L <terry.l.wilmarth at intel.com>; Jonas Hahnfeld <hahnjo at hahnjo.de>
> Cc: LLVM-OpenMP (openmp-dev at lists.llvm.org) <openmp-dev at lists.llvm.org>
> Subject: Re: [Openmp-dev] Removing spec versioning from the OpenMP runtime
>
>
> On 5/21/20 12:04 PM, Joachim Protze via Openmp-dev wrote:
>> Hi all,
>>
>> sorry for necromancing on this thread :D
>>
>> I came across this issue, when working on an OMPT example for the
>> OpenMP Examples document. Currently, the runtime would print
>> _OPENMP='201611', when exporting OMP_DISPLAY_ENV=1.
>> This is other than the value of _OPENMP=201511 during compilation.
>> Furthermore, 201611 is not a value defined in any spec.
>>
>> I had a discussion about OpenMP versions with Michael Klemm (OpenMP
>> CEO / Intel) a while ago. From his perspective OpenMP compiler and
>> runtime should always be seen as one paired thing.
>> So, if the compiler supports and exposes different behavior for
>> different OpenMP versions, the runtime should be aware of that.
>>
>> So, if we try to implement differently specified behavior (as
>> suggested by -fopenmp-version=51), the proper thing to do from my
>> perspective would be to pass on the compile time version to the runtime.
>> The runtime then "could" do specific things at execution time. At
>> least, the runtime would print out the right version string for
>> OMP_DISPLAY_ENV=1.
>>
>> What do you think about this? How can we make this work?
>
> We could encode it in the ident_t which should also solve the issue
>
> with mixing openmp versions during compile time.
>
>
>
>> Best
>> Joachim
>>
>>
>> Am 14.02.19 um 21:02 schrieb Wilmarth, Terry L via Openmp-dev:
>>> Since there are no objections to this, we'll start on it soon.
>>> Thanks for the feedback!
>>>
>>> -----Original Message-----
>>> From: Jonas Hahnfeld [mailto:hahnjo at hahnjo.de]
>>> Sent: Thursday, February 7, 2019 1:39 AM
>>> To: Wilmarth, Terry L <terry.l.wilmarth at intel.com>
>>> Cc: LLVM-OpenMP (openmp-dev at lists.llvm.org)
>>> <openmp-dev at lists.llvm.org>
>>> Subject: Re: [Openmp-dev] Removing spec versioning from the OpenMP
>>> runtime
>>>
>>> Hi Terry,
>>>
>>> I'm in favor as suggested in https://reviews.llvm.org/D55496.
>>> To add another argument that was raised in that review: Currently the
>>> tests need to be versioned as well, which is another maintenance burden.
>>>
>>> Cheers,
>>> Jonas
>>>
>>> On 2019-02-06 20:13, Wilmarth, Terry L via Openmp-dev wrote:
>>>> Hello,
>>>>
>>>> We're considering removing all of the spec versioning in the runtime.
>>>> This is the set of spec-version-numbered #ifdefs throughout the
>>>> runtime (such as OMP_40_ENABLED, OMP_45_ENABLED, OMP_50_ENABLED,
>>>> etc.) that make it possible to build earlier versions of the runtime
>>>> that are compliant with a certain spec version, via LIBOMP_OMP_VERSION.
>>>>
>>>> The main reasons to remove this:
>>>>
>>>> 1) No one seems to be using the spec-version builds.
>>>>
>>>> 2) The #ifdefs are often not well-maintained or correctly added.
>>>>
>>>> 3) The #ifdefs add clutter to the source.
>>>>
>>>> We'd like to get some feedback on removing this. If we're generally
>>>> in agreement that it should be removed, we'll start work on the
>>>> cleanup.
>>>>
>>>> Thanks!
>>>>
>>>> Terry
>>>>
>>>> Terry L. Wilmarth
>>>> terry.l.wilmarth at intel.com 512-362-0530 Intel/Threading Runtimes
>>>> _______________________________________________
>>>> Openmp-dev mailing list
>>>> Openmp-dev at lists.llvm.org
>>>> https://lists.llvm.org/cgi-bin/mailman/listinfo/openmp-dev
>>> _______________________________________________
>>> Openmp-dev mailing list
>>> Openmp-dev at lists.llvm.org
>>> https://lists.llvm.org/cgi-bin/mailman/listinfo/openmp-dev
>>>
>>
>> _______________________________________________
>> Openmp-dev mailing list
>> Openmp-dev at lists.llvm.org
>> https://lists.llvm.org/cgi-bin/mailman/listinfo/openmp-dev
> _______________________________________________
> Openmp-dev mailing list
> Openmp-dev at lists.llvm.org
> https://lists.llvm.org/cgi-bin/mailman/listinfo/openmp-dev
>
> --------------------------------------------------------------------
> Joint Stock Company Intel A/O
> Registered legal address: Krylatsky Hills Business Park,
> 17 Krylatskaya Str., Bldg 4, Moscow 121614,
> Russian Federation
>
> This e-mail and any attachments may contain confidential material for
> the sole use of the intended recipient(s). Any review or distribution
> by others is strictly prohibited. If you are not the intended
> recipient, please contact the sender and delete all copies.
>
More information about the Openmp-dev
mailing list