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

ifort produces different binaries from the same source at two diffrent timepoints

smorifort
Beginner
286 Views
Hello,

I use ifort in conjunction with -fpp flag since there is some preprocessing in the code. The preprocessing directives are all of #ifndef #endif type, to include or exclude pieces of code according to my desires.

I have noticed that with -fpp, each time I compile the code I get a different executable. This was checked by using cmp compand on Linux.
Without preprocessing, the produced binaries are identical.

To be completely precise,I compare, of course, preprocessed to preprocessed instances, and the same for non-preprocessed.

What could be the reason for the differences, when the code, optimisation et al. is always the same?

The compiler version is 10.1, and it works on a Linux cluster (i don't have all the specific details for the platform, if requested i'll bother the cluster support guys)
0 Kudos
2 Replies
Ron_Green
Moderator
286 Views
Quoting - smorifort
Hello,

I use ifort in conjunction with -fpp flag since there is some preprocessing in the code. The preprocessing directives are all of #ifndef #endif type, to include or exclude pieces of code according to my desires.

I have noticed that with -fpp, each time I compile the code I get a different executable. This was checked by using cmp compand on Linux.
Without preprocessing, the produced binaries are identical.

To be completely precise,I compare, of course, preprocessed to preprocessed instances, and the same for non-preprocessed.

What could be the reason for the differences, when the code, optimisation et al. is always the same?

The compiler version is 10.1, and it works on a Linux cluster (i don't have all the specific details for the platform, if requested i'll bother the cluster support guys)

I have no idea. Dynamic library names are included in the header sections, if your LD_LIBRARY_PATH changes OR if the sys admins upgraded some system libraries or gcc, this could account for the changes.

You could try using od -ax on both and find the differences.

ron
0 Kudos
jimdempseyatthecove
Honored Contributor III
286 Views

When you preprocess to .f90 source files, save files under different name/place, then preprocess to files again to .f90 source files, then compare the preprocessed files, do the files compare as equal?

What are your options relating to preprocessing?

Jim Dempsey
0 Kudos
Reply