<?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 Intel compiler 17 documentation DAZ in Intel® Fortran Compiler</title>
    <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Intel-compiler-17-documentation-DAZ/m-p/1117553#M130859</link>
    <description>&lt;P&gt;I was enjoying reading the Intel 17 Fortran documentation when I read this page:https://software.intel.com/en-us/node/678362​ about setting the FTZ and DAZ flags.&amp;nbsp;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;First this page&amp;nbsp;has a lovely table to explain the FTZ and the DAZ compiler flags.&amp;nbsp;&amp;nbsp; So I go to Linux and load the module for the Intel 17 compilers and test out ifort with -ftz and -daz.&amp;nbsp;&amp;nbsp; The ftz flag works, but the compiler reports that it doesn't recognize the -daz option when I try to use that compiler flag.&amp;nbsp;&amp;nbsp; So I go back to the compiler option page and look for some flag related to DAZ&amp;nbsp; the alphabetical list of compiler flags (https://software.intel.com/en-us/node/677967​).&amp;nbsp; I can not find anything related to DAZ.&amp;nbsp;&amp;nbsp; So what is this discussion on the first page about ftz and daz flags?&amp;nbsp; What is the actual compiler flag related to DAZ that is shown in the table.&amp;nbsp;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;Second, the page describing the ftz flag &lt;A href="https://software.intel.com/en-us/node/678362​" target="_blank"&gt;https://software.intel.com/en-us/node/678362​&lt;/A&gt; references a negative form of the ftz flag without specifying the syntax or spelling of the negative ftz flag.&amp;nbsp; I looked for the syntax in the alphabetical list of compiler options (https://software.intel.com/en-us/node/677967​) to look for the syntax of the negative form.&amp;nbsp; I could not find it there either.&amp;nbsp; Eventually I found the syntax defined in the Intel 16 Fortran compiler documentation (-no-ftz).&amp;nbsp; Why not make the Intel 17 fortran compiler as readable as the 16 compiler documentation?&amp;nbsp;&lt;/P&gt;

&lt;P&gt;Thank you.&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 16 Dec 2016 19:54:30 GMT</pubDate>
    <dc:creator>David_M_17</dc:creator>
    <dc:date>2016-12-16T19:54:30Z</dc:date>
    <item>
      <title>Intel compiler 17 documentation DAZ</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Intel-compiler-17-documentation-DAZ/m-p/1117553#M130859</link>
      <description>&lt;P&gt;I was enjoying reading the Intel 17 Fortran documentation when I read this page:https://software.intel.com/en-us/node/678362​ about setting the FTZ and DAZ flags.&amp;nbsp;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;First this page&amp;nbsp;has a lovely table to explain the FTZ and the DAZ compiler flags.&amp;nbsp;&amp;nbsp; So I go to Linux and load the module for the Intel 17 compilers and test out ifort with -ftz and -daz.&amp;nbsp;&amp;nbsp; The ftz flag works, but the compiler reports that it doesn't recognize the -daz option when I try to use that compiler flag.&amp;nbsp;&amp;nbsp; So I go back to the compiler option page and look for some flag related to DAZ&amp;nbsp; the alphabetical list of compiler flags (https://software.intel.com/en-us/node/677967​).&amp;nbsp; I can not find anything related to DAZ.&amp;nbsp;&amp;nbsp; So what is this discussion on the first page about ftz and daz flags?&amp;nbsp; What is the actual compiler flag related to DAZ that is shown in the table.&amp;nbsp;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;Second, the page describing the ftz flag &lt;A href="https://software.intel.com/en-us/node/678362​" target="_blank"&gt;https://software.intel.com/en-us/node/678362​&lt;/A&gt; references a negative form of the ftz flag without specifying the syntax or spelling of the negative ftz flag.&amp;nbsp; I looked for the syntax in the alphabetical list of compiler options (https://software.intel.com/en-us/node/677967​) to look for the syntax of the negative form.&amp;nbsp; I could not find it there either.&amp;nbsp; Eventually I found the syntax defined in the Intel 16 Fortran compiler documentation (-no-ftz).&amp;nbsp; Why not make the Intel 17 fortran compiler as readable as the 16 compiler documentation?&amp;nbsp;&lt;/P&gt;

