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

Compiling an an OpenMP-included source code with -FAST switch

Jack_S_
Beginner
1,008 Views

Hi all,

I usually compile my Fortran-90 source code (which include OepnMP clauses) with :

ifort -g -debug extended -O3 -xHost -openmp -openmp-simd -openmp-report -ipo -fpconstant -fp-model strict -fpe0 -traceback -ftrapuv'

When I tried to compile with -FAST the code aborted. Now, according to the composer-14.0 documentation the difference is in adding the -no-prec-div AND -static options. I think -static should not lead to such an error. I didn't find anything about -no-prec-div . Any kind suggestions of how to proceed or getting the equivalent optimization of (-fast) in a different way ?

Thanks very much,

Jack.

0 Kudos
4 Replies
Steven_L_Intel1
Employee
1,008 Views

The documentation lists all of the switches that -fast groups together. You can specify them individually. What do you mean by "the code aborted"? -static just specifies static linking.

0 Kudos
Jack_S_
Beginner
1,008 Views

Thanks Steve.

When I run using IDB I get : ''Program received signal SIGSEGV in ?? ()'' right after entering the module consisting the OpenMP clauses.

When I run it regularly through the terminal it runs, but then it gives me different numbers in debug printing positioned in a serial section within the OpenMP code. So I guess my question transforms to - what is the interaction between the -fast switch and the -fp-model strict (if any) ? Is there a way to preserve 12 digits of a double precision number between runs with/without -fast switch ?

Thank you,

Jack.   

0 Kudos
Steven_L_Intel1
Employee
1,008 Views

On Linux, specifying -fast is equivalent to -ipo, -O3, -no-prec-div, -static, -fp-model fast=2, and -xHost

I suggest that instead of -fast, you simply provide only those options you want. Note that -no-prec-div enables replacing divides with multiply by reciprocal, which might give slightly different answers.

Take a look at the attached presentation for more thoughts on numeric reproducibility options. Depending on your application's complexity, keeping a full 12 digits of double precision (typically good to 15) could be problematic.

0 Kudos
Jack_S_
Beginner
1,008 Views

Steve, 

Thanks for your time and answer. Its always nice and educating to read your answers.

Jack .

0 Kudos
Reply