- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
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.
Link Copied
4 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
The /fpscomp options are meant to mimic the behavior of powerstation where it is different from normal Fortran.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Quoting - Steve Lionel (Intel)
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Please show us a small (if possible) but complete test case that demonstrates the problem.

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page