[NTLUG:Discuss] Thinking ALPHA

cbbrowne@godel.brownes.org cbbrowne at godel.brownes.org
Sun Sep 26 08:41:56 CDT 1999


On Sat, 25 Sep 1999 09:25:35 CDT, the world broke into rejoicing as
Steve Baker <sjbaker1 at airmail.net>  said:
> "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.

I always found it something of a convenience that Pascal would always "puke" 
on that sort of thing; 'tis quite useful to *know* that you've not initialized 
a variable.
--
The Three Laws of Thermodynamics: 
   1) You can't win.
   2) You can't break even.
   3) You can't even get out of the game.
cbbrowne at ntlug.org- <http://www.ntlug.org/~cbbrowne/lsf.html>






More information about the Discuss mailing list