<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Verdana;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
        {font-family:Consolas;
        panose-1:2 11 6 9 2 2 4 3 2 4;}
@font-face
        {font-family:"DejaVu Sans Mono";
        panose-1:0 0 0 0 0 0 0 0 0 0;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman",serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p
        {mso-style-priority:99;
        mso-margin-top-alt:auto;
        margin-right:0cm;
        mso-margin-bottom-alt:auto;
        margin-left:0cm;
        font-size:12.0pt;
        font-family:"Times New Roman",serif;}
pre
        {mso-style-priority:99;
        mso-style-link:"HTML Preformatted Char";
        margin:0cm;
        margin-bottom:.0001pt;
        font-size:10.0pt;
        font-family:"Courier New";}
span.HTMLPreformattedChar
        {mso-style-name:"HTML Preformatted Char";
        mso-style-priority:99;
        mso-style-link:"HTML Preformatted";
        font-family:Consolas;
        mso-fareast-language:EN-GB;}
span.m7273789530552659148gmail-gr
        {mso-style-name:m_7273789530552659148gmail-gr;}
span.EmailStyle21
        {mso-style-type:personal-reply;
        font-family:"Verdana",sans-serif;
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri",sans-serif;
        mso-fareast-language:EN-US;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-GB" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Verdana",sans-serif;color:#1F497D;mso-fareast-language:EN-US">If you look in kmp_ftn_os.h you can see the GOMP names, along with the interface version in which they were defined.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Verdana",sans-serif;color:#1F497D;mso-fareast-language:EN-US">That entry appears to be required for GOMP 4.0 compatibility.
<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Verdana",sans-serif;color:#1F497D;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Verdana",sans-serif;color:#1F497D">-- Jim<br>
<br>
Jim Cownie <james.h.cownie@intel.com><br>
CVCG/DPD/TCAR (Technical Computing, Analyzers, and Runtimes)<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Verdana",sans-serif;color:#1F497D">Tel: +44 117 9071438</span><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Verdana",sans-serif;color:#1F497D;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><a name="_____replyseparator"></a><b><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif">From:</span></b><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif"> brmaillist19@gmail.com [mailto:brmaillist19@gmail.com]
<br>
<b>Sent:</b> Wednesday, October 17, 2018 4:04 PM<br>
<b>To:</b> Cownie, James H <james.h.cownie@intel.com><br>
<b>Cc:</b> openmp-dev@lists.llvm.org<br>
<b>Subject:</b> Re: [Openmp-dev] Question about gcc support related to file kmp_gsupport.cpp<o:p></o:p></span></p>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<p class="MsoNormal">Thanks, Jim,<o:p></o:p></p>
<div>
<p class="MsoNormal">I was wondering why there is a function :<o:p></o:p></p>
</div>
<div>
<pre style="background:#2B2B2B"><span style="font-size:9.0pt;font-family:"DejaVu Sans Mono",serif;color:#908B25">PARALLEL_LOOP</span><span style="font-size:9.0pt;font-family:"DejaVu Sans Mono",serif;color:#A9B7C6">(</span><span style="font-size:9.0pt;font-family:"DejaVu Sans Mono",serif;color:#908B25">KMP_EXPAND_NAME</span><span style="font-size:9.0pt;font-family:"DejaVu Sans Mono",serif;color:#A9B7C6">(</span><span style="font-size:9.0pt;font-family:"DejaVu Sans Mono",serif;color:#908B25">KMP_API_NAME_GOMP_PARALLEL_LOOP_STATIC</span><span style="font-size:9.0pt;font-family:"DejaVu Sans Mono",serif;color:#A9B7C6">)</span><span style="font-size:9.0pt;font-family:"DejaVu Sans Mono",serif;color:#CC7832">,<br>              </span><i><span style="font-size:9.0pt;font-family:"DejaVu Sans Mono",serif;color:#9876AA">kmp_sch_static</span></i><span style="font-size:9.0pt;font-family:"DejaVu Sans Mono",serif;color:#CC7832">, </span><span style="font-size:9.0pt;font-family:"DejaVu Sans Mono",serif;color:#908B25">OMPT_LOOP_PRE</span><span style="font-size:9.0pt;font-family:"DejaVu Sans Mono",serif;color:#CC7832">, </span><span style="font-size:9.0pt;font-family:"DejaVu Sans Mono",serif;color:#908B25">OMPT_LOOP_POST</span><span style="font-size:9.0pt;font-family:"DejaVu Sans Mono",serif;color:#A9B7C6">)<o:p></o:p></span></pre>
</div>
<div>
<p class="MsoNormal">which maps gcc call to clang but never used or called.<o:p></o:p></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<div>
<p class="MsoNormal">On Wed, Oct 17, 2018 at 3:47 AM Cownie, James H <<a href="mailto:james.h.cownie@intel.com">james.h.cownie@intel.com</a>> wrote:<o:p></o:p></p>
</div>
<blockquote style="border:none;border-left:solid #CCCCCC 1.0pt;padding:0cm 0cm 0cm 6.0pt;margin-left:4.8pt;margin-right:0cm">
<div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:10.0pt;font-family:"Verdana",sans-serif;color:#1F497D">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.</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:10.0pt;font-family:"Verdana",sans-serif;color:#1F497D"> </span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:10.0pt;font-family:"Verdana",sans-serif;color:#1F497D">If you investigate how gcc compiles a statically scheduled OpenMP loop (look at
<a href="https://godbolt.org/z/GtUnND" target="_blank">https://godbolt.org/z/GtUnND</a> for instance), you’ll see that there are no calls into the runtime for static loop scheduling.</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:10.0pt;font-family:"Verdana",sans-serif;color:#1F497D"> </span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:10.0pt;font-family:"Verdana",sans-serif;color:#1F497D">-- Jim<br>
<br>
Jim Cownie <<a href="mailto:james.h.cownie@intel.com" target="_blank">james.h.cownie@intel.com</a>><br>
CVCG/DPD/TCAR (Technical Computing, Analyzers, and Runtimes)</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:10.0pt;font-family:"Verdana",sans-serif;color:#1F497D">Tel: +44 117 9071438</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:10.0pt;font-family:"Verdana",sans-serif;color:#1F497D"> </span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><a name="m_7273789530552659148______replyseparato"></a><b><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif">From:</span></b><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif">
 Openmp-dev [mailto:<a href="mailto:openmp-dev-bounces@lists.llvm.org" target="_blank">openmp-dev-bounces@lists.llvm.org</a>]
<b>On Behalf Of </b>Tianyi Zhang via Openmp-dev<br>
<b>Sent:</b> Tuesday, October 16, 2018 10:27 PM<br>
<b>To:</b> <a href="mailto:openmp-dev@lists.llvm.org" target="_blank">openmp-dev@lists.llvm.org</a><br>
<b>Subject:</b> [Openmp-dev] Question about gcc support related to file kmp_gsupport.cpp</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">Hi,<o:p></o:p></p>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">Could anyone familiar with the gcc support for llvm-openmp help with this:<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">When I build everything with gcc, and using debug mode, the debugger refuses to stop at<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
</div>
<div>
<pre style="background:#2B2B2B"><span style="font-size:9.0pt;font-family:"DejaVu Sans Mono",serif;color:#A9B7C6">#pragma omp parallel</span><o:p></o:p></pre>
<pre style="background:#2B2B2B"><span style="font-size:9.0pt;font-family:"DejaVu Sans Mono",serif;color:#BBB529">#pragma </span><span style="font-size:9.0pt;font-family:"DejaVu Sans Mono",serif;color:#A9B7C6">omp </span><b><span style="font-size:9.0pt;font-family:"DejaVu Sans Mono",serif;color:#CC7832">for </span></b><span style="font-size:9.0pt;font-family:"DejaVu Sans Mono",serif;color:#A9B7C6">schedule(</span><b><span style="font-size:9.0pt;font-family:"DejaVu Sans Mono",serif;color:#CC7832">static</span></b><span style="font-size:9.0pt;font-family:"DejaVu Sans Mono",serif;color:#A9B7C6">)</span><o:p></o:p></pre>
</div>
<div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> It seems that for schedule(static) is not mapped to GCC. <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">Or is there any <span class="m7273789530552659148gmail-gr">marco</span> that <span class="m7273789530552659148gmail-gr">are</span> introduced inside <span class="m7273789530552659148gmail-gr">function</span> <o:p></o:p></p>
</div>
<div>
<pre style="background:#2B2B2B"><span style="font-size:9.0pt;font-family:"DejaVu Sans Mono",serif;color:#908B25">KMP_EXPAND_NAME</span><span style="font-size:9.0pt;font-family:"DejaVu Sans Mono",serif;color:#A9B7C6">(</span><span style="font-size:9.0pt;font-family:"DejaVu Sans Mono",serif;color:#908B25">KMP_API_NAME_GOMP_PARALLEL</span><span style="font-size:9.0pt;font-family:"DejaVu Sans Mono",serif;color:#A9B7C6">)</span><o:p></o:p></pre>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span class="m7273789530552659148gmail-gr">As</span> It is only calling this function when I was running the program.<o:p></o:p></p>
</div>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">however, if I use <o:p></o:p></p>
</div>
<div>
<pre style="background:#2B2B2B"><span style="font-size:9.0pt;font-family:"DejaVu Sans Mono",serif;color:#BBB529">#pragma </span><span style="font-size:9.0pt;font-family:"DejaVu Sans Mono",serif;color:#A9B7C6">omp parallel</span><o:p></o:p></pre>
</div>
<div>
<pre style="background:#2B2B2B"><span style="font-size:9.0pt;font-family:"DejaVu Sans Mono",serif;color:#BBB529">#pragma </span><span style="font-size:9.0pt;font-family:"DejaVu Sans Mono",serif;color:#A9B7C6">omp </span><b><span style="font-size:9.0pt;font-family:"DejaVu Sans Mono",serif;color:#CC7832">for </span></b><span style="font-size:9.0pt;font-family:"DejaVu Sans Mono",serif;color:#A9B7C6">schedule(dynamic)</span><o:p></o:p></pre>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">it is calling <o:p></o:p></p>
</div>
<div>
<pre style="background:#2B2B2B"><b><span style="font-size:9.0pt;font-family:"DejaVu Sans Mono",serif;color:#CC7832">void </span></b><span style="font-size:9.0pt;font-family:"DejaVu Sans Mono",serif;color:#908B25">KMP_EXPAND_NAME</span><span style="font-size:9.0pt;font-family:"DejaVu Sans Mono",serif;color:#A9B7C6">(</span><span style="font-size:9.0pt;font-family:"DejaVu Sans Mono",serif;color:#908B25">KMP_API_NAME_GOMP_PARALLEL_LOOP_DYNAMIC</span><span style="font-size:9.0pt;font-family:"DejaVu Sans Mono",serif;color:#A9B7C6">)</span><o:p></o:p></pre>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">Thanks,<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">Tianyi<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
</div>
</div>
</div>
<p>---------------------------------------------------------------------<br>
Intel Corporation (UK) Limited<br>
Registered No. 1134945 (England)<br>
Registered Office: Pipers Way, Swindon SN3 1RJ<br>
VAT No: 860 2173 47<o:p></o:p></p>
<p>This e-mail and any attachments may contain confidential material for<br>
the sole use of the intended recipient(s). Any review or distribution<br>
by others is strictly prohibited. If you are not the intended<br>
recipient, please contact the sender and delete all copies.<o:p></o:p></p>
</div>
</blockquote>
</div>
</div>
<p>---------------------------------------------------------------------<br>
Intel Corporation (UK) Limited<br>
Registered No. 1134945 (England)<br>
Registered Office: Pipers Way, Swindon SN3 1RJ<br>
VAT No: 860 2173 47</p>

<p>This e-mail and any attachments may contain confidential material for<br>
the sole use of the intended recipient(s). Any review or distribution<br>
by others is strictly prohibited. If you are not the intended<br>
recipient, please contact the sender and delete all copies.</p></body>
</html>