<?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 In OpenMP, Reduction Clause in Intel® Moderncode for Parallel Architectures</title>
    <link>https://community.intel.com/t5/Intel-Moderncode-for-Parallel/In-OpenMP-Reduction-Clause/m-p/871658#M2962</link>
    <description>&lt;P&gt;Why?&lt;BR /&gt;&lt;BR /&gt;#pragma omp parallel for &lt;BR /&gt;for (i=0; i&lt;N&gt;&lt;/N&gt;{ &lt;BR /&gt;sum+ = a&lt;I&gt; * b&lt;I&gt;; &lt;BR /&gt;} &lt;BR /&gt;and &lt;BR /&gt;&lt;BR /&gt;#pragma omp parallel for reduction(+:sum) &lt;BR /&gt;for (i=0; i&lt;N&gt;&lt;/N&gt;{&lt;BR /&gt;sum+ = a&lt;I&gt; * b&lt;I&gt;;&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;Please tell me why the two running results are identical? &lt;BR /&gt;Thank you.&lt;/I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 26 Mar 2009 14:46:15 GMT</pubDate>
    <dc:creator>zhangzhe65</dc:creator>
    <dc:date>2009-03-26T14:46:15Z</dc:date>
    <item>
      <title>In OpenMP, Reduction Clause</title>
      <link>https://community.intel.com/t5/Intel-Moderncode-for-Parallel/In-OpenMP-Reduction-Clause/m-p/871658#M2962</link>
      <description>&lt;P&gt;Why?&lt;BR /&gt;&lt;BR /&gt;#pragma omp parallel for &lt;BR /&gt;for (i=0; i&lt;N&gt;&lt;/N&gt;{ &lt;BR /&gt;sum+ = a&lt;I&gt; * b&lt;I&gt;; &lt;BR /&gt;} &lt;BR /&gt;and &lt;BR /&gt;&lt;BR /&gt;#pragma omp parallel for reduction(+:sum) &lt;BR /&gt;for (i=0; i&lt;N&gt;&lt;/N&gt;{&lt;BR /&gt;sum+ = a&lt;I&gt; * b&lt;I&gt;;&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;Please tell me why the two running results are identical? &lt;BR /&gt;Thank you.&lt;/I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 26 Mar 2009 14:46:15 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Moderncode-for-Parallel/In-OpenMP-Reduction-Clause/m-p/871658#M2962</guid>
      <dc:creator>zhangzhe65</dc:creator>
      <dc:date>2009-03-26T14:46:15Z</dc:date>
    </item>
    <item>
      <title>Re: In OpenMP, Reduction Clause</title>
      <link>https://community.intel.com/t5/Intel-Moderncode-for-Parallel/In-OpenMP-Reduction-Clause/m-p/871659#M2963</link>
      <description>&lt;DIV style="margin:0px;"&gt;&lt;/DIV&gt;
&lt;BR /&gt;a) You got lucky&lt;BR /&gt;b) You compiled with OpenMP off&lt;BR /&gt;c) You compiled with OpenMP on, Nested levels off, and loop is in nested level.&lt;BR /&gt;d) You compiled with OpenMP on, but only 1 thread is used&lt;BR /&gt;e) N &amp;lt;= 1&lt;BR /&gt;f) all of a&lt;I&gt; or all of b&lt;I&gt; or both are 0&lt;BR /&gt;g) N is sufficiently small such that each thread finishes before the other starts (assuming multiple threads run the loop)&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Jim Dempsey&lt;BR /&gt;&lt;/I&gt;&lt;/I&gt;</description>
      <pubDate>Thu, 26 Mar 2009 17:13:35 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Moderncode-for-Parallel/In-OpenMP-Reduction-Clause/m-p/871659#M2963</guid>
      <dc:creator>jimdempseyatthecove</dc:creator>
      <dc:date>2009-03-26T17:13:35Z</dc:date>
    </item>
    <item>
      <title>Re: In OpenMP, Reduction Clause</title>
      <link>https://community.intel.com/t5/Intel-Moderncode-for-Parallel/In-OpenMP-Reduction-Clause/m-p/871660#M2964</link>
      <description>&lt;DIV style="margin:0px;"&gt;
&lt;DIV id="quote_reply" style="width: 100%; margin-top: 5px;"&gt;
&lt;DIV style="margin-left:2px;margin-right:2px;"&gt;Quoting - &lt;A href="https://community.intel.com/en-us/profile/99850"&gt;jimdempseyatthecove&lt;/A&gt;&lt;/DIV&gt;
&lt;DIV style="background-color:#E5E5E5; padding:5px;border: 1px; border-style: inset;margin-left:2px;margin-right:2px;"&gt;&lt;EM&gt; &lt;BR /&gt;a) You got lucky&lt;BR /&gt;b) You compiled with OpenMP off&lt;BR /&gt;c) You compiled with OpenMP on, Nested levels off, and loop is in nested level.&lt;BR /&gt;d) You compiled with OpenMP on, but only 1 thread is used&lt;BR /&gt;e) N &amp;lt;= 1&lt;BR /&gt;f) all of a&lt;I&gt; or all of b&lt;I&gt; or both are 0&lt;BR /&gt;g) N is sufficiently small such that each thread finishes before the other starts (assuming multiple threads run the loop)&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Jim Dempsey&lt;BR /&gt;&lt;/I&gt;&lt;/I&gt;&lt;/EM&gt;&lt;I&gt;&lt;I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;BR /&gt;</description>
      <pubDate>Fri, 27 Mar 2009 09:19:28 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Moderncode-for-Parallel/In-OpenMP-Reduction-Clause/m-p/871660#M2964</guid>
      <dc:creator>zhangzhe65</dc:creator>
      <dc:date>2009-03-27T09:19:28Z</dc:date>
    </item>
    <item>
      <title>Re: In OpenMP, Reduction Clause</title>
      <link>https://community.intel.com/t5/Intel-Moderncode-for-Parallel/In-OpenMP-Reduction-Clause/m-p/871661#M2965</link>
      <description>&lt;DIV style="margin:0px;"&gt;&lt;/DIV&gt;
Thank you very much indeed for your reply.&lt;BR /&gt;</description>
      <pubDate>Fri, 27 Mar 2009 09:25:38 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Moderncode-for-Parallel/In-OpenMP-Reduction-Clause/m-p/871661#M2965</guid>
      <dc:creator>zhangzhe65</dc:creator>
      <dc:date>2009-03-27T09:25:38Z</dc:date>
    </item>
  </channel>
</rss>

