- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Ihave an annoying, but admittedly not critical, issue with the Compaq Visual Fortran compiler.
When the compiler is compiling my project, it often has to loop back and re-compile files that have already been compiled earlier in this compilation. Also, once the exe has been created, if I then compile the project again straight away (i.e. without making any code changes), it re-compiles a load of files again. I sometimes have to compile the project 4 or 5 times before CVF seems to accept that the exe contains the latest compiled files. I have noticed that this problem is worsening as Iconvert more and more of my codeto modules in my project.
Is there something I can do in my coding to help this problem or is it a compiler issue? It means a full compilation is taking at least twice as long as I would have thought it should do.
Any ideas anyone?
Link Copied
2 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Do the modules depend on each other?
Ive had a similar problem: module a used module b. When I compiled the code, the compiler compiled module a before b. Since b wasnt compiled, a wasnt compiled too. And so every subroutine that uses a wont workuntil b was compiled. In the second run a comiled and the other subroutines too.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Basically, it's a compiler issue (more precisely, the issue of dependency analyser component integrated within Visual Studio). It is very quirky.
Semi-practical quick solution: you can interrupt the compilation (Ctrl+Break) after a number (determined empirically) of "low-level" modules has been compiled. Then hit F7 again (and repeat the process if necessary).
If I recall correctly, the dependency analyser has a limit of 3 depth levels. That means that:
Some CVF document (can't find it right now) recommended even moving "low-level" modules into a static library, and making the rest dependent on that library (plus, adjusting module/INCLUDE paths).
All of those are workarounds rather than real solutions -- but, basically, that's the state of affairs.
Semi-practical quick solution: you can interrupt the compilation (Ctrl+Break) after a number (determined empirically) of "low-level" modules has been compiled. Then hit F7 again (and repeat the process if necessary).
If I recall correctly, the dependency analyser has a limit of 3 depth levels. That means that:
will always be rebuilt twice if you change anything in m1. If you reduce the depth dependency tree, you will get better results.
module m1
module m2
use m1
end module m2
module m3
use m2
end module m3
module m4
use m3
end module m4
Some CVF document (can't find it right now) recommended even moving "low-level" modules into a static library, and making the rest dependent on that library (plus, adjusting module/INCLUDE paths).
All of those are workarounds rather than real solutions -- but, basically, that's the state of affairs.

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