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

*.f : variable inf

Mike896
Beginner
728 Views

Dear All,

I have an old package of files in *.f.

In compiling, I have set

1. "Check Array bounds" into "No",

2. "Stack Reserve Size" and "Stack Commit Size" into 2000000 (otherwise stack overflow)

Then it runs much slower than CVF (in same Debug mode).

And I compare the results. Almost all the results are the same, except one variable which goes to INF (I debug it both from IVF and CVF). CVF doesn't have this result (this variable is 0.000).

What is the possible reason?

Mike

0 Kudos
5 Replies
Steven_L_Intel1
Employee
728 Views

Set also Local Variable Storage > All variables SAVE

0 Kudos
Mike896
Beginner
728 Views

Set also Local Variable Storage > All variables SAVE

Yes. It works. The INF goes to 0.000 which is correct.

I am so uncertain about this.

Do I need to set this all the time? or just *.f

Thank you very much indeed.

ps. Why is it much slower than CVF (all in Debug mode)? How to set this?

I notice that CPU runs only 25%. My CPU is QuadCore.

Mike

0 Kudos
TimP
Honored Contributor III
728 Views

"All Variables SAVE" is a work-around which may save you from failure to initialize data. It is incompatible with threading, which you would require in order to use more than one of your 4 cores. No conclusion about performance is possible when you have uninitialized variables and range violations. So, the better solution is to correct the errors in your program.

0 Kudos
Steven_L_Intel1
Employee
728 Views

The "All variables SAVE" is a setting which makes the Intel compiler behave more like CVF. As Tim says, it makes up for a coding error in your program where you fail to initialize variables or properly declare them as SAVE.

A single-threaded application will use only one of the four cores. You have to add parallel programming to your code in order to take advantage of multiple cores. There is a large section of the Intel documentation on that.

A debug configuration is unoptimized. Use a Release configuration when you want best performance.

0 Kudos
Mike896
Beginner
728 Views

The "All variables SAVE" is a setting which makes the Intel compiler behave more like CVF. As Tim says, it makes up for a coding error in your program where you fail to initialize variables or properly declare them as SAVE.

A single-threaded application will use only one of the four cores. You have to add parallel programming to your code in order to take advantage of multiple cores. There is a large section of the Intel documentation on that.

A debug configuration is unoptimized. Use a Release configuration when you want best performance.

Thank you very much for your reply.

It is of great help.

Mike

0 Kudos
Reply