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:
tar zxf lapack.tgz, orgunzip -c lapack.tgz | tar xf -cd LAPACKmake.inc):
PLAT = G77FORTRAN = /your/full/path/to/g77OPTS = -g -O2 -funroll-loopsNOOPT = -gLOADER = $(FORTRAN)LOADOPTS =RANLIB = ranlibBLASLIB = ../../blas$(PLAT).aGCC_DIR = /path/to/gcc/build/directoryFORTRAN = $(GCC_DIR)/gcc/g77 -B$(GCC_DIR)/gcc/LOADER = $(FORTRAN) -L$(GCC_DIR)/<target>/libf2c<target> is the target triple for your system (e.g.
mips-sgi-irix6.5)
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
TBD
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.
Please send FSF & GNU inquiries & questions to gnu@gnu.org. There are also other ways to contact the FSF.
These pages are maintained by the GCC team.
For questions related to the use of GCC, please consult these web pages and the GCC manuals. If that fails, the gcc-help@gcc.gnu.org mailing list might help.Copyright (C) Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110, USA.
Verbatim copying and distribution of this entire article is permitted in any medium, provided this notice is preserved.
| Last modified 2007-07-25 |
|