fab icon indicating copy to clipboard operation
fab copied to clipboard

IFort module file changes even though API hasn't

Open MatthewHambley opened this issue 2 years ago • 3 comments

IFort regenerates the module file every time it is invoked even if the interface which it represents has not. Since the file includes a time stamp this means that from Fab's point of view the file changes with every compile. This will kick off a rebuild cascade.

To be clear, Intel considers this correct behaviour although other compiler vendors and certainly this user disagree. That means this behaviour will not be changed. The new IFX compiler also behaves this way.

It may be possible to work around this behaviour by zeroing out the timestamp after compilation.

See https://stackoverflow.com/questions/20421163/why-mod-files-differ-after-every-time-i-compile-a-f-file

MatthewHambley avatar Jun 08 '23 12:06 MatthewHambley

One potential solution is to zero out the timestamp in the module file after it has been built. This will mean that the module files don't change their content if only the timestamp has changed.

The potential wrinkle is if this interferes with subsequent compilation or linking. If that is the case then something more elaborate involving re-instating the previous timestamp will be needed.

MatthewHambley avatar Jun 08 '23 13:06 MatthewHambley

I discussed this issue also in #289 - my suggestion there is not to use the hash of a .mod and .o file at all, instead use the source code, compiler, flags (etc) information - i.e. basically the hash that is used in naming the .mod and .o file

hiker avatar Mar 14 '24 09:03 hiker