<?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 I usually recommend -fast to in Intel® Fortran Compiler</title>
    <link>https://community.intel.com/t5/Intel-Fortran-Compiler/best-ifort-equivalent-flag-to-gfortran-O3-ffast-math/m-p/1019680#M107857</link>
    <description>&lt;P&gt;I usually recommend -fast to start out - this is shorthand for a set of options that usually improve performance. It includes -O3 as well as -xHost, which lets the compiler take advantage of advanced instructions on the processor you're using.&lt;/P&gt;</description>
    <pubDate>Thu, 07 Aug 2014 18:35:23 GMT</pubDate>
    <dc:creator>Steven_L_Intel1</dc:creator>
    <dc:date>2014-08-07T18:35:23Z</dc:date>
    <item>
      <title>best ifort equivalent flag to gfortran -O3 -ffast-math?</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/best-ifort-equivalent-flag-to-gfortran-O3-ffast-math/m-p/1019679#M107856</link>
      <description>&lt;P&gt;Hi to everyone,&lt;/P&gt;

&lt;P&gt;I am parallelizing a MC code written in Fortran using OpenMP. During the development process I used the Parallel Studio Suite with great success (really, I would not be able to do it without the help of the Advisor, Amplifier and Inspector programs... I am not an expert (actually, I am physicist who loves programming, but I have had to do self-training during my career)&lt;/P&gt;

&lt;P&gt;Now I am testing the performance of my program under various OS, compiler and CPU's. Originally, this code was expected to be compiled with gfortran and "-O3 -ffast-math" flags, is there a close equivalent to this configuration for ifort?&lt;/P&gt;

&lt;P&gt;As a first approach I am using ifort with "-O3" and I obtain a ~20% performance gain compared with gfortran, so I would like to check if there are other flags that could improve the performance of my code. Thanks for your help!&lt;/P&gt;</description>
      <pubDate>Thu, 07 Aug 2014 17:57:00 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/best-ifort-equivalent-flag-to-gfortran-O3-ffast-math/m-p/1019679#M107856</guid>
      <dc:creator>Edgardo_Doerner</dc:creator>
      <dc:date>2014-08-07T17:57:00Z</dc:date>
    </item>
    <item>
      <title>I usually recommend -fast to</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/best-ifort-equivalent-flag-to-gfortran-O3-ffast-math/m-p/1019680#M107857</link>
      <description>&lt;P&gt;I usually recommend -fast to start out - this is shorthand for a set of options that usually improve performance. It includes -O3 as well as -xHost, which lets the compiler take advantage of advanced instructions on the processor you're using.&lt;/P&gt;</description>
      <pubDate>Thu, 07 Aug 2014 18:35:23 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/best-ifort-equivalent-flag-to-gfortran-O3-ffast-math/m-p/1019680#M107857</guid>
      <dc:creator>Steven_L_Intel1</dc:creator>
      <dc:date>2014-08-07T18:35:23Z</dc:date>
    </item>
    <item>
      <title>gfortran -O -ffast-math</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/best-ifort-equivalent-flag-to-gfortran-O3-ffast-math/m-p/1019681#M107858</link>
      <description>&lt;P&gt;gfortran -O -ffast-math implies the equivalent of -complex-limited-range which affects only complex data types and is risky.&amp;nbsp; It also implies the equivalent of -assume protect_parens,byterecl,buffered_io,minus0 which are all good options.&lt;/P&gt;

&lt;P&gt;You probably do want some unrolling, which is implied by the ifort option you mentioned, but not the gfortran.&lt;/P&gt;

&lt;P&gt;The nearest gfortran equivalent to -xHost, which Steve recommended, is -march=native.&amp;nbsp; gfortran 64-bit defaults to -msse2, as does ifort.&lt;/P&gt;</description>
      <pubDate>Thu, 07 Aug 2014 19:06:34 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/best-ifort-equivalent-flag-to-gfortran-O3-ffast-math/m-p/1019681#M107858</guid>
      <dc:creator>TimP</dc:creator>
      <dc:date>2014-08-07T19:06:34Z</dc:date>
    </item>
    <item>
      <title>Thanks for your answers, I</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/best-ifort-equivalent-flag-to-gfortran-O3-ffast-math/m-p/1019682#M107859</link>
      <description>&lt;P&gt;Thanks for your answers, I used "-O3 -fast" with ifort and comparing with gfortran -O3 -ffast-math I obtained a ~35% performance gain, but I have a small problem. When I use "-fast" I have some warnings during the compilation:&lt;/P&gt;

&lt;P&gt;ipo: warning #11021: unresolved omp_get_num_threads_&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Referenced in /tmp/ipo_ifortAfxRhT.o&lt;BR /&gt;
	(a lot of this kind of warnings, all related to omp_ functions)&lt;/P&gt;

&lt;P&gt;The program executes normally and the results are correct, but I am worried about this messages, should I worry about them?&lt;/P&gt;

&lt;P&gt;@Tim: I will try your suggestions with gfortran, thanks!&lt;/P&gt;</description>
      <pubDate>Thu, 07 Aug 2014 19:48:14 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/best-ifort-equivalent-flag-to-gfortran-O3-ffast-math/m-p/1019682#M107859</guid>
      <dc:creator>Edgardo_Doerner</dc:creator>
      <dc:date>2014-08-07T19:48:14Z</dc:date>
    </item>
    <item>
      <title>Interesting that you would</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/best-ifort-equivalent-flag-to-gfortran-O3-ffast-math/m-p/1019683#M107860</link>
      <description>&lt;P&gt;Interesting that you would get that warning - it's during the link phase. Do you have any OpenMP code in this program? Do you have a test case we can look at? If you don't see actual errors, I wouldn't worry, but something isn't right.&lt;/P&gt;</description>
      <pubDate>Thu, 07 Aug 2014 21:34:59 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/best-ifort-equivalent-flag-to-gfortran-O3-ffast-math/m-p/1019683#M107860</guid>
      <dc:creator>Steven_L_Intel1</dc:creator>
      <dc:date>2014-08-07T21:34:59Z</dc:date>
    </item>
    <item>
      <title>Yes, I use OpenMP to</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/best-ifort-equivalent-flag-to-gfortran-O3-ffast-math/m-p/1019684#M107861</link>
      <description>&lt;P&gt;Yes, I use OpenMP to parallelize it, and I call that functions to output the number of OpenMP threads, to initialize the RNG, etc...&lt;/P&gt;

&lt;P&gt;I have a test code (attached, it was an example to another problem that I had with OpenMP - from&amp;nbsp;Jim Dempsey), there I have&amp;nbsp;&lt;BR /&gt;
	the following message when compiling with ifort -openmp -O3 -fast&lt;/P&gt;

&lt;P&gt;ipo: warning #11021: unresolved omp_get_thread_num&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Referenced in /tmp/ipo_iforts9U7NX.o&lt;BR /&gt;
	ipo: warning #11021: unresolved omp_set_num_threads&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Referenced in /tmp/ipo_iforts9U7NX.o&lt;BR /&gt;
	ipo: remark #11001: performing single-file optimizations&lt;BR /&gt;
	ipo: remark #11006: generating object file /tmp/ipo_iforts9U7NX.o&lt;/P&gt;

&lt;P&gt;thanks for your help.&lt;/P&gt;</description>
      <pubDate>Thu, 07 Aug 2014 21:54:41 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/best-ifort-equivalent-flag-to-gfortran-O3-ffast-math/m-p/1019684#M107861</guid>
      <dc:creator>Edgardo_Doerner</dc:creator>
      <dc:date>2014-08-07T21:54:41Z</dc:date>
    </item>
    <item>
      <title>If you failed to set -qopenmp</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/best-ifort-equivalent-flag-to-gfortran-O3-ffast-math/m-p/1019685#M107862</link>
      <description>&lt;P&gt;If you failed to set -qopenmp or -openmp according to ifort version (equivalent to gfortran -fopenmp), and didn't follow the method of protecting omp function calls in #ifdef _OPENMP ... #endif you might expect such unresolved references at link time.&lt;/P&gt;

&lt;P&gt;The legacy method of&lt;/P&gt;

&lt;P&gt;integer omp_num_threads ! not using OpenMP header or USE&lt;/P&gt;

&lt;P&gt;...&lt;/P&gt;

&lt;P&gt;n = omp_get_num_threads()&lt;/P&gt;

&lt;P&gt;should work if you don't change default integer type, and link against OpenMP library, but certain Intel tools will warn about it, as it's contrary to OpenMP standard.&lt;/P&gt;</description>
      <pubDate>Thu, 07 Aug 2014 22:36:35 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/best-ifort-equivalent-flag-to-gfortran-O3-ffast-math/m-p/1019685#M107862</guid>
      <dc:creator>TimP</dc:creator>
      <dc:date>2014-08-07T22:36:35Z</dc:date>
    </item>
    <item>
      <title>thanks for the help, Tim, I</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/best-ifort-equivalent-flag-to-gfortran-O3-ffast-math/m-p/1019686#M107863</link>
      <description>&lt;P&gt;thanks for the help, Tim, I had no idea about the correct method to use the omp functions... and by the way, I had the doubt of how to use them and being able to compile the program without the use of the omp library... thanks!&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 10 Aug 2014 02:00:08 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/best-ifort-equivalent-flag-to-gfortran-O3-ffast-math/m-p/1019686#M107863</guid>
      <dc:creator>Edgardo_Doerner</dc:creator>
      <dc:date>2014-08-10T02:00:08Z</dc:date>
    </item>
  </channel>
</rss>

