[Openmp-dev] Question about gcc support related to file kmp_gsupport.cpp

Joachim Protze via Openmp-dev openmp-dev at lists.llvm.org
Wed Oct 17 08:18:05 PDT 2018


If this function is also in the interface of libgomp.so, there might be a
use case for this function. You can either look into the codegen source of
gcc or ask at the gcc compiler list.

-joachim

Tianyi Zhang via Openmp-dev <openmp-dev at lists.llvm.org> schrieb am Mi., 17.
Okt. 2018, 17:04:

> Thanks, Jim,
> I was wondering why there is a function :
>
> PARALLEL_LOOP(KMP_EXPAND_NAME(KMP_API_NAME_GOMP_PARALLEL_LOOP_STATIC),
>               kmp_sch_static, OMPT_LOOP_PRE, OMPT_LOOP_POST)
>
> which maps gcc call to clang but never used or called.
>
> On Wed, Oct 17, 2018 at 3:47 AM Cownie, James H <james.h.cownie at intel.com>
> wrote:
>
>> Your question is really about the code which is generated by gcc for a
>> statically scheduled loop, which has nothing to do with the runtime.
>>
>>
>>
>> If you investigate how gcc compiles a statically scheduled OpenMP loop
>> (look at https://godbolt.org/z/GtUnND for instance), you’ll see that
>> there are no calls into the runtime for static loop scheduling.
>>
>>
>>
>> -- Jim
>>
>> Jim Cownie <james.h.cownie at intel.com>
>> CVCG/DPD/TCAR (Technical Computing, Analyzers, and Runtimes)
>>
>> Tel: +44 117 9071438
>>
>>
>>
>> *From:* Openmp-dev [mailto:openmp-dev-bounces at lists.llvm.org] *On Behalf
>> Of *Tianyi Zhang via Openmp-dev
>> *Sent:* Tuesday, October 16, 2018 10:27 PM
>> *To:* openmp-dev at lists.llvm.org
>> *Subject:* [Openmp-dev] Question about gcc support related to file
>> kmp_gsupport.cpp
>>
>>
>>
>> Hi,
>>
>> Could anyone familiar with the gcc support for llvm-openmp help with this:
>>
>>
>>
>> When I build everything with gcc, and using debug mode, the
>> debugger refuses to stop at
>>
>>
>>
>> #pragma omp parallel
>>
>> #pragma omp *for *schedule(*static*)
>>
>>  It seems that for schedule(static) is not mapped to GCC.
>>
>>
>>
>> Or is there any marco that are introduced inside function
>>
>> KMP_EXPAND_NAME(KMP_API_NAME_GOMP_PARALLEL)
>>
>> As It is only calling this function when I was running the program.
>>
>>
>>
>>
>>
>> however, if I use
>>
>> #pragma omp parallel
>>
>> #pragma omp *for *schedule(dynamic)
>>
>> it is calling
>>
>> *void *KMP_EXPAND_NAME(KMP_API_NAME_GOMP_PARALLEL_LOOP_DYNAMIC)
>>
>>
>>
>> Thanks,
>>
>> Tianyi
>>
>>
>>
>> ---------------------------------------------------------------------
>> Intel Corporation (UK) Limited
>> Registered No. 1134945 (England)
>> Registered Office: Pipers Way, Swindon SN3 1RJ
>> VAT No: 860 2173 47
>>
>> 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.
>>
> _______________________________________________
> Openmp-dev mailing list
> Openmp-dev at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/openmp-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/openmp-dev/attachments/20181017/4b46b4b5/attachment.html>


More information about the Openmp-dev mailing list