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

question about .mod checksum

lcoul
Beginner
835 Views
I presently test a code builder using file checksums rather than file time stamps to decide to reconstruct a target file.

But I have observed that recompiling an unchanged source file generates a .mod file with a new MD5 sum. On the contrary, the object file keeps the same sum.

I was expecting a completely different behavior, i.e. a .mod file which sum does not change even if one updates slightly the corresponding source file, but without modifying its signature (same arguments for public routines and same public variables).

What is the reason of that strange feature ?
0 Kudos
4 Replies
mecej4
Honored Contributor III
835 Views
I believe that the compiler puts some sort of time-stamp into the .mod file, since I have on occasion seen a warning during compilation of one module that another module that it depends upon needs recompilation.

For use with Unix Make, it would be useful to suppress updating of .mod files when the changes to a source file are such that only the implementation changes while interfaces remain unchanged. Something along these lines was discussed earlier, in

http://software.intel.com/en-us/forums/showthread.php?t=74795
0 Kudos
lcoul
Beginner
835 Views
Suppressing the .mod update is not perfect, especially if the .mod file has been declared as a target of the source file : Make does not know how to manage that and, at the next run, it will see an anomaly (the .mod file is older than the source file) and will recompile the source file.

I would prefer that ifort does not put any date or hour information in the .mod

Is it possible to change that behavior ?

0 Kudos
Steven_L_Intel1
Employee
835 Views
There is no option to suppress the timestamp.
0 Kudos
lcoul
Beginner
835 Views
OK. But why putting a timestamp in the module file ? I don't understand the reason. This time stamp implies many useless compilations which are time consummming with very large applications.

Is it possible to ask the developers for deleting the time stamp from the .mod file ?
0 Kudos
Reply