This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Performance loss from RedHat 7.0 to RedHat 9.0
- From: Jean-Marc Petit <petit at obs-besancon dot fr>
- To: gcc-help at gcc dot gnu dot org
- Date: Wed, 11 Feb 2004 10:19:31 +0100 (CET)
- Subject: Performance loss from RedHat 7.0 to RedHat 9.0
Hello,
I just noticed a strong decrease of efficiency in code produced by G77
when moving from the RedHat 7.0 version (can't recall the version, it's no
longer on my computer) to RedHat 9.0. In both cases, the program works
fine, and give the correct result. It has run with G77 on RH70 and RH90,
f2c on RH70, G77 on Suse 8.0, PGF77 (PGI's Fortran compiler) on Suse 8.0
and Intel Fortran 8.0 (ifc or now ifort) on RH90. G77 used to give an
efficient code that was running at speed comparable to commercial Fortran,
but on the RH90 release, it has slowed by almost a factor of 2.
Hardware: Athlon 1.0GHz, 512 MB RAM
RedHat 7.0:
compiler command: g77 -u -O3 -ffastmath -funroll-loops -m486 -o bench bench.f
result of the "time" command:
real 0m37.415s
user 0m36.890s
sys 0m0.000s
RedHat 9.0:
g77 -v gives: gcc version 3.2.2 20030222 (Red Hat Linux 3.2.2-5)
compiler command: g77 -u -O3 -fno-automatic -funroll-loops -malign-double
-march=athlon -ffast-math -o bench bench.f
(this is my best case)
result of the "time" comand:
real 1m1.855s
user 1m1.740s
sys 0m0.000s
Is that a known behaviour ? Is there something obvious I can do to make
things better ? I'd hate to be forced into using Intel Fortran Compiler.
By the way, Interl Fortran Compiler executiion time is:
real 0m26.749s
user 0m26.280s
sys 0m0.010s
Another problem with this version of GCC/G77: I have an old version of f2c
(VERSION 19990503) that used to work on RedHat 7.0, and complains now on
RedHat 9.0. I can compile it, and run it, but it can't link the programs,
complaining about an undefined reference:
undefined reference to `MAIN__'
although my environment variables are (I think) correctly set. Is there
something new in GCC/G77 that imposes to go to a newer version of f2c ?
Thank you for the time you'll spend on my questions, sincerely,
Jean-Marc Petit