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

Any known compiler differences between CVF and linux g77?

tchill
Beginner
924 Views
Hi,
I would like to know of any known compiler compatability problems, between CVF6 and linux g77 compilers,which could result in precision(esk) problems. I have been trying to track down a difference in program output when compiling with CVF. Using the same code, I get the same output with both CVF and a SUN f77 compiler (64bt machine, defaulting to 32-bit compilation), however, I get a diffent result when compiling with linux g77, not sure of the specifics of the compiler as its not in the 'man'.
Differences seem to occur at around the E-7 accuracy range.
Any suggestions would be appreciated, cheers for your help.
(p.s. still a bit green around the ears when it comes to fortran coding)
0 Kudos
3 Replies
TimP
Honored Contributor III
924 Views
Insignificant differences in the low order 2 or 3 bits are to be expected between compilers, particularly if you don't use consistent options. Which practical options you have available depend on your version of g77 and CPU. Default options aren't consistent between CVF and g77, so you do need to study documentation.
0 Kudos
tchill
Beginner
924 Views
Hi,
Cheers for the pointer, tim18, found out that the compiler differences were caused by the -fno-automatic option, seems the default settings differed. (see below)
-fno-automatic
Treat each program unit as if the "SAVE" statement was specified
for every local variable and array referenced in it. Does not
affect common blocks. (Some Fortran compilers provide this option
under the name -static.)

Iwould actually like to get the CVF compiled code generating the both outputs, (for comparision purposes at a later date).I cannot find the appropriate compiler option in CVF. I think I could achieve the same effect by using the STATIC and AUTOMATIC declerations in the code, but would prefer not to do this. Do you know of the parallel CVF option to -fno-automatic?
Cheers for any help, T
0 Kudos
Steven_L_Intel1
Employee
924 Views
That would be /static, but it is the default.
0 Kudos
Reply