LAPACK
Overview
LAPACK provides routines for solving systems of simultaneous linear equations, least-squares solutions of linear systems of equations, eigenvalue problems, and singular value problems. Associated matrix factorizations are provided. Dense and banded matrices are handled, but not general sparse matrices. In all areas, similar functionality is provided for real and complex matrices, in both single and double precision.
The original goal of the LAPACK project was to make the widely
used EISPACK and
LINPACK libraries
run efficiently on shared-memory vector and parallel processors.
On these machines, LINPACK and EISPACK are inefficient because
their memory access patterns disregard the multi-layered memory
hierarchies of the machines, thereby spending too much time
moving data instead of doing useful floating-point operations.
LAPACK addresses this problem by reorganizing the algorithms
to use block matrix operations, such as matrix multiplication,
in the innermost loops. These block operations can be optimized
for each architecture to account for the memory hierarchy,
and so provide a transportable way to achieve high efficiency
on diverse modern machines. We use the term "transportable"
instead of "portable" because, for fastest possible performance,
LAPACK requires that highly optimized block matrix operations
be already implemented on each machine.
LAPACK routines are written so that as much as possible of the computation
is performed by calls to the Basic Linear Algebra Subprograms (BLAS).
While LINPACK and EISPACK are based on the vector operation kernels
of the Level 1 BLAS, LAPACK was designed at the outset to exploit
the Level 3 BLAS -- a set of specifications for Fortran subprograms
that do various types of matrix multiplication and the solution of
triangular systems with multiple right-hand sides. Because of
the coarse granularity of the Level 3 BLAS operations, their use
promotes high efficiency on many high-performance computers,
particularly if specially coded implementations are provided
by the manufacturer.
Setup
There is no setup needed for this software package.
Usage
On the IBM SP, LAPACK libraries are linked into your code at compile time by including these flags in your compile command:
|
-L/usr/local/lapack -llapack_RS6K -lblas
|
These flags instruct the compiler to search in /usr/local/lib for the lapack and
blas libraries that are necessary to use the LAPACK functions.
On the LION-XE cluster, LAPACK libraries are linked into your code at compile time by including these flags in your compile command:
|
-L/usr/global/lapack -llapack_LINUX -L/usr/global/blas -lblas_LINUX
|
These flags instruct the compiler to search in /usr/global/lapack and /usr/global/blas for the lapack and
blas libraries that are necessary to use the LAPACK functions.
Examples
For a file foo.f that uses LAPACK functions and is compiled with pgf77 on the LION-XE cluster to create an executable called foo the following command would be used:
|
pgf77 foo.f -o foo -L/usr/global/lapack -llapack_LINUX -L/usr/global/blas -lblas_LINUX
|
Documentation
A LAPACK user's guide and FAQ are available on the
LAPACK Home Page.
Please send questions or suggestions about this web page to beatnic@aset.psu.edu
ASET | ITS | Penn State
|