Usenet comp.os.linux.announce (1993-2013)
 help / color / mirror / Atom feed
From: ig25@fg70.rz.uni-karlsruhe.de (Thomas Koenig)
Subject: Performance of f2c + gcc under Linux vs SunOS F77
Date: Wed, 20 Apr 1994 15:25:27 GMT	[thread overview]
Message-ID: <ann-15820.766855514@cs.cornell.edu> (raw)

[ Article crossposted from comp.os.linux.admin,comp.lang.fortran ]
[ Author was Bruce Scott TK, bds@ipp-garching.mpg.de ]
[ Posted on 19 Apr 1994 20:43:54 +0200 ]

[ I thought this deserved wider circulation.  Linux IS a serious
  alternative to workstations for scientific programs. TK]

This is an update and correction of my previous post under this subject.
Please disregard the former one since this one is self-contained.

Here is the result of a test between two platforms running a standard
Fortran 77 code. 

The two platforms are: (1) Sun Sparc ELC, SunOS 4.1.3, 16 MB RAM, with 
native Fortran F77 version 1.4; (2) Toshiba T1950 PC, i486DX2/40 CPU, 
Linux 0.99pl14, 4 MB RAM, with f2c version 0.9 and gcc version 2.4.5 
with libc version 4.4.4. NB: This F77 version number is taken from
the manpage and may be out of date. I have received mail from a Sun
engineer about this, and he has offered to test my sources under
Solaris (which will not be up here for a few more weeks). The Sun's
performance numbers may change.

The code is a 1-D tokamak simulation via Galerkin finite elements,
where the transport (energy, particles), resistive diffusion, and
ideal MHD equilibrium adjustment done in separate steps. (It is the
sort of thing which would not vectorise well on a Cray, for example.)
It consists of 1303 lines in 12 source files, plus three short include
files for dimension declarations. I/O is negligible compared to number
crunching, all done in double precision floating-point.

On the Sun, the options used were -O4 -dalign -r8. On the PC, they
were -r8 for the f2c call, -O2 -funroll-loops for the gcc call on the
*.c files, and -O2 for the gcc loader call. Here are the results for 
CPU seconds:

        Sun             17.26 sec

        PC              23.67

There is essentially no effect from -funroll-loops on the PC. I have 
ensured that options are getting passed to the PC routines by hand-inserting
them into the F77 script. I have verified that if I do not do this, the
-O2 at least does not get through to the gcc call. On the PC, the compile
took 3 minutes (!).

This is quite a serious code (when run for reasonable times and grids,
runs are in the hours), and it should help convince any doubters that
the 486 PC under Linux can be quite a serious platform, especially for
development.

-- 
Gruss,
Dr Bruce Scott                             The deadliest bullshit is
Max-Planck-Institut fuer Plasmaphysik       odorless and transparent
bds@ipp-garching.mpg.de                               -- W Gibson

--
Mail submissions for comp.os.linux.announce to: linux-announce@tc.cornell.edu
Be sure to include Keywords: and a short description of your software.
-- 
Linux: Generous programmers from around the world all join forces to help
       you shoot yourself in the foot for free.



                 reply	other threads:[~1994-04-20 15:25 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox