<?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 forall and stack overflow in Intel® Fortran Compiler</title>
    <link>https://community.intel.com/t5/Intel-Fortran-Compiler/forall-and-stack-overflow/m-p/786520#M30302</link>
    <description>The semantics of DO CONCURRENT are different from FORALL in terms of execution order within the construct. I don't think I'd go as far as Tim as to say that ifort "expects" an IVDEP directive. I do agree that FORALL is inappropriate here - the compiler will do a very good job of vectorization with:&lt;BR /&gt;&lt;BR /&gt;a = b&lt;BR /&gt;&lt;BR /&gt;Please do not use a(:) = b(:) - the semantics are subtly different and the extraneous (:) can prevent the compiler from doing the best job.</description>
    <pubDate>Fri, 09 Jul 2010 18:31:02 GMT</pubDate>
    <dc:creator>Steven_L_Intel1</dc:creator>
    <dc:date>2010-07-09T18:31:02Z</dc:date>
    <item>
      <title>forall and stack overflow</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/forall-and-stack-overflow/m-p/786518#M30300</link>
      <description>&lt;P&gt;I have found in following case Intel fortran would likely to give rise to stack overflow, where such error doesn't exist when usingother compliers like gfortran&lt;BR /&gt;&lt;BR /&gt;eg1: a(:) = b(:)&lt;BR /&gt;eg2: forall( i=1:n )&lt;BR /&gt; a(i)=b(i)&lt;BR /&gt; end forall&lt;BR /&gt;&lt;BR /&gt;However, in following case, it wouldn't likely give rise to the above error&lt;BR /&gt;&lt;BR /&gt;eg3: a(:) = 0.d0&lt;BR /&gt;eg4: c = dot_product( a(:), b(:) )&lt;BR /&gt;eg5: do i=1,n&lt;BR /&gt; a(i)=b(i)&lt;BR /&gt; end do&lt;BR /&gt;&lt;BR /&gt;My problems are:&lt;BR /&gt;1. eg1 and eg2 are generally a special implementation of eg5 and supposed more efficient because they provides more information into compiler. Although it depends on the internal implementation of intel compiler, but it is strange to gives rise tothe aboveprobelm.&lt;BR /&gt;&lt;BR /&gt;2. Eg4 generally doesn't give rise to stack overflow. Is this so?&lt;BR /&gt;&lt;BR /&gt;Much apprieciated for your anwser&lt;/P&gt;</description>
      <pubDate>Fri, 02 Jul 2010 08:06:20 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/forall-and-stack-overflow/m-p/786518#M30300</guid>
      <dc:creator>hillyuanjp</dc:creator>
      <dc:date>2010-07-02T08:06:20Z</dc:date>
    </item>
    <item>
      <title>forall and stack overflow</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/forall-and-stack-overflow/m-p/786519#M30301</link>
      <description>ifort expects a single-assignment forall to be preceded by !dir$ ivdep if you intend optimization. It's difficult to see why you would use forall in this case anyway.&lt;BR /&gt;There have been several previous articles posted on thes Fortran forums about the pros and cons of forall.&lt;BR /&gt;&lt;BR /&gt;In f2008, there will be a do concurrent, which is a forall with fewer restrictions about optimization. There has been discussion implying that an initial implementation might be the IVDEP forall.</description>
      <pubDate>Fri, 02 Jul 2010 14:36:21 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/forall-and-stack-overflow/m-p/786519#M30301</guid>
      <dc:creator>TimP</dc:creator>
      <dc:date>2010-07-02T14:36:21Z</dc:date>
    </item>
    <item>
      <title>forall and stack overflow</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/forall-and-stack-overflow/m-p/786520#M30302</link>
      <description>The semantics of DO CONCURRENT are different from FORALL in terms of execution order within the construct. I don't think I'd go as far as Tim as to say that ifort "expects" an IVDEP directive. I do agree that FORALL is inappropriate here - the compiler will do a very good job of vectorization with:&lt;BR /&gt;&lt;BR /&gt;a = b&lt;BR /&gt;&lt;BR /&gt;Please do not use a(:) = b(:) - the semantics are subtly different and the extraneous (:) can prevent the compiler from doing the best job.</description>
      <pubDate>Fri, 09 Jul 2010 18:31:02 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/forall-and-stack-overflow/m-p/786520#M30302</guid>
      <dc:creator>Steven_L_Intel1</dc:creator>
      <dc:date>2010-07-09T18:31:02Z</dc:date>
    </item>
  </channel>
</rss>

