Community
cancel
Showing results for 
Search instead for 
Did you mean: 
116 Views

/fp:strict flushes subnormals to zero

I have tested the C+ compiler 2016 Update 2.

As it turned out, it flushes subnormal numbers to zero if /fp:strict model is chosen (automatically). Even though "Flush Denormal Results to Zero " is set to "No". 

Is it intended behavior?  (Previous versions was working differently, if I am correct).

 

 

0 Kudos
8 Replies
TimP
Black Belt
116 Views

I'm not seeing this problem, e.g. with the classic "enquire" program http://homepages.cwi.nl/~steven/enquire/enquire.c, running on Ultrabook.

It hangs (in the double data type tests) when compiled without options, or with -Qprotect-parens -Qftz-, but gives identical float.h (and shows gradual underflow) if compiled with -debug or -fp:source or -fp:strict.q.  -fp:strict -Qftz changes it to abrupt underflow.

-Qlong-double doesn't appear to work.

Gabriele_J_Intel
Employee
116 Views

Hello,

Denormalized numbers should not be flushed to zero if -no-ftz is set for the main program, provided that nothing in the source code or command line overrides it. Compiling just a subroutine with -no-ftz makes no difference; it is only effective for the main program. Do you have a test case you can share?

BTW: A good article on many of these issues is here: https://software.intel.com/sites/default/files/managed/9d/20/FP_Consistency_300715.pdf

Gabriele

 

116 Views

Test project is in attachment, the code itself is just few lines.

Now "Flush Denormal Results to Zero" is set to "No" with /fp:strict. Denormals are flushed to zero. 

Environment: Win7 x64, MSVC2015 U1, XE 2016 U2.

Would appreciate any further information.

 

 

 

 

 

 

116 Views

Would appreciate if somebody would look on this thread too: https://software.intel.com/en-us/forums/intel-c-compiler/topic/605854#comment-1863059

The "internal error: 04010002_15114" is now localized (related to __assume), can be reproduced and hopefully fixed. Thank you very much.

TimP
Black Belt
116 Views

I have the same ICL and Visual Studio running on Win8.1.

When I build on command line icl -fp:strict msvc2015u1.cpp I don't see the problem reported (appears to have /Qftz- by default).

If I open your .sln  and click on build, it fails to build. I would probably have to start a new solution from scratch.  I'm not an expert on moving .sln among platforms.

116 Views

@"If I open your .sln  and click on build, it fails to build"

Interesting. What is the error? This is just simplest project I created to demonstrate the issue - no dependencies, etc.

TimP
Black Belt
116 Views

1>------ Rebuild All started: Project: msvc2015u1, Configuration: Release x64 ------
1>TRACKER : : error TRK0005: Failed to locate: "icl.exe". The system cannot find the file specified.
1>
1>
========== Rebuild All: 0 succeeded, 1 failed, 0 skipped ==========

 

116 Views

Probably some path variables are hard-coded. I installed 2015 yesterday together with XE2016.

Reply