<?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: OpenMP loops run not parallel in Software Archive</title>
    <link>https://community.intel.com/t5/Software-Archive/OpenMP-loops-run-not-parallel/m-p/743805#M1436</link>
    <description>&lt;DIV&gt;&lt;/DIV&gt;
Hi,&lt;BR /&gt;&lt;BR /&gt;Please double check that the intel compiler is being invoked with the '/Qopenmp' flag. The setting for this is located in "Configuration Properties&amp;gt;C/C++&amp;gt;Language&amp;gt;OpenMP Support" in the project properties dialog.&lt;BR /&gt;&lt;BR /&gt;If that flag is set, do you have a reproducing case that you can share?&lt;BR /&gt;&lt;BR /&gt;Thanks,&lt;BR /&gt;&lt;BR /&gt;-Kevin&lt;BR /&gt;</description>
    <pubDate>Wed, 16 Dec 2009 16:29:49 GMT</pubDate>
    <dc:creator>Kevin_Magee__Intel_</dc:creator>
    <dc:date>2009-12-16T16:29:49Z</dc:date>
    <item>
      <title>OpenMP loops run not parallel</title>
      <link>https://community.intel.com/t5/Software-Archive/OpenMP-loops-run-not-parallel/m-p/743804#M1435</link>
      <description>&lt;BR /&gt;&lt;BR /&gt;Hi,&lt;BR /&gt;&lt;BR /&gt;in our application we have some loops parallelized by OMP. Compiled with VC they run parallel, compiled with Intel compiler they don't.&lt;BR /&gt;&lt;BR /&gt;Some informations to my system: Windows 7 Ultimate, Visual Studio 9.0, Microsoft .Net Framework V. 3.5 SP1. We use an evaluation version of Parallel Studio.&lt;BR /&gt;&lt;BR /&gt;Thanks for any help,&lt;BR /&gt;Volker</description>
      <pubDate>Wed, 16 Dec 2009 14:44:25 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/OpenMP-loops-run-not-parallel/m-p/743804#M1435</guid>
      <dc:creator>vw61</dc:creator>
      <dc:date>2009-12-16T14:44:25Z</dc:date>
    </item>
    <item>
      <title>Re: OpenMP loops run not parallel</title>
      <link>https://community.intel.com/t5/Software-Archive/OpenMP-loops-run-not-parallel/m-p/743805#M1436</link>
      <description>&lt;DIV&gt;&lt;/DIV&gt;
Hi,&lt;BR /&gt;&lt;BR /&gt;Please double check that the intel compiler is being invoked with the '/Qopenmp' flag. The setting for this is located in "Configuration Properties&amp;gt;C/C++&amp;gt;Language&amp;gt;OpenMP Support" in the project properties dialog.&lt;BR /&gt;&lt;BR /&gt;If that flag is set, do you have a reproducing case that you can share?&lt;BR /&gt;&lt;BR /&gt;Thanks,&lt;BR /&gt;&lt;BR /&gt;-Kevin&lt;BR /&gt;</description>
      <pubDate>Wed, 16 Dec 2009 16:29:49 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/OpenMP-loops-run-not-parallel/m-p/743805#M1436</guid>
      <dc:creator>Kevin_Magee__Intel_</dc:creator>
      <dc:date>2009-12-16T16:29:49Z</dc:date>
    </item>
    <item>
      <title>Re: OpenMP loops run not parallel</title>
      <link>https://community.intel.com/t5/Software-Archive/OpenMP-loops-run-not-parallel/m-p/743806#M1437</link>
      <description>&lt;DIV style="margin:0px;"&gt;
