(j3.2006) Compilation cascades
Bill Long
longb
Wed Aug 27 14:09:36 EDT 2008
Van Snyder wrote:
> Van Snyder wrote:
>
>
>> We compare .mod files to avoid compilation cascades.
>>
>> I noticed that if I add a PRINT statement to a module procedure, several
>> processors produce a different .mod file.
>>
>> This seems a bit bizarre. Is it really necessary?
>>
>> Some processors put a time stamp in the .mod file, but we've figured out
>> how to get around that.
>>
>
> Robert Corbett commented
>
> ! Some compilers put representations of the code for module procedures
> ! in the .mod files they generate. This allows inlining module
> ! procedures, which are often short. It is not necessary, but it can
> ! be a big performance advantage. Of course, if you use such a compiler,
> ! the compilation cascades are pretty much necessary for correct
> ! operation. If a module procedure that has been inlined has been
> ! modified, all files that include procedure references that
> ! reference one of the module procedures must be recompiled.
>
> That would explain why the .mod file would be different no matter what
> change I make. Why would the .mod file be different only if I inserted
> a PRINT statement (or deleted them all)?
>
>
Just a guess (by default we don't create .mod files), but the .mod file
might include the names of all the external symbols referenced. A PRINT
statement will compile into a call to an external library procedure.
Cheers,
Bill
--
Bill Long longb at cray.com
Fortran Technical Support & voice: 651-605-9024
Bioinformatics Software Development fax: 651-605-9142
Cray Inc., 1340 Mendota Heights Rd., Mendota Heights, MN, 55120
More information about the J3
mailing list