<?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 Missed optimization on SHAPE intrinsic in Intel® Fortran Compiler</title>
    <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Missed-optimization-on-SHAPE-intrinsic/m-p/985769#M100780</link>
    <description>&lt;P&gt;Compile the following program with ifort 13.1.0.146. You would expect the compiler not to create a temporary copy of x(:,:,:,1,2) in subroutine f. But it does. Using UBOUND seems to be a viable workaround.&lt;/P&gt;
&lt;P&gt;[fortran]&lt;/P&gt;
&lt;P&gt;program test&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; double precision, allocatable :: x(:, :, :, :, :)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; double precision y(200, 200, 200, 2, 2)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; integer n1, n2, n3, n4, n5&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; read *, n1, n2, n3, n4, n5&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; allocate(x(n1, n2, n3, n4, n5))&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; call f(x)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; call f(y)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; contains&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; subroutine f(x)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; double precision x(:, :, :, :, :)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; print *, shape(x(:, :, :, 1, 2))&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; end subroutine&lt;/P&gt;
&lt;P&gt;end program[/fortran]&lt;/P&gt;</description>
    <pubDate>Sat, 30 Mar 2013 18:56:32 GMT</pubDate>
    <dc:creator>styc</dc:creator>
    <dc:date>2013-03-30T18:56:32Z</dc:date>
    <item>
      <title>Missed optimization on SHAPE intrinsic</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Missed-optimization-on-SHAPE-intrinsic/m-p/985769#M100780</link>
      <description>&lt;P&gt;Compile the following program with ifort 13.1.0.146. You would expect the compiler not to create a temporary copy of x(:,:,:,1,2) in subroutine f. But it does. Using UBOUND seems to be a viable workaround.&lt;/P&gt;
&lt;P&gt;[fortran]&lt;/P&gt;
&lt;P&gt;program test&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; double precision, allocatable :: x(:, :, :, :, :)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; double precision y(200, 200, 200, 2, 2)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; integer n1, n2, n3, n4, n5&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; read *, n1, n2, n3, n4, n5&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; allocate(x(n1, n2, n3, n4, n5))&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; call f(x)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; call f(y)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; contains&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; subroutine f(x)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; double precision x(:, :, :, :, :)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; print *, shape(x(:, :, :, 1, 2))&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; end subroutine&lt;/P&gt;
&lt;P&gt;end program[/fortran]&lt;/P&gt;</description>
      <pubDate>Sat, 30 Mar 2013 18:56:32 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Missed-optimization-on-SHAPE-intrinsic/m-p/985769#M100780</guid>
      <dc:creator>styc</dc:creator>
      <dc:date>2013-03-30T18:56:32Z</dc:date>
    </item>
    <item>
      <title>Thanks - I agree that this is</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Missed-optimization-on-SHAPE-intrinsic/m-p/985770#M100781</link>
      <description>&lt;P&gt;Thanks - I agree that this is a missed opportunity, I have escalated it to the developers as issue DPD200242784.&lt;/P&gt;</description>
      <pubDate>Mon, 01 Apr 2013 18:30:41 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Missed-optimization-on-SHAPE-intrinsic/m-p/985770#M100781</guid>
      <dc:creator>Steven_L_Intel1</dc:creator>
      <dc:date>2013-04-01T18:30:41Z</dc:date>
    </item>
    <item>
      <title>A fix has been found for this</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Missed-optimization-on-SHAPE-intrinsic/m-p/985771#M100782</link>
      <description>&lt;P&gt;A fix has been found for this issue. We are currently planning to include in the next major release which is currently scheduled for later this year.&lt;/P&gt;
&lt;P&gt;Annalee&lt;/P&gt;</description>
      <pubDate>Sun, 05 May 2013 17:58:35 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Missed-optimization-on-SHAPE-intrinsic/m-p/985771#M100782</guid>
      <dc:creator>Anonymous66</dc:creator>
      <dc:date>2013-05-05T17:58:35Z</dc:date>
    </item>
  </channel>
</rss>

