- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am currently modifying a library of engineering component simulations to run in the Mathworks Simulink environment. These simulations were most previously compiled with the CVF 6.6 compiler. When compiling with the IF 9.0 compiler, one of the component codes crashed and burned. On debugging this large code, I found that some variables were not persistent with multiple entries into some of the subroutines. Addition of "SAVE" statements in each subroutine seemed to fix some of the problems. Has something changed between CVF6.6 and IF9.0 with regard to the default for saving variables between multiple entries into scoping units. If so, can the SAVE be set as a global compile attribute, or does it need to be set in each scoping unit? When I compare the help files on this subject in the two compilers, I don't see any difference.
mglickstein
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Intel Fortran does not apply default SAVE semantics to scalar variables. (It does to arrays.) You can compile with /Qsave to get implied SAVE for all appropriate variables.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks Steve,
I am compiling from Visual Studio 2003 GUI. Is there a way to set /Qsave, and compile from the graphic interface?
mglickstein
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Steve,
Thanks a million. That fixed the problem. I would be embarrassed to tell you how many days I spent chasing that problem.
Marv Glickstein
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Of course, I will also say that you really should use SAVE on variables you want saved.

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