Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
28603 Discussions

How to set FTZ and DAZ flag for ifc 7.1 ?

dfumento5
Beginner
676 Views
The ifc 7.1 manuals are no longer available. I can see how in ifort
version 8 how to set FTZ (-ftz) and the DAZ flag is set automatically for P3 and above.

There is no -ftz flag for ifc 7.1. Also how do you set the DAZ flag in ifc 7.1?

Thanks,
David
0 Kudos
4 Replies
TimP
Honored Contributor III
676 Views
The primary alternative to the command line option, which would set mxcsr in main(), is to use the setcsr() intrinsics from . A call to a simple gcc function would do. IIRC, there was no change in the way DAZ was handled between 7.1 and 8.0.
0 Kudos
dfumento5
Beginner
676 Views
Could you tell me the exact 'C' subroutine for setting the FTZ bit?

Thanks,
David
0 Kudos
TimP
Honored Contributor III
676 Views

e.g. Fortran code:

call setftz

...

C code:

#include

void setftz_(){

_MM_SET_FLUSH_ZERO_MODE (_MM_FLUSH_ZERO_ON);

}

While not standard C syntax, it is supported by current gcc, icc, and MSVC compilers, as well as (supposedly), by PGI C and Fortran compilers.

0 Kudos
dfumento
Beginner
676 Views
Thanks!
0 Kudos
Reply