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

porting from power station(4) to intel fortran compiler (11)

cvnravi
Beginner
617 Views
Hi,

What are the necessary conditions i need to takecare while porting the fortran code from power station to fortran compiler(2003)?

What I observed is, In power station all the variables treat as global variables(even local variables also). where as in intel fortran(2003) they have separate scope for local and global. So I need to make all local variables to gloabal. Is there any option(from properties) to make all local variables to global in fortran 2003. Because there are hundered of variables in my code. Instead of assigning all local variables to global(means in COMMON block), can anybody suggest a good solution for it?

Apart from this shall I need to takecare any other issues while porting code from powerstation to intel fortran compiler(11/2003)?

Thanks in advance.
0 Kudos
4 Replies
TimP
Honored Contributor III
617 Views
This idea of making variables global doesn't make sense. If you depend on SAVE status of local variables, you could put a wholesale SAVE in each subroutine (SAVE with no variables specified applies to all locals). Before you do that, you might try stricter syntax checking: /Qdiag-enable:sc for pre-compilation checking, and /check for run-time checking, to see if you can uncover errors.
The /fpscomp options are meant to mimic the behavior of powerstation where it is different from normal Fortran.
0 Kudos
Steven_L_Intel1
Employee
617 Views

I suspect that you mean static and non-static rather than global and local. If your program incorrectly assumes that routine local variables are static, without having named them in a SAVE statement, then you could run into problems. The /Qsave option (or in Visual Studio, Fortran > Data > Local variable storage > All variables SAVE) will force all local variables to be implied SAVE. Ideally, you should identify those variables which need to have values preserved and name them in SAVE statements.

You may want to also look at the /fpscomp options if other behaviors are an issue.
0 Kudos
cvnravi
Beginner
617 Views

I suspect that you mean static and non-static rather than global and local. If your program incorrectly assumes that routine local variables are static, without having named them in a SAVE statement, then you could run into problems. The /Qsave option (or in Visual Studio, Fortran > Data > Local variable storage > All variables SAVE) will force all local variables to be implied SAVE. Ideally, you should identify those variables which need to have values preserved and name them in SAVE statements.

You may want to also look at the /fpscomp options if other behaviors are an issue.


I am already using "All Variables SAVE" option from intel compiler, still local/non-static variables are not holding data from one subroutine to other.
0 Kudos
Steven_L_Intel1
Employee
617 Views
Please show us a small (if possible) but complete test case that demonstrates the problem.
0 Kudos
Reply