<div dir="ltr">Thanks a bunch, Andrey!<div><br></div><div>- Jini</div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Nov 18, 2019 at 9:24 PM Churbanov, Andrey <<a href="mailto:Andrey.Churbanov@intel.com">Andrey.Churbanov@intel.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">





<div lang="RU">
<div class="gmail-m_-6522615230502844923WordSection1">
<p class="MsoNormal"><span lang="EN-US" style="font-size:11pt;font-family:Calibri,sans-serif;color:rgb(31,73,125)">Hi Jini,<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11pt;font-family:Calibri,sans-serif;color:rgb(31,73,125)"><u></u> <u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11pt;font-family:Calibri,sans-serif;color:rgb(31,73,125)">Your judgement basically looks correct.  Besides that current_nesting_level should be lesser than (used – 1) in order
 to enumerate __kmp_nested_nth.nth array. I’d also guess that you meant “at any point” of user’s code, as at the start of parallel region the nthreads-var is changing inside the runtime library code along with changing of nesting level.<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11pt;font-family:Calibri,sans-serif;color:rgb(31,73,125)"><u></u> <u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11pt;font-family:Calibri,sans-serif;color:rgb(31,73,125)">Regards,<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11pt;font-family:Calibri,sans-serif;color:rgb(31,73,125)">Andrey<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11pt;font-family:Calibri,sans-serif;color:rgb(31,73,125)"><u></u> <u></u></span></p>
<p class="MsoNormal"><a name="m_-6522615230502844923______replyseparator"></a><b><span lang="EN-US" style="font-size:11pt;font-family:Calibri,sans-serif">From:</span></b><span lang="EN-US" style="font-size:11pt;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>Jini Susan George via Openmp-dev<br>
<b>Sent:</b> Monday, November 18, 2019 8:09 AM<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] Query regarding the ICV: 'nthreads-var'<u></u><u></u></span></p>
<p class="MsoNormal"><u></u> <u></u></p>
<div>
<p class="MsoNormal"><span style="font-size:11pt;font-family:Calibri,sans-serif">Hi folks,
<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt;font-family:Calibri,sans-serif"> <u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt;font-family:Calibri,sans-serif">I am working on modifying OMPD (in the OpenMPToolsInterface/LLVM-openmp/ompd-tests branch) to retrieve the value of the ICV ‘nthreads-var’. ‘nthreads-var’ is a list and as
 per my understanding, the value of this list at any point for a particular thread would be:<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt;font-family:Calibri,sans-serif"> <u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt;font-family:Calibri,sans-serif">[this_thr->th.th_current_task->td_icvs.nproc, __kmp_nested_nth.nth[current_nesting_level +1], __kmp_nested_nth.nth[current_nesting_level + 2], …, __kmp_nested_nth.nth[used
 - 1]]<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt;font-family:Calibri,sans-serif"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt;font-family:Calibri,sans-serif">Except for the first element of this list, the other elements of this list are subject to the condition that current_nesting_level  is less than __kmp_nested_nth.used. Wanted
 to confirm with you folks that my understanding is correct. Please correct me otherwise.<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt;font-family:Calibri,sans-serif"> <u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt;font-family:Calibri,sans-serif">Thanks a bunch,<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt;font-family:Calibri,sans-serif">Jini.<u></u><u></u></span></p>
</div>
</div>
<p><br>--------------------------------------------------------------------<br>Joint Stock Company Intel A/O<br>Registered legal address: Krylatsky Hills Business Park, <br>17 Krylatskaya Str., Bldg 4, Moscow 121614, <br>Russian Federation</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>
</div>

</blockquote></div>