Biowulf High Performance Computing at the NIH


LAPACK provides routines for solving systems of simultaneous linear equations, least-squares solutions of linear systems of equations, eigenvalue problems, and singular value problems.

LAPACK routines are written so that as much as possible of the computation is performed by calls to the Basic Linear Algebra Subprograms (BLAS).

To view the available versions of LAPACK, type:

module avail LAPACK

LAPACK is built with both static and shared libraries. There are two versions of the static library available: one with position-independent code (PIC) and one without. To compile a program with the static library with PIC, include the following library at compile time:

gcc -llapack_pic ...

Within LAPACK, the BLAS static library is not built with -fPIC. As a result, your code compilation may return an error such as:

"...libblas.a(symbol) relocation R_X86_64_32 against `.rodata' can not be used when making a shared object; recompile with -fPIC."

You can avoid the error above by explicitly specifying the shared library instead of at compile time:

gcc ...

Compiled Libraries

LAPACK installs the following libraries:
lib/libblas.a           => static blas library 
lib/    => shared library (with PIC)

lib/liblapack.a         => static lapack library
lib/liblapack_pic.a     => static lapack library (with PIC)
lib/  => shared lapack library (with PIC)