[Openmp-dev] counts in the work sharing

Abid Malik via Openmp-dev openmp-dev at lists.llvm.org
Mon Mar 16 07:57:57 PDT 2020


Thanks for the information.

For each static_init_4 call, there is a static_fini call. Is this specific
to its static_init_4 call? Is there a pairing of calls that can not be
broken? If we look at the static_fini call, the function arguments are the
same. It seems that if we have two static_init_4 function calls, we can
interchange their static_fini calls. Does that make sense?

Suppose we have two loops, Loop-A and Loop-B ( Loop-A and Loop-B are
identical in terms of iteration, chunk, increment, etc). One with omp for
loop and other without it

#pragma omp for
{
  Loop-A
}

Loop-B


If I move the static_fini call beyond Loop-B in IR; Should Loop-B be part
of the Work Sharing environment and its iteration should be distributed
similarly to Loop-A over the available threads?

Thanks,



On Mon, Mar 16, 2020 at 8:04 AM Churbanov, Andrey <
Andrey.Churbanov at intel.com> wrote:

> For static schedule the runtime does not track iterations.  The
> __kmpc_for_static_init_4 (or similar, depending on the iteration variable
> type) is the only runtime call for a statically scheduled loop (not
> counting leading barrier if any). After it compiler just loops over
> obtained range of iterations without involving runtime any more.
>
>
>
> Regards,
>
> Andrey
>
>
>
> *From:* Openmp-dev <openmp-dev-bounces at lists.llvm.org> * On Behalf Of *Abid
> Malik via Openmp-dev
> *Sent:* Friday, March 13, 2020 9:35 PM
> *To:* openmp-dev at lists.llvm.org
> *Subject:* [Openmp-dev] counts in the work sharing
>
>
>
> Hello,
>
>
>
> I am looking into the void __kmp_for_static_init4 function which marks the
> start work sharing. The function computes the upper and lower bounds and
> stride to be used for the set of iterations to be executed by the current
> thread from the statically scheduled loop that is described by the initial
> values of the bround, stride, increment and chunk size.  How the record of
> iterations is kept. Which function/file should I look into to keep track of
> the iteration?
>
>
>
>
>
> Thanks,
>
>
>
> --
>
> Abid M. Malik
> ******************************************************
> "I have learned silence from the talkative, toleration from the
> intolerant, and kindness from the unkind"---Gibran
> "Success is not for the chosen few, but for the few who choose" --- John
> Maxwell
> "Being a good person does not depend on your religion or status in life,
> your race or skin color, political views or culture. IT DEPENDS ON HOW GOOD
> YOU TREAT OTHERS"--- Abid
> "The Universe is talking to us, and the language of the Universe is
> mathematics."----Abid
>
>
>
> --------------------------------------------------------------------
> 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.
>


-- 
Abid M. Malik
******************************************************
"I have learned silence from the talkative, toleration from the intolerant,
and kindness from the unkind"---Gibran
"Success is not for the chosen few, but for the few who choose" --- John
Maxwell
"Being a good person does not depend on your religion or status in life,
your race or skin color, political views or culture. IT DEPENDS ON HOW GOOD
YOU TREAT OTHERS"--- Abid
"The Universe is talking to us, and the language of the Universe is
mathematics."----Abid
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/openmp-dev/attachments/20200316/3c655135/attachment.html>


More information about the Openmp-dev mailing list