- Marquer comme nouveau
- Marquer
- S'abonner
- Sourdine
- S'abonner au fil RSS
- Surligner
- Imprimer
- Signaler un contenu inapproprié
Hi,
trying to avoid a compilation cascade, I have been looking at how Intel Fortran generates .mod files. Searching in the internet, I thought that Intel Fortran would include a timestamp in the first few bytes of the .mod file, so that if I ignored those first bytes I could see whether the .mod definitions actually changed from one compilation to another. But this is not working as expected. For one of the files in our code I do:
[angelv@duna]$ h5pfc -O0 -fpp -c mancha_src/globals.F90
[angelv@duna]$ cp globals.mod globals.mod.backup
[angelv@duna]$ h5pfc -O0 -fpp -c mancha_src/globals.F90
[angelv@duna]$ cmp -l globals.mod globals.mod.backup
49 126 115
18684 122 337
[angelv@duna]$ h5pfc --version
ifort (IFORT) 15.0.2 20150121
Copyright (C) 1985-2015 Intel Corporation. All rights reserved.
[angelv@duna]$
So, those two .mod files, generated without modifying the source file at all differ in the byte 49 (OK, as expected due to the timestamp), but also in the byte 18684 (this is about 30% into the file).
Is there any way to avoid these changes in the .mod files except in some fixed position in the file?
As another example, for the json_module.F90 file (available from http://jacobwilliams.github.io/json-fortran/sourcefile/json_module.f90.html), I get even more differences:
[angelv@duna]$ ifort -O0 -fpp -c mancha_src/json_module.F90
[angelv@duna]$ cp json_module.mod json_module.mod.backup
[angelv@duna]$ ifort -O0 -fpp -c mancha_src/json_module.F90
[angelv@duna]$ cmp -l json_module.mod json_module.mod.backup
49 224 217
28156 165 140
28364 165 140
28572 165 140
28780 165 140
28988 165 140
29548 165 140
29713 165 140
30626 165 140
[angelv@duna]$ ifort -V
Intel(R) Fortran Intel(R) 64 Compiler XE for applications running on Intel(R) 64, Version 15.0.2.164 Build 20150121
Copyright (C) 1985-2015 Intel Corporation. All rights reserved.
[angelv@duna]$
Thanks,
Ángel de Vicente
Is
- Balises:
- Intel® Fortran Compiler
Lien copié
- Marquer comme nouveau
- Marquer
- S'abonner
- Sourdine
- S'abonner au fil RSS
- Surligner
- Imprimer
- Signaler un contenu inapproprié
Hello,
after carefully dissecting the globals.F90 file above, I found that the following line was causing trouble:
PROCEDURE(deriv_sub), POINTER :: deriv => null()
setting it as
PROCEDURE(deriv_sub), POINTER :: deriv ! => null()
then the .mod files only have differences in the first 50 bytes, which I can ignore and avoid compilation cascades.
Cheers,
Ángel de Vicente
- Marquer comme nouveau
- Marquer
- S'abonner
- Sourdine
- S'abonner au fil RSS
- Surligner
- Imprimer
- Signaler un contenu inapproprié
We thought we had eliminated all such differences. Can you provide a small source that shows the problem?
- Marquer comme nouveau
- Marquer
- S'abonner
- Sourdine
- S'abonner au fil RSS
- Surligner
- Imprimer
- Signaler un contenu inapproprié
Hi Steve,
yes, the attached file is a minimal version that has the mentioned behaviour.
Thanks,
Ángel de Vicente
[angelv@duna angelv]$ ifort -V
Intel(R) Fortran Intel(R) 64 Compiler XE for applications running on Intel(R) 64, Version 15.0.2.164 Build 20150121
Copyright (C) 1985-2015 Intel Corporation. All rights reserved.
[angelv@duna angelv]$ ifort -c test.f90
[angelv@duna angelv]$ cp test.mod test.mod.backup
[angelv@duna angelv]$ ifort -c test.f90
[angelv@duna angelv]$ cmp -l test.mod test.mod.backup
49 172 164
4490 156 120
[angelv@duna angelv]$
- Marquer comme nouveau
- Marquer
- S'abonner
- Sourdine
- S'abonner au fil RSS
- Surligner
- Imprimer
- Signaler un contenu inapproprié
Thanks - escalated as issue DPD200410040. Curiously I couldn't reproduce a difference on Windows, but could on Linux.

- S'abonner au fil RSS
- Marquer le sujet comme nouveau
- Marquer le sujet comme lu
- Placer ce Sujet en tête de liste pour l'utilisateur actuel
- Marquer
- S'abonner
- Page imprimable