[NTLUG:Discuss] Thinking ALPHA

Steve Baker sjbaker1 at airmail.net
Sat Sep 25 09:25:35 CDT 1999


"Carter B. Bennett" wrote:
> 
> I have an opportunity to purchase an ALPHA box to run Linux on. I have
> never had any experience with a ALPHA processor before, what do I need to
> know before purchasing this box. I am looking at the screamers from
> Microway. Will Linux look and feel the same as on an Intel box, and is
> programming/development much different? This is kind of scarry for me but I
> understand the ALPHA is about as fast as it get's.

To the end user, Linux looks pretty much the same on every platform.
I'm pretty sure that if someone sat you down in front of an Alpha-based
machine without telling you, you could use it for hours without even
knowing that it was no an Intel CPU.

To the programmer - aside from obvious differences at the machine
code level - it's all pretty similar.  Erm - is the Alpha little-endian?
I forget...anyway all code should be endian-independent anyway so
who cares?

Someone tried to run my Tux_AQFH game on an Alpha - and found that
they got a bunch of floating point errors.  I have seen complaints
about that for several packages.  IIRC, Darryll Strauss (who ported
the GLIDE API to Linux) encountered these same problems when he was
working with 60 Linux Alphas during his work on rendering the oceans
for the movie "Titanic".

In the case of Tux_AQFH, it was caused by somewhat dubious programming
on my part - in areas of the program that didn't matter to the correct
functioning of the code.  However, it seems that the Alpha is unduly
sensitive to careless floating point usage.

The biggest problem area seemed to be related to doing floating point
math on undefined variables - even in situations where the results
don't matter:

Here is a much simplified example:

    float x ;  /* Undefined */

    if ( condition )
      x = 6.0f ;

    x += 2.0f ;  /* Maybe an operation on an undefined variable */

    if ( condition )
      printf ( "%f\n", x ) ;  /* But who cares? */


This kind of thing would sometimes core dump on the Alpha if
condition==FALSE, where x86, PPC, 68000, MIPS, etc CPU's would
happily sail on past.  Clearly it's sloppy programming on my part
- but it's a pain to debug if you don't have an Alpha.

Unfortunately, the person I was corresponding with over those errors
got somewhat upset about the number of errors in my code and stopped
feeding me new bug reports.  Since I don't have access to an Alpha,
I was unable to find out whether it ever eventually worked.

   :-(

-- 
Steve Baker                  http://web2.airmail.net/sjbaker1
sjbaker1 at airmail.net (home)  http://www.woodsoup.org/~sbaker
sjbaker at hti.com      (work)




More information about the Discuss mailing list