<?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: Intel fortran 50% slower than g77? in Intel® Fortran Compiler</title>
    <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Intel-fortran-50-slower-than-g77/m-p/742092#M1363</link>
    <description>Probably relative performance is most useful. I don't have a Mac handy, but on Linux I see a huge advantage by IFORT. And the vectorizer gives another 2x boost when it kicks in (it appears to be active in your case, probably the Mac default).&lt;BR /&gt;&lt;BR /&gt;$ g77 --version&lt;BR /&gt;GNU Fortran (GCC) 3.4.1&lt;BR /&gt;Copyright (C) 2004 Free Software Foundation, Inc.&lt;BR /&gt;&lt;BR /&gt;GNU Fortran comes with NO WARRANTY, to the extent permitted by law.&lt;BR /&gt;You may redistribute copies of GNU Fortran&lt;BR /&gt;under the terms of the GNU General Public License.&lt;BR /&gt;For more information about these matters, see the file named COPYING&lt;BR /&gt;or type the command `info -f g77 Copying'.&lt;BR /&gt;$ g77 -O2 t1.f -o g.x &amp;amp;&amp;amp; time ./g.x&lt;BR /&gt;-46.4316406&lt;BR /&gt;&lt;BR /&gt;real 1m44.915s&lt;BR /&gt;user 1m44.880s&lt;BR /&gt;sys 0m0.000s&lt;BR /&gt;$&lt;BR /&gt;$ ifort -V -O2 t1.f -o i.x &amp;amp;&amp;amp; time ./i.x&lt;BR /&gt;Intel Fortran Compiler for Intel EM64T-based applications, Version 9.1 Build 20060925 Package ID: l_fc_c_9.1.039&lt;BR /&gt;Copyright (C) 1985-2006 Intel Corporation. All rights reserved.&lt;BR /&gt;&lt;BR /&gt;Intel Fortran 9.1-6370&lt;BR /&gt;GNU ld version 2.14.90.0.4 20030523&lt;BR /&gt; -46.43410&lt;BR /&gt;&lt;BR /&gt;real 0m30.866s&lt;BR /&gt;user 0m30.820s&lt;BR /&gt;sys 0m0.010s&lt;BR /&gt;$&lt;BR /&gt;$ ifort -xP -O2 t1.f -o i.x &amp;amp;&amp;amp; time ./i.x&lt;BR /&gt;t1.f(1) : (col. 7) remark: LOOP WAS VECTORIZED.&lt;BR /&gt; -46.41003&lt;BR /&gt;&lt;BR /&gt;real 0m15.150s&lt;BR /&gt;user 0m15.150s&lt;BR /&gt;sys 0m0.000s&lt;BR /&gt;$&lt;BR /&gt;&lt;BR /&gt;&amp;lt;...some time later...&amp;gt;&lt;BR /&gt;&lt;BR /&gt;Okay, I found a Mac (sans g77), and I do see the poor performance there (2+ minutes). I tried turning off the vectorizer and the performance looks more reasonable (45s). The vectorized version uniquely has a call to '_vmlsSin4.stub'.&lt;BR /&gt;&lt;BR /&gt;Please open a defect ticket for this on [https://premier.intel.com Premier].&lt;BR /&gt;&lt;BR /&gt;Thanks.&lt;BR /&gt;&lt;BR /&gt;</description>
    <pubDate>Wed, 18 Oct 2006 11:33:47 GMT</pubDate>
    <dc:creator>Micah_Elliott</dc:creator>
    <dc:date>2006-10-18T11:33:47Z</dc:date>
    <item>
      <title>Intel fortran 50% slower than g77?</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Intel-fortran-50-slower-than-g77/m-p/742090#M1361</link>
      <description>I'm new to intel fortran and after installing ifort (9.1.029) on my brand new imac 24" (2.33GHz) I wanted to see how much faster it is than gnu fortran (g77) on the following trivial program:
&lt;BR /&gt;
&lt;BR /&gt;      do i=1,10**9
&lt;BR /&gt;         x=i
&lt;BR /&gt;         s=s+sin(x)
&lt;BR /&gt;      end do
&lt;BR /&gt;      print*, s
&lt;BR /&gt;      end
&lt;BR /&gt;
&lt;BR /&gt;To my horror I found the following results:
&lt;BR /&gt;$ g77 1.f 
&lt;BR /&gt;$ time a.out
&lt;BR /&gt;   -46.4312897
&lt;BR /&gt;real    1m3.011s
&lt;BR /&gt;user    1m2.828s
&lt;BR /&gt;sys     0m0.055s
&lt;BR /&gt;
&lt;BR /&gt;$ ifort 1.f
&lt;BR /&gt;1.f(1) : (col. 7) remark: LOOP WAS VECTORIZED.
&lt;BR /&gt;$ time a.out
&lt;BR /&gt;  -46.41003    
&lt;BR /&gt;real    1m31.072s
&lt;BR /&gt;user    1m30.998s
&lt;BR /&gt;sys     0m0.042s
&lt;BR /&gt;
&lt;BR /&gt;Intel is 50% SLOWER than gnu? Am I doing something wrong?</description>
      <pubDate>Wed, 18 Oct 2006 06:59:49 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Intel-fortran-50-slower-than-g77/m-p/742090#M1361</guid>
      <dc:creator>Boris_B_</dc:creator>
      <dc:date>2006-10-18T06:59:49Z</dc:date>
    </item>
    <item>
      <title>Re: Intel fortran 50% slower than g77?</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Intel-fortran-50-slower-than-g77/m-p/742091#M1362</link>
      <description>I just tried it on a somewhat faster system and got a MUCH faster time than your g77 time (about 12 seconds). But what you're really comparing is the performance of the sin intrinsic, yes? Is that what you're interested in? &lt;BR /&gt;</description>
      <pubDate>Wed, 18 Oct 2006 07:55:51 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Intel-fortran-50-slower-than-g77/m-p/742091#M1362</guid>
      <dc:creator>Steven_L_Intel1</dc:creator>
      <dc:date>2006-10-18T07:55:51Z</dc:date>
    </item>
    <item>
      <title>Re: Intel fortran 50% slower than g77?</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Intel-fortran-50-slower-than-g77/m-p/742092#M1363</link>
      <description>Probably relative performance is most useful. I don't have a Mac handy, but on Linux I see a huge advantage by IFORT. And the vectorizer gives another 2x boost when it kicks in (it appears to be active in your case, probably the Mac default).&lt;BR /&gt;&lt;BR /&gt;$ g77 --version&lt;BR /&gt;GNU Fortran (GCC) 3.4.1&lt;BR /&gt;Copyright (C) 2004 Free Software Foundation, Inc.&lt;BR /&gt;&lt;BR /&gt;GNU Fortran comes with NO WARRANTY, to the extent permitted by law.&lt;BR /&gt;You may redistribute copies of GNU Fortran&lt;BR /&gt;under the terms of the GNU General Public License.&lt;BR /&gt;For more information about these matters, see the file named COPYING&lt;BR /&gt;or type the command `info -f g77 Copying'.&lt;BR /&gt;$ g77 -O2 t1.f -o g.x &amp;amp;&amp;amp; time ./g.x&lt;BR /&gt;-46.4316406&lt;BR /&gt;&lt;BR /&gt;real 1m44.915s&lt;BR /&gt;user 1m44.880s&lt;BR /&gt;sys 0m0.000s&lt;BR /&gt;$&lt;BR /&gt;$ ifort -V -O2 t1.f -o i.x &amp;amp;&amp;amp; time ./i.x&lt;BR /&gt;Intel Fortran Compiler for Intel EM64T-based applications, Version 9.1 Build 20060925 Package ID: l_fc_c_9.1.039&lt;BR /&gt;Copyright (C) 1985-2006 Intel Corporation. All rights reserved.&lt;BR /&gt;&lt;BR /&gt;Intel Fortran 9.1-6370&lt;BR /&gt;GNU ld version 2.14.90.0.4 20030523&lt;BR /&gt; -46.43410&lt;BR /&gt;&lt;BR /&gt;real 0m30.866s&lt;BR /&gt;user 0m30.820s&lt;BR /&gt;sys 0m0.010s&lt;BR /&gt;$&lt;BR /&gt;$ ifort -xP -O2 t1.f -o i.x &amp;amp;&amp;amp; time ./i.x&lt;BR /&gt;t1.f(1) : (col. 7) remark: LOOP WAS VECTORIZED.&lt;BR /&gt; -46.41003&lt;BR /&gt;&lt;BR /&gt;real 0m15.150s&lt;BR /&gt;user 0m15.150s&lt;BR /&gt;sys 0m0.000s&lt;BR /&gt;$&lt;BR /&gt;&lt;BR /&gt;&amp;lt;...some time later...&amp;gt;&lt;BR /&gt;&lt;BR /&gt;Okay, I found a Mac (sans g77), and I do see the poor performance there (2+ minutes). I tried turning off the vectorizer and the performance looks more reasonable (45s). The vectorized version uniquely has a call to '_vmlsSin4.stub'.&lt;BR /&gt;&lt;BR /&gt;Please open a defect ticket for this on [https://premier.intel.com Premier].&lt;BR /&gt;&lt;BR /&gt;Thanks.&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 18 Oct 2006 11:33:47 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Intel-fortran-50-slower-than-g77/m-p/742092#M1363</guid>
      <dc:creator>Micah_Elliott</dc:creator>
      <dc:date>2006-10-18T11:33:47Z</dc:date>
    </item>
    <item>
      <title>Re: Intel fortran 50% slower than g77?</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Intel-fortran-50-slower-than-g77/m-p/742093#M1364</link>
      <description>I'm not particularly interested in the sin intrinsic per se. What I'm interested in is in getting a rough idea of the efficiency of the ifort compiler as compared to the free g77 compiler, when running on a mac. I realise that using just the sin intrinsic results in a very limiting test, but nevertheless, that g77 beats ifort by the HUGE margin of 50% indicates that there is something wrong with ifort when running on a mac.</description>
      <pubDate>Wed, 18 Oct 2006 13:38:30 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Intel-fortran-50-slower-than-g77/m-p/742093#M1364</guid>
      <dc:creator>Boris_B_</dc:creator>
      <dc:date>2006-10-18T13:38:30Z</dc:date>
    </item>
    <item>
      <title>Re: Intel fortran 50% slower than g77?</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Intel-fortran-50-slower-than-g77/m-p/742094#M1365</link>
      <description>Micah Elliott's discovery that vectorisation may be the problem is very interesting. This led me to the following results on my iMac:
&lt;BR /&gt;
&lt;BR /&gt;$ ifort -O0 1.f
&lt;BR /&gt;$ time a.out
&lt;BR /&gt;  -48.43686    
&lt;BR /&gt;real    0m31.921s
&lt;BR /&gt;user    0m31.806s
&lt;BR /&gt;sys     0m0.020s
&lt;BR /&gt;
&lt;BR /&gt;$ ifort 1.f
&lt;BR /&gt;1.f(1) : (col. 7) remark: LOOP WAS VECTORIZED.
&lt;BR /&gt;$ time a.out
&lt;BR /&gt;  -46.41003    
&lt;BR /&gt;real    1m30.764s
&lt;BR /&gt;user    1m30.679s
&lt;BR /&gt;sys     0m0.041s
&lt;BR /&gt;
&lt;BR /&gt;In other words, switching off optimization entirely makes ifort run THREE times faster, amazing.
&lt;BR /&gt;</description>
      <pubDate>Wed, 18 Oct 2006 13:50:13 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Intel-fortran-50-slower-than-g77/m-p/742094#M1365</guid>
      <dc:creator>Boris_B_</dc:creator>
      <dc:date>2006-10-18T13:50:13Z</dc:date>
    </item>
    <item>
      <title>Re: Intel fortran 50% slower than g77?</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Intel-fortran-50-slower-than-g77/m-p/742095#M1366</link>
      <description>&amp;gt; In other words, switching off optimization entirely makes ifort run THREE times faster, amazing.&lt;BR /&gt;&lt;BR /&gt;You'd find further significant speedup if you enabled optimization, but simply disabled generation of the vmlsSin4 call (I can't get into the how-to here), which is where the problem appears to lie. This is simply a bug, not a general performance limitation, which I'll file on your behalf if I don't see you've filed something on Premier today.&lt;BR /&gt;&lt;BR /&gt;Thanks for the useful test case.&lt;BR /&gt;</description>
      <pubDate>Wed, 18 Oct 2006 20:25:21 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Intel-fortran-50-slower-than-g77/m-p/742095#M1366</guid>
      <dc:creator>Micah_Elliott</dc:creator>
      <dc:date>2006-10-18T20:25:21Z</dc:date>
    </item>
    <item>
      <title>Re: Intel fortran 50% slower than g77?</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Intel-fortran-50-slower-than-g77/m-p/742096#M1367</link>
      <description>&lt;P class="MsoNormal" style="MARGIN: 0in 0in 0pt"&gt;Dear Boris,&lt;/P&gt;
&lt;P class="MsoNormal" style="MARGIN: 0in 0in 0pt"&gt;An almost identical test case was already submitted to the compiler team and is under investigation by our library team. The issue seems MacOS specific. Just to be clear, vectorization, in general, and when combined with using our Short Vector Math Library, in particular, typically improves performance substantially where applicable. So, you simply stumbled on what is, hopefully, a short-lived glass-jaw.&lt;/P&gt;
&lt;P class="MsoNormal" style="MARGIN: 0in 0in 0pt"&gt;If you are truly interested in comparing ifort performance with other compilers, I would suggest using a slightly larger performance test suite.&lt;/P&gt;
&lt;P class="MsoNormal" style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="mso-ansi-language: DA"&gt;Aart Bik&lt;P&gt;&lt;/P&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="MsoNormal" style="MARGIN: 0in 0in 0pt"&gt;&lt;A href="http://www.aartbik.com/"&gt;&lt;SPAN style="mso-ansi-language: DA"&gt;&lt;/SPAN&gt;&lt;/A&gt;&lt;A href="http://www.aartbik.com/" target="_blank"&gt;http://www.aartbik.com/&lt;/A&gt;&lt;SPAN style="mso-ansi-language: DA"&gt;&lt;P&gt;&lt;/P&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="MsoNormal" style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="mso-ansi-language: DA"&gt;&lt;P&gt;&lt;/P&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 19 Oct 2006 01:23:29 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Intel-fortran-50-slower-than-g77/m-p/742096#M1367</guid>
      <dc:creator>Intel_C_Intel</dc:creator>
      <dc:date>2006-10-19T01:23:29Z</dc:date>
    </item>
  </channel>
</rss>

