<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: OK to use threadprivate COMMON outside parallel region? in Intel® Moderncode for Parallel Architectures</title>
    <link>https://community.intel.com/t5/Intel-Moderncode-for-Parallel/OK-to-use-threadprivate-COMMON-outside-parallel-region/m-p/963297#M5363</link>
    <description>&lt;P&gt;Tim -&lt;/P&gt;
&lt;P&gt;Yes, use of COMMON block data declared to be &lt;FONT face="Courier New"&gt;THREADPRIVATE&lt;/FONT&gt; outside of a parallel region is legal. The OpenMP Fortran Spec 2.0 states, "During serial portions and &lt;FONT face="Courier New"&gt;MASTER&lt;/FONT&gt; sections of the program, accesses are to the master thread's copy of the common block or variable."&lt;/P&gt;
&lt;P&gt;A copy of all &lt;FONT face="Courier New"&gt;THREADPRIVATE&lt;/FONT&gt; data is created for each thread upon entrance to the first parallel region. Initially undefined in value, data can be initialized from the master thread copy with a &lt;FONT face="Courier New"&gt;COPYIN&lt;/FONT&gt; clause. Otherwise, any data written to &lt;FONT face="Courier New"&gt;THREADPRIVATE&lt;/FONT&gt; variables will only be visible from the thread that wrote the value.&lt;/P&gt;
&lt;DIV&gt;-- clay&lt;/DIV&gt;</description>
    <pubDate>Fri, 16 Apr 2004 03:55:07 GMT</pubDate>
    <dc:creator>ClayB</dc:creator>
    <dc:date>2004-04-16T03:55:07Z</dc:date>
    <item>
      <title>OK to use threadprivate COMMON outside parallel region?</title>
      <link>https://community.intel.com/t5/Intel-Moderncode-for-Parallel/OK-to-use-threadprivate-COMMON-outside-parallel-region/m-p/963296#M5362</link>
      <description>&lt;DIV&gt;I have been asked this question. I'm not confident about the answer, as applied to Intel -openmp (and KAI guide, for legacy users). Could one of the experts answer?&lt;/DIV&gt;
&lt;DIV&gt;&lt;/DIV&gt;
&lt;DIV&gt;Adeveloper would like to use the same labeled COMMON both inside and outside a parallel region. It has a&lt;/DIV&gt;
&lt;DIV&gt;C$OMP THREADPRIVATE&lt;/DIV&gt;
&lt;DIV&gt;declaration.&lt;/DIV&gt;
&lt;DIV&gt;Is this usage likely to cause problems? Does it make a difference,if the contents are re-initialized for each instance? I think they simply want to avoid possible increase in working set size, or unnecessary cache misses, on some platforms. So, if the proposed usage actually defeats one of those purposes, that would be useful information.&lt;/DIV&gt;</description>
      <pubDate>Thu, 15 Apr 2004 01:25:33 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Moderncode-for-Parallel/OK-to-use-threadprivate-COMMON-outside-parallel-region/m-p/963296#M5362</guid>
      <dc:creator>TimP</dc:creator>
      <dc:date>2004-04-15T01:25:33Z</dc:date>
    </item>
    <item>
      <title>Re: OK to use threadprivate COMMON outside parallel region?</title>
      <link>https://community.intel.com/t5/Intel-Moderncode-for-Parallel/OK-to-use-threadprivate-COMMON-outside-parallel-region/m-p/963297#M5363</link>
      <description>&lt;P&gt;Tim -&lt;/P&gt;
&lt;P&gt;Yes, use of COMMON block data declared to be &lt;FONT face="Courier New"&gt;THREADPRIVATE&lt;/FONT&gt; outside of a parallel region is legal. The OpenMP Fortran Spec 2.0 states, "During serial portions and &lt;FONT face="Courier New"&gt;MASTER&lt;/FONT&gt; sections of the program, accesses are to the master thread's copy of the common block or variable."&lt;/P&gt;
&lt;P&gt;A copy of all &lt;FONT face="Courier New"&gt;THREADPRIVATE&lt;/FONT&gt; data is created for each thread upon entrance to the first parallel region. Initially undefined in value, data can be initialized from the master thread copy with a &lt;FONT face="Courier New"&gt;COPYIN&lt;/FONT&gt; clause. Otherwise, any data written to &lt;FONT face="Courier New"&gt;THREADPRIVATE&lt;/FONT&gt; variables will only be visible from the thread that wrote the value.&lt;/P&gt;
&lt;DIV&gt;-- clay&lt;/DIV&gt;</description>
      <pubDate>Fri, 16 Apr 2004 03:55:07 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Moderncode-for-Parallel/OK-to-use-threadprivate-COMMON-outside-parallel-region/m-p/963297#M5363</guid>
      <dc:creator>ClayB</dc:creator>
      <dc:date>2004-04-16T03:55:07Z</dc:date>
    </item>
  </channel>
</rss>

