Subject: Re: Linux on Alpha, math library

From: Jochen Kuepper <[email-masked]>
Date: Sat, 9 Oct 2134 22:52:41 +0200

Sorry if that goes to the list twice, I haven't gotten it back from the list
yet.

----------  Forwarded Message, on Tue, 01 Sep 1998 Jochen Kuepper wrote:  ----------

On Sat, 29 Aug 1998 Victoria Buch wrote:

>> Igor J. Barani writes:

>>  > I have just recently installed Linux on a DEC Alpha and when I compile
>>  > several programs in fortran on it, they seem to compile to twice the
>>  > size and require 9 times as long to run than on DEC UNIX.  Do you have
>>  > any idea why this may be so and how I may be able to speed up the
>>  > processes?  Any suggestions would be greatly appreciated.  Thank you.

>We have just been there. You have the latest Red Hat Linux, dont you?
>So: the latest math library libm version 2.0.7 from gnu is messed up.
>Our system menager installed old version 2.0.1 - works faster by a factor 2. 
>More generally our sexperience suggests that
>Alpha / Linux for FP operations is good only
>for simple operations + - * / . My simulation
>programs are still 40% below
>the performance of Alpha-DEC, and only 10% faster than Petium II (400MHz)
>which is more than 2 times cheaper. Disappointing.
>Good luck. Victoria

The slowdown of the math-library is due to bug-fixes. The old glibc based
math-libs do have problems with wrong results for sqrt ( and others ) !

So you have to decide wether you use correct code or ( little ) faster code
that might produce wrong answers.

I would suggest to use the newest possible libm, if you are really for speed
you might consider recompiling it with optimization turned high (v.i.).

More important, there are replacement libraries for the more important math
routines, that are hand-optimized assembler. IIRC, one of them is based on code
Cray developed for their Alpha based machines. You can use both of them, since
each one only provides a subset of functions in the next slower one
(libm <- libfm <- libffm ) !
Look at http://people.frankfurt.netsurf.de/Joachim.Wesner/

Another important fact is the compiler to use. egcs-1.1pre is really stable for
me, you might consider using it since there are very usefull new optimization
passes. Also check your code and the compiler flags you are using, consider
-fno-exceptions, -fno-rtti, ... and all the other -m, -f, -O options and take
all these that will speed up your programs !

Hope it helps and you all get more power out of your Alpha-toys.
If you need some more info, feel free to ask
( Victoria, aren't you in D"usseldorf right now ? )

Greetings,
Jochen
-----------------------------------------------------------------------
  Jochen K"upper

  Heinrich-Heine-Universit"at D"usseldorf   [email-masked]
  Institut f"ur Physikalische Chemie I
  Universit"atsstr. 1, Geb 26.43 Raum 02.29    phone ++49-211-8113681
  40225 D"usseldorf                            fax   ++49-211-8115195
  Germany             http://www-public.rz.uni-duesseldorf.de/~jochen
-----------------------------------------------------------------------