<?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 stack overflow when trying to uase openmp directive in Intel® Fortran Compiler</title>
    <link>https://community.intel.com/t5/Intel-Fortran-Compiler/stack-overflow-when-trying-to-uase-openmp-directive/m-p/769763#M21982</link>
    <description>As your search no doubt told you, the most common solutions for stack overflow when introducing OpenMP are attention both to global stack (Microsoft linker properties) and thread stack (KMP_STACKSIZE).</description>
    <pubDate>Fri, 20 Apr 2012 14:06:40 GMT</pubDate>
    <dc:creator>TimP</dc:creator>
    <dc:date>2012-04-20T14:06:40Z</dc:date>
    <item>
      <title>stack overflow when trying to uase openmp directive</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/stack-overflow-when-trying-to-uase-openmp-directive/m-p/769760#M21979</link>
      <description>Been running with single thread and tried to use a single openmp instruction.&lt;BR /&gt;&lt;BR /&gt;do 95 k = 1, ivfcount&lt;BR /&gt; j = ivflist(k)&lt;BR /&gt;!$omp parallel DO private(i,j)&lt;BR /&gt; do 90 i = 1, nfmaxp2&lt;BR /&gt; if (i.le.ncn(j)+2) w(j) = w(j) + (a(i,j) * p(cn(i,j)))&lt;BR /&gt;90 continue&lt;BR /&gt;!$omp end parallel DO&lt;BR /&gt;95 continue&lt;BR /&gt;&lt;BR /&gt;Get the error "forrt1: severe (170): Program Exception - stack overflow" A web search shows this isn't uncommon but trying several fixes that were suggested, haven't fixed the problem.&lt;BR /&gt;&lt;BR /&gt;Running Intel Fortran 11.1 in Visual Studion 2008 on Win7 64-bit.&lt;BR /&gt;&lt;BR /&gt;Thanks for any suggestions.</description>
      <pubDate>Thu, 19 Apr 2012 18:11:52 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/stack-overflow-when-trying-to-uase-openmp-directive/m-p/769760#M21979</guid>
      <dc:creator>Ralph_Nelson</dc:creator>
      <dc:date>2012-04-19T18:11:52Z</dc:date>
    </item>
    <item>
      <title>stack overflow when trying to uase openmp directive</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/stack-overflow-when-trying-to-uase-openmp-directive/m-p/769761#M21980</link>
      <description>In effect, you have a reduction operator here. With the syntax you quote, you have a race condition, with multiple threads updating w(j) at the maximum possible rate. It doesn't look like you should be trying OpenMP in the inner reduction loop. Supposing that you wrote&lt;BR /&gt;!$omp parallel do private(j,tmp)&lt;BR /&gt;do k=1,ivfcount&lt;BR /&gt; j = ivflist(k)&lt;BR /&gt; tmp = dot_product(a(1:min(nfpmax2,ncn(j)+2),j),p(1:min(nfpmax2,ncn(j)+2),j))&lt;BR /&gt;!$omp ordered&lt;BR /&gt; w(j)= tmp&lt;BR /&gt;!$omp end ordered&lt;BR /&gt;enddo&lt;BR /&gt;&lt;BR /&gt;You would not need the ordered if you could assure that ivlist doesn't contain repeated values, if in fact that's what is meant in this code. &lt;BR /&gt;</description>
      <pubDate>Thu, 19 Apr 2012 21:45:43 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/stack-overflow-when-trying-to-uase-openmp-directive/m-p/769761#M21980</guid>
      <dc:creator>TimP</dc:creator>
      <dc:date>2012-04-19T21:45:43Z</dc:date>
    </item>
    <item>
      <title>stack overflow when trying to uase openmp directive</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/stack-overflow-when-trying-to-uase-openmp-directive/m-p/769762#M21981</link>
      <description>Thanks Tim.&lt;BR /&gt;&lt;BR /&gt;Yes, ivflist has no repeated values, just a list of loop values that statisfy a condition.&lt;BR /&gt;&lt;BR /&gt;ivfcount = 0&lt;BR /&gt; do 7 j = 1, nelem&lt;BR /&gt; if (ivflag(j).ne.1) then&lt;BR /&gt; ivfcount = ivfcount +1&lt;BR /&gt; ivflist(ivfcount) = j&lt;BR /&gt; endif&lt;BR /&gt;7 continue&lt;BR /&gt;&lt;BR /&gt;Implementing your suggestion still results in the same failure.</description>
      <pubDate>Fri, 20 Apr 2012 13:05:38 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/stack-overflow-when-trying-to-uase-openmp-directive/m-p/769762#M21981</guid>
      <dc:creator>Ralph_Nelson</dc:creator>
      <dc:date>2012-04-20T13:05:38Z</dc:date>
    </item>
    <item>
      <title>stack overflow when trying to uase openmp directive</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/stack-overflow-when-trying-to-uase-openmp-directive/m-p/769763#M21982</link>
      <description>As your search no doubt told you, the most common solutions for stack overflow when introducing OpenMP are attention both to global stack (Microsoft linker properties) and thread stack (KMP_STACKSIZE).</description>
      <pubDate>Fri, 20 Apr 2012 14:06:40 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/stack-overflow-when-trying-to-uase-openmp-directive/m-p/769763#M21982</guid>
      <dc:creator>TimP</dc:creator>
      <dc:date>2012-04-20T14:06:40Z</dc:date>
    </item>
    <item>
      <title>stack overflow when trying to uase openmp directive</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/stack-overflow-when-trying-to-uase-openmp-directive/m-p/769764#M21983</link>
      <description>Tim,&lt;BR /&gt;&lt;BR /&gt;Dumb question(s). I assume I can set the global stack using&lt;BR /&gt;Configuation Properties -&amp;gt; Linker -&amp;gt; System -&amp;gt; Stack Reserve Size&lt;BR /&gt;&lt;BR /&gt;Is the thread stack variable set as a comand line addition to Fortran?</description>
      <pubDate>Fri, 20 Apr 2012 18:56:31 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/stack-overflow-when-trying-to-uase-openmp-directive/m-p/769764#M21983</guid>
      <dc:creator>Ralph_Nelson</dc:creator>
      <dc:date>2012-04-20T18:56:31Z</dc:date>
    </item>
    <item>
      <title>stack overflow when trying to uase openmp directive</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/stack-overflow-when-trying-to-uase-openmp-directive/m-p/769765#M21984</link>
      <description>You have to define an environment variable, KMP_STACKSIZE, before running the program. It isn't a compile or link option.</description>
      <pubDate>Fri, 20 Apr 2012 19:08:17 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/stack-overflow-when-trying-to-uase-openmp-directive/m-p/769765#M21984</guid>
      <dc:creator>Steven_L_Intel1</dc:creator>
      <dc:date>2012-04-20T19:08:17Z</dc:date>
    </item>
  </channel>
</rss>

