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

Optimization problem

v_koch
Beginner
412 Views
Hi,

compiling the attached code (<50 lines) with -O0 gives
ifort -O0 test.f
a.out
d=1.00000000000000
while -O1 breaks it and gives different results with each run.
ifort -O1 test.f
a.out
d= 6.953301764193981E-310
a.out
d= 6.953263450359657E-310
The input used is
cat input
1. 0. 0.
-1. 0. 0.

All this is on a Core2Quad, Suse 10.2 (64bit) using ifort Version 10.1 Build 20070913 Package ID: l_fc_p_10.1.008

I think the code is valid Fortran90.
Any ideas on what might be the problem will be greatly appreciated.

Thanks
Volker
0 Kudos
1 Reply
TimP
Honored Contributor III
412 Views
I see, on my SuSE 10.3 32-bit installation, it works again at -O2 (default), but fails, as you said, at -O1. I agree that -O1 is an important option level. I assume this example is cut down from a meaningful case, so you should submit a problem report on premier.intel.com.
0 Kudos
Reply