next up previous
Next: LAPACK Up: Case Studies on The Previous: Introduction

The BLAS

Fundamental to the attempt to develop both portable and efficient software has been the specification of the Level 1, Level 2 and Level 3 BLAS (Basic Linear Algebra Subprograms; LHKK:TOMS:79, DDHH:TOMS:88 and DDDH:TOMS:90), and the implementation of efficient versions by manufacturers and others on high performance machines. The BLAS encapsulate a set of computational kernels for numerical linear algebra and many of the algorithms of numerical linear algebra have been adapted to utilize these BLAS. LINPACK [&make_named_href('', "node12.html#DBMS:78","[]")], a widely used high quality public domain software package for the solution of dense and banded linear systems developed in the late 1970s, made extensive use of the Level 1 BLAS, the Level 2 BLAS have been successfully exploited on vector supercomputers (see for example Hammarling:FF:93 and the references given there), and the Level 3 BLAS have been widely used in software, such as LAPACK, aimed at shared memory machines with a hierarchy of memory and possibly multiple processors.

It is important to think of the BLAS as providing specifications, the intention being for manufacturers, or others, to provide tuned implementations on particular machines. Vanilla Fortran 77 versions are available from netlibgif [&make_named_href('', "node12.html#DG:CACM:87","[]"), &make_named_href('', "node12.html#DRW:ORNL:93","[]")], but these are intended to be model implementations, rather than tuned versions for any specific machine.

To support and encourage the use of the BLAS and their implementation a set of test programs are also supplied on netlib, designed to ensure that implementations conform to the specification and have been correctly installed. The test programs for the Level 2 and Level 3 BLAS have the following features:

An aspect that with hindsight should, perhaps, have been emphasized and more precisely described in the specifications, is that the BLAS are also expected to be numerically accurate and so naturally the test programs examine the accuracy of the BLAS. A test ratio is determined by scaling the error bounds by the inverse of machine precision, . This ratio is compared with a constant threshold value defined in the input data file. Test ratios greater than the threshold are flagged as suspect. On the basis of experience a threshold value of 16 is recommended, but the precise value is not critical. Errors in the routines are most likely to be errors such as errors in array indexing, which will almost certainly lead to a totally wrong result. A more subtle potential error is the use of a single precision variable in a double precision computation. This is likely to lead to a loss of half the machine precision. The test programs regard a test ratio greater than as an error.

It seems fair to say that the BLAS have been very successful in achieving their aim and are widely implemented on todays workstations, high-performance shared memory machines and on single nodes of distributed memory parallel machines.


next up previous
Next: LAPACK Up: Case Studies on The Previous: Introduction

Jack Dongarra
Tue Sep 3 09:41:41 EDT 1996