Subject: Re: BLAS recommendations

From: <[email-masked]>
Date: Tue, 21 Dec 1999 23:28:04 -0500 (EST)

From: Emil Briggs <[email-masked]>

>
>   a) What is the "best" way to add BLAS to a 'wulfish cluster of PPro's
>and PII's?  I say best instead of fastest or cheapest or GPL'd-est to
>allow for a variety of personal interpretations of the word best.  My
>own would be very much GPL, SRPM based (and fastest possible within that
>constraint) if such a thing were possible, but I'd love to hear about
>fastest under any circumstances, best for sale, and so forth as well.
>   b) How is BLAS documented?  Is it of the "if you have to ask, you
>shouldn't be using it" variety?  Books?  A manual somewhere?
>   c) Is there e.g. a website for software written to make use of BLAS?
>   d) Are any of the above really ignorant questions?  If so please
>Enlighten me...
>

I'll try to take a shot at answering this one (as you say definitions
of "best" vary widely).

The BLAS libs come in three flavors.

BLAS1:  Vector operations
BLAS2:  Matrix-vector operations
BLAS3:  Matrix-Matrix operations

A FAQ on BLAS is available at

http://www.netlib.org/blas/faq.html

There is a lot of mathematical software that can make excellent use
of the BLAS libs -- even a simple operation like scaling a vector
by a constant.

All of the BLAS implementations for Linux suffer from various
shortcomings.

1. The generic fortran routines available at Netlib suffer from
   lousy performance no matter what compiler you use.

2. Greg Henry's libs are not open source and don't work particularly
   well on the Athlon.

3. For the Level 3 BLAS the ATLAS package is a good solution under
   Linux. R. Clint Whaley and Antoine Petitet have released version
   3.0BETA of ATLAS which also has some support for generating
   optimized Level 1 and Level 2 BLAS libs. (You can grab it 
   at http://www.netlib.org/atlas/)

   The license seems fairly liberal even though it's not GPL. I havn't
   benchmarked the new release yet but from looking at the source 
   I suspect that the Level1 and Level2 performance is not particularly 
   good yet. The problem is that ATLAS uses GCC which does not take 
   advantage of the new prefetch instructions supported by the PIII 
   and the Athlon.  For the Level1 and Level2 BLAS libs the use of 
   these instructions is very important in order to hide main-memory latency.

The stuff I wrote was assembly language versions of the Level1 BLAS
for the Athlon which use the new prefetch instructions. They're GPL
and could probably be adapted for the PIII fairly easily. (I don't
have a PIII so I havn't done this). You can get these at

  http://nemo.physics.ncsu.edu/~briggs/blas_src_v0.11_tar.gz

Presumably at some point in the future GCC will be able to generate
better code that uses the new instructions and the assembly language 
won't be necessary but for now thats not the case.

For recommendations I would say that ATLAS is a great choice for the
Level3 stuff. If you've got an Athlon then my libs are OK
for the Level1. No recommendations for Level2 (Our codes don't
require much Level2 stuff so it hasn't been a high priority for me).

Regards
Emil
 
-------------------------------------------------------------------
To unsubscribe send a message body containing "unsubscribe"
to [email-masked]