&lt;DIV id="quote_reply" style="margin-top: 5px; width: 100%;"&gt;
&lt;DIV style="margin-left:2px;margin-right:2px;"&gt;Quoting - &lt;A href="https://community.intel.com/en-us/profile/449268"&gt;Kevin Magee (Intel)&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;Hi,&lt;BR /&gt;&lt;BR /&gt;Please double check that the intel compiler is being invoked with the '/Qopenmp' flag. The setting for this is located in "Configuration Properties&amp;gt;C/C++&amp;gt;Language&amp;gt;OpenMP Support" in the project properties dialog.&lt;BR /&gt;&lt;BR /&gt;If that flag is set, do you have a reproducing case that you can share?&lt;BR /&gt;&lt;BR /&gt;Thanks,&lt;BR /&gt;&lt;BR /&gt;-Kevin&lt;BR /&gt;&lt;/EM&gt;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;BR /&gt;Hi,&lt;BR /&gt;&lt;BR /&gt;the flag is set.&lt;BR /&gt;&lt;BR /&gt;But I have solved the issue.&lt;BR /&gt;&lt;BR /&gt;Here is a little simplified sample of my code:&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;signed int numTiles = 10;&lt;BR /&gt;bool reduceThreads = false, abort = false, badAlloc = false, unknown = false;&lt;BR /&gt;omp_set_num_threads(4);&lt;BR /&gt;&lt;BR /&gt;do&lt;BR /&gt;{&lt;BR /&gt; if (reduceThreads)&lt;BR /&gt; {&lt;BR /&gt; omp_set_num_threads(1);&lt;BR /&gt; reduceThreads = abort = badAlloc = false;&lt;BR /&gt; }&lt;BR /&gt;&lt;BR /&gt; #pragma omp parallel for schedule(dynamic, 1)&lt;BR /&gt; for (int i = 0; i &amp;lt; numTiles; i++)&lt;BR /&gt; {&lt;BR /&gt; if (abort)&lt;BR /&gt; continue;&lt;BR /&gt;&lt;BR /&gt; unsigned int tileX = i % getNumTilesX();&lt;BR /&gt; unsigned int tileY = i / getNumTilesX();&lt;BR /&gt; unsigned int state = ACTIVATED;&lt;BR /&gt; if (((state &amp;amp; ACTIVATED) == ACTIVATED))&lt;BR /&gt; {&lt;BR /&gt; try&lt;BR /&gt; {&lt;BR /&gt; {&lt;BR /&gt; #pragma omp critical&lt;BR /&gt; removeSomething(tileX, tileY);&lt;BR /&gt; }&lt;BR /&gt; makeSomething(tileX, tileY);&lt;BR /&gt; }&lt;BR /&gt; catch (std::bad_alloc&amp;amp;)&lt;BR /&gt; {&lt;BR /&gt; if (omp_get_num_threads() &amp;gt; 1)&lt;BR /&gt; {&lt;BR /&gt; reduceThreads = abort = badAlloc = true;&lt;BR /&gt; }&lt;BR /&gt; else&lt;BR /&gt; {&lt;BR /&gt; abort = badAlloc = true;&lt;BR /&gt; }&lt;BR /&gt; //continue;&lt;BR /&gt;}&lt;BR /&gt; catch (ExGenerationError&amp;amp;)&lt;BR /&gt; {&lt;BR /&gt; abort = true;&lt;BR /&gt; //continue;&lt;BR /&gt; }&lt;BR /&gt; catch (...)&lt;BR /&gt; {&lt;BR /&gt; abort = unknown = true;&lt;BR /&gt; //continue;&lt;BR /&gt; }&lt;BR /&gt; }&lt;BR /&gt; }&lt;BR /&gt;}&lt;BR /&gt;while (reduceThreads);&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;At first the continue statements were not commended. In this case the compiler runs without error message.&lt;BR /&gt;But the message OpenMP DEFINED LOOP WAS PARALLELIZED came not.&lt;BR /&gt;&lt;BR /&gt;In the second step I commended the last three continue statements. The message OpenMP DEFINED LOOP WAS PARALLELIZED came and all was nice.&lt;BR /&gt;&lt;BR /&gt;Any explanations?&lt;BR /&gt;&lt;BR /&gt;Thanks,&lt;BR /&gt;Volker&lt;BR /&gt;</description>
      <pubDate>Thu, 17 Dec 2009 14:41:23 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/OpenMP-loops-run-not-parallel/m-p/743806#M1437</guid>
      <dc:creator>vw61</dc:creator>
      <dc:date>2009-12-17T14:41:23Z</dc:date>
    </item>
  </channel>
</rss>

