LAPACK build and test guide

This page is a guide to building the LAPACK linear algebra package and running its testing and timing programs.


It is assumed that you already downloaded LAPACK from the netlib repository at lapack.tgz. This is a 5 Mb file.

To build it, perform the following:

The uncompressed LAPACK distribution comprises some 35 Mb of source files. Building the libraries, test and timing programs adds between 80 and 100 Mb of objects, libraries and executables to this.

A final note: On 64-bit targets, LAPACK cannot be built using GCC 2.95.2 without specifying the -femulate-complex flag. Building it using GCC 3.0 should not need that flag.

On Alphas it is necessary to add the flag -mieee to OPTS, NOOPT and LOADOPTS.


The LAPACK Makefile assumes that you have the current directory in your path. If this is not the case in your shell setup, use the following command line:

(PATH=$PATH:. export PATH; make install blaslib lapacklib tmglib testing blas_testing)

If the main memory in your machine is 512 Mbyte or larger, you are able to run the timing programs in addition to the testing programs that are run with the command above. In that case, issue the command:

(PATH=$PATH:. export PATH; make install blaslib lapacklib tmglib testing blas_testing timing blas_timing)


The output of the testing programs gets written into files with extension .out in the TESTING subdirectory of the main LAPACK directory. Use the command grep -i fail *.out to find the number of failing tests.

GCC 3.0 should not result in more failures than GCC 2.95.2




Cleanup (to prepare the directory for a fresh run, e.g. with another version of the compiler), has to be done as follows:

(PATH=$PATH:. export PATH; make clean; rm `find . -name '*.SUMM' -print`)

The reason for this is that the LAPACK programs leave files behind with the extension .SUMM, which are opened with STATUS='NEW' - this will result in an abort if the files already exist.