optimization problem with 3.2.1 Fortran

Tim Prince timothyprince@sbcglobal.net
Mon Jan 27 08:36:00 GMT 2003


On Sunday 26 January 2003 19:33, Peter Morgan wrote:

>
> We are seeing an increased fequency of computational differences between
> our benchmark Solaris systems and the 686 systems particulary those that
> have installed Reh Hat 8.0 with GNU 3.2.1. The problem doesnt appear to be
> present in the older 3.05 GNU systems.
Have you followed the hints you will find in 'info g77' ?  Following that, 
you may find more relevant suggestions on comp.lang.fortran archives than by 
making what might appear to be a "loose cannon" accusation of bugginess. 
>
> We usually resolve these difference by down grading the level of
> optimozation from -O3 to -O. In the areas that we have had to do this
> recently we have not lost too much performance but there is the work that a
> major CPU bound routine will soon be effected.
As -O3 may not be an appropriate option for you, don't assume that -O must be 
slower.  Note that -O2 is the same as '-O3 -fno-inline-functions.'  gprof 
profiling may be an effective way to determine which files are in fact 
"optimized" by each selection of options.
Assuming that you are running on a P4-compatible system,  -march=pentium4 
-mfpmath=sse will invoke the SSE2 instruction set, which behaves much the 
same as Sun instructions, as well as generally running faster than x87 code.
If you are running on a P-III compatible system, invoking -march=pentium3 
-mfpmath=sse and setting 53-bit precision mode (as commercial Windows 
compilers do) should accomplish a similar result.

I take it that you aren't using the same g77 version on Solaris; doing so 
could be an important step.
>
> I would appreciate comments on where to look and what tracing/tracking we
> might employ to understand these problems more.
If you haven't done so, employ the options selectively, to help isolate which 
code segments are dependent on the options, and clarify the issues.
>
> I am willing to provide detailed info on any of the examples that I have.
>
That would be more likely to elicit useful response, particularly if a 
more suitable NG were chosen (c.l.f or help-gcc).

-- 
Tim Prince



More information about the Gcc-bugs mailing list