<?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 You may not get much interest in Intel® Fortran Compiler</title>
    <link>https://community.intel.com/t5/Intel-Fortran-Compiler/ifort-14-0-dot-product-vectorizing-differently-with-different/m-p/1138843#M136556</link>
    <description>&lt;P&gt;You may not get much interest in a four-year-old compiler. Try it with version 18 and see what it does. But I might guess that the compiler doesn't know what n1 is so it is pessimistic.&lt;/P&gt;</description>
    <pubDate>Wed, 11 Oct 2017 00:02:05 GMT</pubDate>
    <dc:creator>Steve_Lionel</dc:creator>
    <dc:date>2017-10-11T00:02:05Z</dc:date>
    <item>
      <title>ifort 14.0 dot_product vectorizing differently with different array subscripts</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/ifort-14-0-dot-product-vectorizing-differently-with-different/m-p/1138842#M136555</link>
      <description>&lt;P&gt;Greetings,&lt;/P&gt;

&lt;P&gt;I was looking at the vectorization report for a code and I found different vectorization behavior for dot_product() based on the array subscripts. The following statements are identical except for the lower bound of the array indexes (in the first it is the variable "n1", in the second it is the constant "1"):&lt;/P&gt;

&lt;PRE class="brush:fortran;"&gt; (75)   disap = disap + dot_product(ym(n1:nmax2), pMergeBulk(n1:nmax2,n))
    
 (77)   disap = disap + dot_product(ym(1:nmax2), pMergeBulk(1:nmax2,n))&lt;/PRE&gt;

&lt;P&gt;after compiling with vec-report6 I got the following results:&lt;/P&gt;

&lt;P&gt;(75): (col. 21) remark: loop was not vectorized: existence of vector dependence&lt;BR /&gt;
	(75): (col. 21) remark: vector dependence: assumed ANTI dependence between .T103_ line 75 and .T103_ line 75&lt;BR /&gt;
	(75): (col. 21) remark: vector dependence: assumed FLOW dependence between .T103_ line 75 and .T103_ line 75&lt;BR /&gt;
	(75): (col. 21) remark: vector dependence: assumed ANTI dependence between .T103_ line 75 and .T103_ line 75&lt;BR /&gt;
	(75): (col. 21) remark: vector dependence: assumed FLOW dependence between .T103_ line 75 and .T103_ line 75&lt;BR /&gt;
	(75): (col. 21) remark: vector dependence: assumed ANTI dependence between .T103_ line 75 and .T103_ line 75&lt;BR /&gt;
	(75): (col. 21) remark: vector dependence: assumed FLOW dependence between .T103_ line 75 and .T103_ line 75&lt;BR /&gt;
	(75): (col. 21) remark: vector dependence: assumed ANTI dependence between .T103_ line 75 and .T103_ line 75&lt;BR /&gt;
	(75): (col. 21) remark: vector dependence: assumed ANTI dependence between .T103_ line 75 and .T103_ line 75&lt;BR /&gt;
	(75): (col. 21) remark: vector dependence: assumed ANTI dependence between .T103_ line 75 and .T103_ line 75&lt;/P&gt;

&lt;P&gt;(77): (col. 21) remark: vectorization support: reference YM has aligned access&lt;BR /&gt;
	(77): (col. 21) remark: vectorization support: unroll factor set to 4&lt;BR /&gt;
	(77): (col. 21) remark: LOOP WAS VECTORIZED&lt;/P&gt;

&lt;P&gt;What is the reason the first statement gives a vector dependence while the second does not?&lt;/P&gt;</description>
      <pubDate>Tue, 10 Oct 2017 20:46:39 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/ifort-14-0-dot-product-vectorizing-differently-with-different/m-p/1138842#M136555</guid>
      <dc:creator>Aaron_O_</dc:creator>
      <dc:date>2017-10-10T20:46:39Z</dc:date>
    </item>
    <item>
      <title>You may not get much interest</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/ifort-14-0-dot-product-vectorizing-differently-with-different/m-p/1138843#M136556</link>
      <description>&lt;P&gt;You may not get much interest in a four-year-old compiler. Try it with version 18 and see what it does. But I might guess that the compiler doesn't know what n1 is so it is pessimistic.&lt;/P&gt;</description>
      <pubDate>Wed, 11 Oct 2017 00:02:05 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/ifort-14-0-dot-product-vectorizing-differently-with-different/m-p/1138843#M136556</guid>
      <dc:creator>Steve_Lionel</dc:creator>
      <dc:date>2017-10-11T00:02:05Z</dc:date>
    </item>
    <item>
      <title>Quote:Steve Lionel (Ret.)</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/ifort-14-0-dot-product-vectorizing-differently-with-different/m-p/1138844#M136557</link>
      <description>&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE&gt;Steve Lionel (Ret.) wrote:&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;

&lt;P&gt;You may not get much interest in a four-year-old compiler. Try it with version 18 and see what it does. But I might guess that the compiler doesn't know what n1 is so it is pessimistic.&lt;/P&gt;

&lt;P&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;

&lt;P style="font-size: 13.008px;"&gt;Hi Steve,&lt;/P&gt;

&lt;P style="font-size: 13.008px;"&gt;Thanks for the quick response. 14 is what they have at work, so I think I'm stuck with that until they decide to upgrade. If the behavior is because it is an old compiler I can accept that, I just wanted to make sure I wasn't doing something obviously wrong (e.g., there isn't some line in a standard somewhere that says "loops with both indexes as variables will not be vectorized" or some such).&lt;/P&gt;</description>
      <pubDate>Wed, 11 Oct 2017 00:53:37 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/ifort-14-0-dot-product-vectorizing-differently-with-different/m-p/1138844#M136557</guid>
      <dc:creator>Aaron_O_</dc:creator>
      <dc:date>2017-10-11T00:53:37Z</dc:date>
    </item>
    <item>
      <title>Vectorising is an</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/ifort-14-0-dot-product-vectorizing-differently-with-different/m-p/1138845#M136558</link>
      <description>&lt;P&gt;Vectorising is an optimisation for speed and has nothing to do with the fortran standards. How efficient (or not) the code is&amp;nbsp; is only down to the compiler vendors implementation.&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 11 Oct 2017 08:19:30 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/ifort-14-0-dot-product-vectorizing-differently-with-different/m-p/1138845#M136558</guid>
      <dc:creator>andrew_4619</dc:creator>
      <dc:date>2017-10-11T08:19:30Z</dc:date>
    </item>
    <item>
      <title>Most compilers that support</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/ifort-14-0-dot-product-vectorizing-differently-with-different/m-p/1138846#M136559</link>
      <description>&lt;P&gt;Most compilers that support vectorization also have directives you can place in the code to give the compiler more information. I don't recall all of what version 14 had, but you can study the Optimization section of the Intel documentation and see what works. I think version 14 also had a "Guided Auto Parallelism" feature that could give you advice.&lt;/P&gt;

&lt;P&gt;Fundamentally, the compiler has to err on the side of correctness. If it can't prove that an optimization won't give bad results (as opposed to slightly different results), it won't do the optimization. In your case, the compiler can't figure out if there is overlap.&lt;/P&gt;</description>
      <pubDate>Wed, 11 Oct 2017 13:37:03 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/ifort-14-0-dot-product-vectorizing-differently-with-different/m-p/1138846#M136559</guid>
      <dc:creator>Steve_Lionel</dc:creator>
      <dc:date>2017-10-11T13:37:03Z</dc:date>
    </item>
  </channel>
</rss>

