Red Hat axp-list: Linux on Alpha (1995-2022)
 help / color / mirror / Atom feed
From: Harold H. Youngren <guppy@maine.com>
Subject: Re: f2c and fortran...
Date: Wed, 7 Feb 96 09:47:59 -0500	[thread overview]
Message-ID: <9602071447.AA00319@maine.com> (raw)

Hi,

I just got a new Alpha and joined this list to get the last word on getting  
Linux up and running...

I saw a post from Akio Morita on f2c (now in the redhat archives).  

F2c is not just for small programs.  I have used it for 4 years now on various  
platforms where I don't have  a native f77 compiler.  I have compiled literally  
millions of lines of Fortran, in large programs as well as small.  F2c combined  
with gcc has proved to be one of the most reliable "fortran compilers" I have  
used and frequently finds bugs in programs that other compilers miss.  Note  
that f2c does no optimization, only translation.  Any optimization is in the C  
compile of the translated code, so the C compiler is the key.  The g77  
compiler, although a native compiler that could do more optimization since it  
starts with fortran source, produces slower code than f2c/gcc and has only  
recently gotten debugged enough to compile large applications without having to  
substitute f2c/gcc compiles for the buggy modules.  The speed of code from the  
f2c/gcc combination is typically 70%-90% of that from a native fortran  
compiler.  This speed difference is greater for RISC machines (such as the HP,  
the MIPS processors or the Alpha) where the consequences of bad instruction  
scheduling are more serious and factors of 2x or 3x are possible between  
f2c/gcc and native f77 compiled code.

Comparing DOS or NT native compilers to any of the GNU compilers (g77,f2c/gcc)  
shows that the GNU compiler optimizations on the Pentium are not as good as  
those from vendors that have used Intel's optimizations.  On a 90 mhz Pentium  
Watcom F77 under DOS or NT maxes out on Linpack at 18 MFLOPS or so, f2c/gcc  
produces 11 MFLOPS, g77 gives 9 MFLOPS.  There is obviously much room for  
improvement here.  

One bright spot on the Linux compiler horizon may be that MicroWay (Kingston,  
MA) is porting their NDP optimizing compilers (F77, F90, C, C++, Pascal) to run  
under Linux on both the Pentium and on the Alpha.  They are not ready yet, I  
talked to them yesterday, but they are working on the library compatibility  
issues now and tuning the Alpha code generator.  These are obviously commercial  
compilers, not freeware, but may offer a way to produce much faster code under  
Linux.  In the meantime, f2c/gcc and g77 are the only way to compile fortran  
under Linux on the Alpha.  Hopefully, I should have some timing comparisons for  
Linux f2c/gcc vs DEC f77 in the next week or so.

Hal Youngren

--

************************************************************
 Harold Youngren   ----> Internet: guppy@maine.com 
 129 Pitt St,            AeroCraft, Inc. 
 Portland, ME  04103     Aeronautical Consulting, Analysis, 
 Home: (207)871-0552     Design, CFD software 
 Fax:  (207)871-1034
************************************************************

                 reply	other threads:[~1996-02-07 14:47 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