This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
Re: gfortran 4.3.2 about 3x slower than g77 for scientific application
On Thu, May 14, 2009 at 09:18, Julian King <jking.phys@gmail.com> wrote:
> I should note actually that the outputs from g77 and gfortran are NOT
> the same... I thought that they were but I didn't look closely enough.
> Oops. The program is indeed iterative, and takes a few more iterations
> than the g77 version (16 as against 11), however this is not
> sufficient to explain the slowdown. The program does not utilise
> random numbers and so should be deterministic. I am curious as to why
> there is a difference between g77 and gfortran (even not using
> -ffast-math).
Figuring out the difference in iteration count and output is probably
the key to unraveling this mystery. However without a self-contained
testcase there is little we can do except for wishing good luck.
As an aside, I suppose the iteration count that you say is 16 vs. 11
depends on what you count. If you look at the profile you(?) posted in
the original message, you'll see, for example, that gfortran calls
dexpf_ 16 *times* more than g77 does. As an aside, as Steve already
mentioned, dexpf is not a glibc function.
> I would be happy to continue using g77.... except it doesn't support
> OpenMP. GRR.
g77 has not been maintained for many years now, so if I were in your
shoes I'd make plans to move to something different. So far installing
g77 on current systems tends to work relatively well, but I wouldn't
count on that happy state of affairs continuing indefinitely.
> On Thu, May 14, 2009 at 12:25 AM, Tobias Burnus <burnus@net-b.de> wrote:
>> VelocideX wrote:
>>> Executing the program on identical data is about 3x slower in gfortran than
>>> g77 (v3.3.3-hammer).
>> That's quite a lot. I don't know how gfortran compares with g77 (I have
>> too much Fortran 90+ code), but typically I saw that the fastest
>> other-vendor compilers are 8% to 25% faster - up to twice as fast for
>> single tests. (However, for other test files, gfortran is twice as fast
>> and if one looks at the geometric mean results of several compilers at
>> http://www.polyhedron.co.uk/compare0html, one sees it does on average
>> quite well and ranks speedwise in the middle.)
In the days of yore, polyhedron used to have separate tests for F77
and F90; Some googling turns up these old results with g77:
http://www.polyhedron.co.uk/pb04-linux-f77bench_p40html
http://www.polyhedron.com/pb04-win32-f77bench_p40html
If one compares those results with the current ones
http://www.polyhedron.com/compare0html
it seems that gfortran ought to substantially outperform g77 on the
geometric mean. Individual tests might of course go either way.
--
Janne Blomqvist