Optimization Errors

Optimization Errors

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?

4 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

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 - Intel Developer Support

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.

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.

Leave a Comment

Please sign in to add a comment. Not a member? Join today