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

Optimization Errors

fpl
Beginner
596 Views
When I change the optimziation level from 'full' to 'maximum', code that assigns logical variables with a true of false value are being randomly ignored. This is affecting the proper operations of my program. I am beginning to question the reliabliity of Compaq Visual Fortran Version 6.5. Why is this happening?
0 Kudos
3 Replies
Steven_L_Intel1
Employee
596 Views
It's impossible to say why it's happening without seeing an example that reproduces the problem. It may be an optimizer error, or the compiler may have discovered that the assignments weren't necessary.

First, I suggest you download the free upgrades to version 6.6 and then 6.6A, then rebuild. If the problem persists, send a complete example (a ZIP file of your project is preferred) to vf-support@compaq.com, and we'll take a look.

Steve
0 Kudos
fpl
Beginner
596 Views
I have installed version 6.6 and 6.6a and rebuilt my project. The problem still persists. I will create an example that reproduces the problem and send it to you for your review.
0 Kudos
fpl
Beginner
596 Views
Here is the sample problem that demonstrates the optimizer problem.

I have extracted one of the problem sections from our pipeline hydraulics program to create this sample problem.

In the this sample program, if all the feed variable in line 51 have non-zero values, the wall thickness WLTHP is calculated (line 54) and the logical pipe_sec variable is set to a true value (line 55). With the pipe_sec variable set to true, the program prints out the feed variables and the associated wall thickness results.

For this sample program only, the feed variables have been deliberately initialized with non-zero values to force the calculation of wall thickness and print out results.

When the optimizer is set to 'full', the sample program works properly.

When the optimizer is set to 'maximum', it does not work properly. The code that assigns the logical variable pipe_spec with a true value is not executed (line 55) and the normal print out does not occur. However, the line above this one (line 54) calculates wall thickness properly for both optimizer settings.

Our program contains many logical variables structured in this manner and many of them fail to get the proper assignment when the optimizer is set to maximum.

Please help.
0 Kudos
Reply