&lt;P&gt;Thank you.&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 16 Dec 2016 19:54:30 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Intel-compiler-17-documentation-DAZ/m-p/1117553#M130859</guid>
      <dc:creator>David_M_17</dc:creator>
      <dc:date>2016-12-16T19:54:30Z</dc:date>
    </item>
    <item>
      <title>Sorry for the confusion. The</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Intel-compiler-17-documentation-DAZ/m-p/1117554#M130860</link>
      <description>&lt;P&gt;Sorry for the confusion. The discussion on Setting the FTZ/DAZ flags is not about compiler “flags” (i.e. options or switches – depending on your preference) but rather in this context “flags” is synonymous with “bits” within the MXSCR register. Both FTZ and DAZ are influenced by -ftz option as discussed within the topic.&lt;/P&gt;

&lt;P&gt;I will notify the Tech writers about the missing negative form of the option within the Setting the FTZ/DAZ topic. It would help to include.&amp;nbsp;It does appear on the -ftz option page in 17.0 (&lt;A href="https://software.intel.com/en-us/node/678138"&gt;https://software.intel.com/en-us/node/678138&lt;/A&gt;). The negative forms of options are not included Alphabetical listing.&lt;/P&gt;

&lt;P&gt;Hope that helps.&lt;/P&gt;</description>
      <pubDate>Sat, 17 Dec 2016 01:09:34 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Intel-compiler-17-documentation-DAZ/m-p/1117554#M130860</guid>
      <dc:creator>Kevin_D_Intel</dc:creator>
      <dc:date>2016-12-17T01:09:34Z</dc:date>
    </item>
    <item>
      <title>Be careful with -ftz,</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Intel-compiler-17-documentation-DAZ/m-p/1117555#M130861</link>
      <description>&lt;P&gt;Be careful with &lt;STRONG&gt;-ftz&lt;/STRONG&gt;, especially if you use library routines that do not expect flush-to-zero and denormals-are-zero mode to be selected in the MXCSR! Note also that catch-all flags such as &lt;STRONG&gt;-fast&lt;/STRONG&gt; can set FTZ and DAX on. Misuse of &lt;STRONG&gt;-ftz&lt;/STRONG&gt; can introduce bugs that are very hard to catch. See this cautionary tale: &lt;A href="https://forums.roguewave.com/showthread.php?1427-Strange-bug-(-)-in-FNL7-routine-IVOAM&amp;amp;p=4077&amp;amp;viewfull=1#post4077" name="IMSL IVOAM Bug"&gt;https://forums.roguewave.com/showthread.php?1427-Strange-bug-(-)-in-FNL7-routine-IVOAM&amp;amp;p=4077&amp;amp;viewfull=1#post4077&lt;/A&gt;&amp;nbsp;.&lt;/P&gt;</description>
      <pubDate>Sat, 17 Dec 2016 14:43:00 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Intel-compiler-17-documentation-DAZ/m-p/1117555#M130861</guid>
      <dc:creator>mecej4</dc:creator>
      <dc:date>2016-12-17T14:43:00Z</dc:date>
    </item>
    <item>
      <title>Intel compilers use -ftz (on</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Intel-compiler-17-documentation-DAZ/m-p/1117556#M130862</link>
      <description>&lt;P&gt;Intel compilers use -ftz (on by default) only in the initialization compiled into main program. The setting has no effect on subroutines.&amp;nbsp; You can over-ride with USE ieee_arithmetic subroutine ieee_set_underflow_mode(), so that would be the most legitimate way in which the setting could be changed later (besides the SSE intrinsic support by most C/C++ compilers).&amp;nbsp; You might note that IEEE_arithmetic is not guaranteed to work unless -fp-model strict is set, but other settings will not prevent ieee_set_underflow_mode from taking control.&lt;/P&gt;

&lt;P&gt;Beginning with Intel Sandy Bridge CPUs, the performance implications of -no-ftz were corrected as far as addition (but not multiplication) is concerned, so there is something to be said for making a practice of using that setting, at least for host CPUs and targets which use glibc or newlib.&amp;nbsp;&amp;nbsp; I used to take care to set abrupt underflow for gcc/gfortran when comparing performance with Intel compilers, but don't find the need for that on recent CPUs.&lt;/P&gt;

&lt;P&gt;This page:&lt;/P&gt;

&lt;P&gt;&lt;A href="https://software.intel.com/en-us/node/638225" target="_blank"&gt;https://software.intel.com/en-us/node/638225&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;indicates that MIC KNL (like KNC) is not designed to perform well with setting other than -ftz.&lt;/P&gt;

&lt;P&gt;Contrary to the URL mentioned by mecej4, the Microsoft math libraries used by ifort and icl expect abrupt underflow setting and can't be relied upon with sub-normals.&amp;nbsp; It seems a dilemma if IMSL expects a different setting from Microsoft libraries.&lt;/P&gt;

&lt;P&gt;In my experience, it is difficult to find a performance implication of DAZ setting (assuming that FTZ is set for a CPU which needs it).&amp;nbsp; It would apply only to data which are initialized by constants or read from a data file or external application, if the current application is set so that it doesn't generate sub-normals.&lt;/P&gt;

&lt;P&gt;As far as ifort 17 documentation of DAZ/FTZ is concerned, there is still a page in the html docs entitled "Setting the FTZ and &lt;SPAN style="background-color:#FFFF00;color:#222222;"&gt;DAZ&lt;/SPAN&gt; Flags"&lt;/P&gt;</description>
      <pubDate>Sat, 17 Dec 2016 17:55:00 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Intel-compiler-17-documentation-DAZ/m-p/1117556#M130862</guid>
      <dc:creator>TimP</dc:creator>
      <dc:date>2016-12-17T17:55:00Z</dc:date>
    </item>
    <item>
      <title>Thanks all for the helpful</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Intel-compiler-17-documentation-DAZ/m-p/1117557#M130863</link>
      <description>&lt;P&gt;Thanks all for the helpful comments.&amp;nbsp;&amp;nbsp; I was not familiar with calling register settings flags so I am better enlightened now.&amp;nbsp; I hope the compiler documentation is improved so I am not guessing at format (no:ftz, ftz:no, no-ftz, ftz-no, . . .).&amp;nbsp;&amp;nbsp; I was not previously aware (or forgot) about assists for KNL with denormals.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; I was looking into this for a colleague.&amp;nbsp;&amp;nbsp; I wrote some code creates denormals; I compiled this with and without ftz and it ran as expected each time.&amp;nbsp;&amp;nbsp; My colleague&amp;nbsp;reports with his Fortran code he gets a message like this shown below - which seems to indicate to me that he is using x87 instructions instead of scalar SIMD instructions.&amp;nbsp;&amp;nbsp; I tried adding -m80387 to the compiler command for my sample code but I can not find any way to get&amp;nbsp;Fortran code to produce this message and he hasn't yet provided compiler&amp;nbsp;options.:&amp;nbsp;&lt;/P&gt;

&lt;P&gt;* &amp;nbsp;FE_DENORMALOPERAND&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; An Intel-specific flag that is raised when an operand to a floating-point&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; arithmetic operation is denormal, or a single- or double-precision denormal&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; value is loaded on the x87 stack.&amp;nbsp; This flag is not raised by SSE&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; arithmetic when the DAZ control bit is set. &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; */&lt;BR /&gt;
	#define FE_DENORMALOPERAND &amp;nbsp;0x0002&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 19 Dec 2016 21:26:36 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Intel-compiler-17-documentation-DAZ/m-p/1117557#M130863</guid>
      <dc:creator>David_M_17</dc:creator>
      <dc:date>2016-12-19T21:26:36Z</dc:date>
    </item>
    <item>
      <title>There is a detailed write-up</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Intel-compiler-17-documentation-DAZ/m-p/1117558#M130864</link>
      <description>&lt;P&gt;Since the Intel 8080, possibly earlier, microprocessors have been provided with a FLAGS register, and special instructions to test individual flags and take short jumps depending on whether a flag was set or not. On the FPU, there are two sets of "flags": one set, the SW (status word) to display the machine state, and another, the CW (control word) to control the mode of operation (round/chop, interrupt on zero-divide, etc.).&lt;/P&gt;

&lt;P&gt;There is a detailed write-up on X87 flags (16-bit Control and Status Words) and the SSE MXCSR at&amp;nbsp;https://software.intel.com/en-us/articles/x87-and-sse-floating-point-assists-in-ia-32-flush-to-zero-ftz-and-denormals-are-zero-daz .&lt;/P&gt;

&lt;P&gt;This test program (which is not standard-conformant) demonstrates gradual underflow (when compiled with -ftz-) and abrupt underflow (when compiled with default options):&lt;/P&gt;

&lt;PRE class="brush:fortran;"&gt;program denorm
real x
integer i,ix
equivalence(ix,x)

x=1e-37
do i=1,10
   write(*,'(1x,Z8.8)')ix
   x=x*0.5
end do
end&lt;/PRE&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 20 Dec 2016 01:32:00 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Intel-compiler-17-documentation-DAZ/m-p/1117558#M130864</guid>
      <dc:creator>mecej4</dc:creator>
      <dc:date>2016-12-20T01:32:00Z</dc:date>
    </item>
  </channel>
</rss>

