Red Hat axp-list: Linux on Alpha (1995-2022)
 help / color / mirror / Atom feed
* Re: g77 experience (now with comment on NDP f77)
@ 1997-04-23 21:33 Harold H.Youngren
  1997-04-24  3:33 ` Michal Jaegermann
  0 siblings, 1 reply; 6+ messages in thread
From: Harold H.Youngren @ 1997-04-23 21:33 UTC (permalink / raw)


>Claus Denk replied to Thomas Schneider with:
>> 

>> Hello,
>> 

>> we are planning to buy an aplha for computational fluid mechanics.
>> Since our programs are written in fortran, we need to know how the g77
>> works on an alpha (reliability, performance etc ..). Is there anybody
>> who has experiences ?
>> 

>
>The first version of g77 that supports alpha is 0.5.20 and it
>does not compile out of the box on elf systems (although there
>is a workaraound). I think 0.5.21 should fix that.
>
>Performance depends a lot on the code that you have in mind, can't
>tell about fluid mechanics. You will find codes that perform quite
>well with g77 and others that run 2-3 times faster compiled with
>a digital f77 compiler. So if you really need this machine for
>production runs NOW, either:
>
>i) get it with DU and f77 (if you can afford)
>ii) try the NDP commercial compiler for alpha-linux and tell me
>how it performs ! (I posted a question about this compiler on
>the comp.lang.fortran group and no one replied - anyone on this
>list ?)

The only good fortran compiler for the Alpha is the DEC f77/f90 compiler that  
runs under OSF.  These compilers produce by far the best, fastest code and have  
fast compile times (I mention this for a reason, wait...).  From my optimized  
codes I can get 100-150 MFLOPS on a 300mhz 21164 Microway Screamer processor.   
If you are doing stuff that can take advantage of the DEC DXML (tuned LAPACK  
routines) you will be amazed at the speed that you can get for matrix  
operations (I get 350 MFLOPS on LU decomps and 400+ MFLOPS on matrix  
multiplies).   

The fortran situation under Linux/Alpha is pretty bleak, that is why I run DEC  
OSF and the DEC f77/f90 for my work.  If you use f2c/gcc you can expect to get  
about 40 MFLOPS out of a LINPACK benchmark (that runs at 140 MFLOPS on DEC  
f77!).  A bit faster with DEC cc. G77 is currently not yet stable under  
Linux/Alpha although you can make it run and it may well be somewhat faster.    

Microway is selling an Alpha version of their NDP f77 compiler but that  
compiler currently only produces 32 bit code (internally it is a 32 bit  
compiler).  It uses its own special libc in addition to the fortran libs and  
cannot, in general, be linked with 64 bit compiled C code (native AXP  
pointers,longs,etc).  Microway has had to patch the Linux kernel and loader to  
run the NDP 32 bit executables.  The two versions of the NDP compiler that I  
have briefly used max out performance-wise at about 70-80 MFLOPS in a LINPACK  
benchmark.  Note that this is what I get when I use it, Steve Fried at Microway  
claims somewhat more speed.  The problem with the NDP compiler is their  
optimizer/scheduler which takes so long to optimize anything that you really  
can't use it for serious work.  It takes over 10 minutes for the NDP compiler  
running on the 300mhz Alpha to optimize a 20 line SAXPY routine!  And the  
results are never as good as the DEC compiler that does it in about 2 seconds,  
although Steve Fried (Microway) now maintains that his NDP optimized DAXPY is  
as fast as that from DEC f77.  The practical upshot of the slow optimization is  
that I don't even try to optimize anything complex with the NDP compiler.  If  
you did a complete profiling and extracted only the key routines for  
optimization you might get better results.

The people at Microway are in the process of rewriting their compiler for 64  
bit internals to get around all the interface issues with gcc code.  I don't  
know when that process will be finished and a new version will be available.

Terri Klaila at Microway (508)-746-7341 is quite up front and frank about this  
and has been quite helpful.  She normally recommends that people who need speed  
run DEC OSF to use the DEC f77/f90 compiler, rather than Linux - for the moment  
at least.  

Any other comments from AXP'ers on the NDP compiler?

--

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

 

--
To unsubscribe: send e-mail to axp-list-request@redhat.com with
'unsubscribe' as the subject.  Do not send it to axp-list@redhat.com

^ permalink raw reply	[flat|nested] 6+ messages in thread
* Re: g77 experience (now with comment on NDP f77)
@ 1997-04-24 11:57 Harold H.Youngren
  0 siblings, 0 replies; 6+ messages in thread
From: Harold H.Youngren @ 1997-04-24 11:57 UTC (permalink / raw)


Michal Jaegermann responded with:

>> 

>> The fortran situation under Linux/Alpha is pretty bleak, that is why I run  
DEC  

>> OSF and the DEC f77/f90 for my work.  If you use f2c/gcc you can expect to  
get  

>> about 40 MFLOPS out of a LINPACK benchmark (that runs at 140 MFLOPS on DEC  

>> f77!).

>I would strongly suspect that you see in these numbers not so
>a difference in compilers but an essential difference in libraries.
>Posted timings when really compilers were involved did not show up
>such dramatic differences even if DEC compiler was faster (something
>of an order of 10-15 %, which is still hard to disregard).

First, the only posted timings I have seen only involve the DEC C and gcc, not  
f2c/gcc and f77.  The bottom line here is that a native Fortran compiler can  
optimize far better than a C compiler and you see this in the comparisons of  
f2c/cc and f77 on any platform with a good native fortran compiler.

I just chose the LINPACK as a standard of comparison (this LINPACK was the  
undoctored benchmark from standard net sources, like ORNL, with the sizes  
increased to 400/401 to get reliable timing) because everybody could get it.   
The difference between DEC f77/f90 and f2c/gcc is really 2x-3x for most any of  
the "real-life" fortran codes that I have worked with, including big 3D Euler  
and NS codes.  When you crank up the optimization on the DEC compiler and play  
with the loop unrolling you get a big speedup.  You can get more if you put the  
source through a source optimizer like KAP, here I am guided by discussions  
with Microway's Steve Fried who has worked with KAP alot, I don't have it.  I  
understand that the DEC DXML was tuned up to its extreme speeds using KAP and  
lots and lots of comparison runs varying tuning parameters.

This fortran speedup is much greater than the speed differences between DEC C  
and gcc, most of the time DEC C will be faster (for example I have an LU  
decomposition benchmark that gets 40 MFLOPS or so with f2c/gcc which gets 65  
MFLOPS with f2c/DEC C.  On the other hand Mesa runs roughly 5% faster when  
compiled with gcc2.7.2 rather than DEC C.  Go figure.

>As a corollary to the above I would not expect miracles until higly
>optimized BLAS libraries will be available for GNU compilers.
>At some moment there was a talk that maybe Linux users will get
>an access to binaries of some DEC math libraries, not necessarily
>for free, but somehow things failed to materialize.

>On the other hand if your codes are not of a LINPACK type then
>people using f2c/gcc do not seem to fare too badly. :-)

This is misleading.  You can't just brush off the speed differences between  
f2c/gcc and DEC f77 to the libraries either as most simple math operations such  
as these matrix/vector operations don't make library calls for anything in the  
main loops, this is just simple code optimization and scheduling.  The  
optimized BLAS would give big speedups for only the calls to the libraries  
which would be pretty good for codes which are written specifically around the  
BLAS but would not help the code that doesn't involve the BLAS calls.   

Regards,
Hal Y. 

--

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

 

--
To unsubscribe: send e-mail to axp-list-request@redhat.com with
'unsubscribe' as the subject.  Do not send it to axp-list@redhat.com

^ permalink raw reply	[flat|nested] 6+ messages in thread
* Re: g77 experience (now with comment on NDP f77)
@ 1997-04-24 21:59 Toon Moene
  0 siblings, 0 replies; 6+ messages in thread
From: Toon Moene @ 1997-04-24 21:59 UTC (permalink / raw)


Harold Youngren wrote:

>  First, the only posted timings I have seen only involve
>  the DEC C and gcc, not f2c/gcc and f77.  The bottom line
>  here is that a native Fortran compiler can optimize far
>  better than a C compiler and you see this in the
>  comparisons of f2c/cc and f77 on any platform with a good
>  native fortran compiler.

First of all, the correct comparison is between g77 and DEC f77 (or  
f90).  Granted, it is not easy to build g77 on an ELF Alpha Linux  
system (due to the fact that the author only has an old ECOFF  
system).

>  I just chose the LINPACK as a standard of comparison
>  (this LINPACK was the undoctored benchmark from standard
>  net sources, like ORNL, with the sizes increased to
>  400/401 to get reliable timing) because everybody could
>  get it.  The difference between DEC f77/f90 and f2c/gcc
>  is really 2x-3x for most any of the "real-life" fortran
>  codes that I have worked with, including big 3D Euler
>  and NS codes.  When you crank up the optimization on the
>  DEC compiler and play with the loop unrolling you get a
>  big speedup.

Note that on my system, for some codes, I get a 2 fold speedup  
between g77 and f2c/gcc.  The difference is mainly the default  
optimisations g77 will perform vs. the default for f2c/gcc (i.e.,  
g77 -O2 != f2c/gcc -O2).

Also note that you don't have "to play with loop unrolling" with  
Digital's Fortran compiler - it will do that from optimisation level  
-O3 onwards, no questions asked (-O4 is the default optimisation,  
i.e. that what you get when you specify no particular optimisation  
on the command line).

g77 (and gcc) require an explicit -funroll-loops to do loop  
unrolling (the rational here is that this will increase code size  
and hence shouldn't be done "automatically").

[ .... KAP discussion elided ..... ]

>>On the other hand if your codes are not of a LINPACK type then
>>people using f2c/gcc do not seem to fare too badly. :-)

>  This is misleading.  You can't just brush off the speed
>  differences between f2c/gcc and DEC f77 to the libraries
>  either as most simple math operations such as these
>  matrix/vector operations don't make library calls for
>  anything in the main loops, this is just simple code
>  optimization and scheduling.  The optimized BLAS would
>  give big speedups for only the calls to the libraries
>  which would be pretty good for codes which are written
>  specifically around the BLAS but would not help the code
>  that doesn't involve the BLAS calls.

Concur with that.

--
Toon Moene (mailto:toon@moene.indiv.nluug.nl)
Saturnushof 14, 3738 XG  Maartensdijk, The Netherlands
Phone: +31 346 214290; Fax: +31 346 214286
g77 Support: mailto:fortran@gnu.ai.mit.edu; NWP:  
http://www.knmi.nl/hirlam

--
To unsubscribe: send e-mail to axp-list-request@redhat.com with
'unsubscribe' as the subject.  Do not send it to axp-list@redhat.com

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~1997-04-24 21:59 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1997-04-23 21:33 g77 experience (now with comment on NDP f77) Harold H.Youngren
1997-04-24  3:33 ` Michal Jaegermann
1997-04-24 17:30   ` Scott Locklin
1997-04-24 18:01     ` CHIH-HSIANG HENRY YAO
  -- strict thread matches above, loose matches on Subject: below --
1997-04-24 11:57 Harold H.Youngren
1997-04-24 21:59 Toon Moene

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