Re: Matrix Multiplication in BLAS or Lapack

From: Javier Almeida (javieralmeida_at_fis.ucm.es)
Date: 10/22/04


Date: 22 Oct 2004 04:26:43 -0700

Peng Yu <pengyu.ut@gmail.com> wrote in message news:<755bn0lf6tflbd6kcrl05ptngbqb6e73um@4ax.com>...
> Is matrix multiplication supported by lapack or is it supported by
> BLAS?
>
> I saw level 3 blas is support matrix-matix multiply. Does it mean that
> l don't have to use lapack to do matrix multiplication.
>
> Thanks,
> Peng

let's put the things more clear:

.- LAPACK is a linear algebra package with a rich set of routines
concerning three main algebra problems: linear equations, linear
least squares problems, eigenvalue problems and singular value
problems (http://www.netlib.org/lapack/lug/node8.html)

.- BLAS is a set of routines that ONLY implements low level rotines
for operations involving matrices or vectors, could it be
matrix/matrix (BLAS level 3) , matrix/vector (BLAS level 2) or
vector/vector operations (BLAS level 1). The fact that this routines
are divided in three levels is for the sake of compactness when
developing codes, as you may need only routines of one of the three
types.

.- LAPACK routines, in order to perform their computations, use the
facilities offered by BLAS routines.

.- BLAS's main goal is optimum performance and so there exists many
precopiled BLAS libraries for different architectures as well as
libraries directly implemented by specific vendors such as Intel, etc.
Many linux distributions install by default the so-called BLAS
reference implementation, as found in
http://www.netlib.org/blas/blas.tgz. It's an operative yet not
optimized implementation of BLAS.

.- The way LAPACK and BLAS libraries are interconnected depends upon
the specific distribution of LAPACK you're using. Some implementations
of LAPACK brings their own BLAS libraries while others rely in those
you have installed. As a matter of fact, very often appears
incmpatibility problems between all this libraries (the other great
problem are header files)

      As regards me, I use C-LAPACK for C instead of LAPACK for fotran
so I hope you will apologize me if find something incorrect.



Relevant Pages

  • Re: Matrix Multiplication in BLAS or Lapack
    ... > so you need not to link the lapack library. ... > LAPACK library includes the blas routines already due to ... > BLAS offers the generic and simple routines, e.g. daxpy, dgemv, dgemm, ... > playing around with the optimization options of the compiler - ...
    (sci.math.num-analysis)
  • Re: Matrix Multiplication in BLAS or Lapack
    ... BLAS-library and not of LAPACK; ... LAPACK library includes the blas routines already due to ... BLAS offers the generic and simple routines, e.g. daxpy, dgemv, dgemm, ... playing around with the optimization options of the compiler - ...
    (sci.math.num-analysis)
  • RE: numerical libraries on integrity
    ... Perhaps some of the LAPACK, BLAS, LINPACK, etc are now meant to be ... Alpha) compiler, as well as Jack Dongarra's unrolling, it will unroll ...
    (comp.os.vms)
  • Re: Testing for available libraries
    ... In the specific case of LAPACK, ... distributions also include some version of tuned and optimized BLAS ... registers and the size of the level-1 and level-2 caches. ... subblocking optimizations and on the lower-level BLAS optimizations. ...
    (comp.lang.fortran)
  • Re: Intrinsic matmul vs. LAPACK
    ... In turn, LAPACK uses BLAS, so the speed of LAPACK (and ... For example, DGEMM computes general matrix-matrix ... BLAS operation rather than a LAPACK operation. ...
    (comp.lang.fortran)