Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
Announcements
FPGA community forums and blogs on community.intel.com are migrating to the new Altera Community and are read-only. For urgent support needs during this transition, please visit the FPGA Design Resources page or contact an Altera Authorized Distributor.

More on Modules

acar
Beginner
669 Views
Following recent discussions about removing redundant modules I thought I'd try the following with the idea that rather than going through each subroutine and commenting out each USE statement and then recompile to establish whether the module was actually used, I could remove each module from the application and see where the compiler complained about needing a parameter from the module (I thought I was probably being a bit optimistic to make this work for me) :
I added an empty module construct to one our my subroutines:
MODULE BORIS
END MODULE
I added a USE BORIS statement in a subroutine somewhere else in my application and built the solution. No problem!
I removed the module BORIS from my application and built the solution. To my surprise there was no problem!!
I then changed the name of the USE statement and built the solution. This time I got error 7002: error in opening the compiled module file.
This doesn't seem to me to be logical? Any views?
0 Kudos
2 Replies
GVautier
New Contributor III
669 Views
Hello

I think that when you remove a module from the solution, the corresponding .mod file is not deleted from the build directory (debug or release). To be sure, clean your solution after removing elements from the solution or delete .obj and .mod files manually.

0 Kudos
acar
Beginner
669 Views
I think that's correct - I was aware but had forgotten about that little gem. Should not the compiler guard against that though? The clean option, if I recall correctly, simply deletes all the files from the build directory so if the application is large then it is a little radical and can lead to unneccesary recompilation.
0 Kudos
Reply