Intel® C++ Compiler
Community support and assistance for creating C++ code that runs on platforms based on Intel® processors.

/fp:strict flushes subnormals to zero

Pavel_Holoborodko__A
648 Views

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
Honored Contributor III
648 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.

0 Kudos
Gabriele_J_Intel
Employee
648 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

 

0 Kudos
Pavel_Holoborodko__A
648 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.

 

 

 

 

 

 

0 Kudos
Pavel_Holoborodko__A
648 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.

0 Kudos
TimP
Honored Contributor III
648 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.

0 Kudos
Pavel_Holoborodko__A
648 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.

0 Kudos
TimP
Honored Contributor III
648 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 ==========

 

0 Kudos
Pavel_Holoborodko__A
648 Views

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

0 Kudos
Reply