Difference between revisions of "LAPACK"
Weibullguy (talk | contribs) |
|||
(8 intermediate revisions by one other user not shown) | |||
Line 7: | Line 7: | ||
---- | ---- | ||
− | {{Package-Introduction|LAPACK is a '''L'''inear '''A'''lgebra '''PACK'''age that provides routines for solving systems of simultaneous linear equations, least-squares solutions of linear systems of equations, eigenvalue problems, and singular value problems. The associated matrix factorizations (LU, Cholesky, QR, SVD, Schur, generalized Schur) are also provided, as are related computations such as reordering of the Schur factorizations and estimating condition numbers. 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. LAPACK routines are written so that as much as possible of the computation is performed by calls to the [[ | + | {{Package-Introduction|LAPACK is a '''L'''inear '''A'''lgebra '''PACK'''age that provides routines for solving systems of simultaneous linear equations, least-squares solutions of linear systems of equations, eigenvalue problems, and singular value problems. The associated matrix factorizations (LU, Cholesky, QR, SVD, Schur, generalized Schur) are also provided, as are related computations such as reordering of the Schur factorizations and estimating condition numbers. 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. LAPACK routines are written so that as much as possible of the computation is performed by calls to the [[ATLAS]]. |
− | LAPACK libraries can also be obtained from ATLAS or the microprocessor vendor's math library, such as AMD's [[ACML]].|http://www.netlib.org/lapack/}} | + | LAPACK libraries can also be obtained from ATLAS (incomplete) or the microprocessor vendor's math library, such as AMD's [[ACML]].|http://www.netlib.org/lapack/}} |
+ | |||
+ | {{Note|These instructions do not install the resulting libraries. Once the LAPACK libraries are built, build [[ATLAS]]. You will then have optimized ATLAS and LAPACK libraries installed.}} | ||
== Dependencies == | == Dependencies == | ||
Line 17: | Line 19: | ||
One of the following is required to build LAPACK: | One of the following is required to build LAPACK: | ||
− | [[GCC-3.3]] built with F77 support | + | * [[GCC-3.3]] built with F77 support |
− | [[GCC]] built with gfortran support | + | * [[GCC]] built with gfortran support |
− | |||
− | |||
− | |||
− | |||
== Configuration Information == | == Configuration Information == | ||
Line 40: | Line 38: | ||
First we create a make.inc to use in our build. | First we create a make.inc to use in our build. | ||
− | cp -v make.inc.example make.inc | + | cp -v make.inc.example make.inc && |
+ | sed -i 's@../../blas$(PLAT).a@/usr/lib/blas/atlas/libblas.a@' make.inc && | ||
+ | sed -i "s/OPTS = -funroll-all-loops/& ${CFLAGS} -fPIC/" make.inc | ||
+ | sed -i "s/NOOPT =/& -fPIC/" make.inc && | ||
+ | sed -i "s/EXT_ETIME/INT_CPU_TIME/" make.inc | ||
If you haven't built the F77 compiler provided by gcc-3.3, you need to tell LAPACK that you're using gfortran. | If you haven't built the F77 compiler provided by gcc-3.3, you need to tell LAPACK that you're using gfortran. | ||
sed -i 's@g77@gfortran@g' make.inc | sed -i 's@g77@gfortran@g' make.inc | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
Compile the LAPACK libraries: | Compile the LAPACK libraries: | ||
make lib | make lib | ||
− | |||
− | |||
− | |||
− | |||
− | |||
Install the documentation that comes with the LAPACK library: | Install the documentation that comes with the LAPACK library: | ||
Line 85: | Line 64: | ||
First we create a make.inc to use in our build. | First we create a make.inc to use in our build. | ||
− | cp -v make.inc.example make.inc | + | cp -v make.inc.example make.inc && |
+ | sed -i "s/NOOPT =/& -fPIC/" make.inc && | ||
+ | sed -i "s/EXT_ETIME/INT_CPU_TIME/" make.inc | ||
If you haven't built the F77 compiler provided by gcc-3.3, you need to tell LAPACK that you're using gfortran. | If you haven't built the F77 compiler provided by gcc-3.3, you need to tell LAPACK that you're using gfortran. | ||
sed -i 's@g77@gfortran@g' make.inc | sed -i 's@g77@gfortran@g' make.inc | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
=== 32Bit === | === 32Bit === | ||
Line 105: | Line 76: | ||
Add your build options to the make file: | Add your build options to the make file: | ||
− | + | sed -i 's@../../blas$(PLAT).a@/usr/lib/blas/atlas/libblas.a@' make.inc && | |
− | + | sed -i "s/OPTS = -funroll-all-loops/& ${BUILD32} -fPIC/" make.inc | |
− | |||
− | |||
− | sed -i 's@../../blas$(PLAT).a@/usr/lib/ | ||
− | |||
− | |||
− | |||
− | sed -i | ||
Compile the LAPACK libraries: | Compile the LAPACK libraries: | ||
make lib | make lib | ||
− | |||
− | |||
− | |||
− | |||
− | |||
=== N32 === | === N32 === | ||
Line 128: | Line 87: | ||
Add your build options to the make file: | Add your build options to the make file: | ||
− | + | sed -i 's@../../blas$(PLAT).a@/usr/lib32/blas/atlas/libblas.a@' make.inc && | |
− | + | sed -i "s/OPTS = -funroll-all-loops/& ${BUILDn32} -fPIC/" make.inc | |
− | |||
− | |||
− | sed -i 's@../../blas$(PLAT).a@/usr/lib32/ | ||
− | |||
− | |||
− | |||
− | sed -i | ||
Compile the LAPACK libraries: | Compile the LAPACK libraries: | ||
make lib | make lib | ||
− | |||
− | |||
− | |||
− | |||
− | |||
=== 64Bit === | === 64Bit === | ||
Line 151: | Line 98: | ||
Add your build options to the make file: | Add your build options to the make file: | ||
− | + | sed -i 's@../../blas$(PLAT).a@/usr/lib64/blas/atlas/libblas.a@' make.inc && | |
− | + | sed -i "s/OPTS = -funroll-all-loops/& ${BUILD64} -fPIC/" make.inc | |
− | |||
− | |||
− | sed -i 's@../../blas$(PLAT).a@/usr/lib64/ | ||
− | |||
− | |||
− | |||
− | sed -i | ||
Compile the LAPACK libraries: | Compile the LAPACK libraries: | ||
make lib | make lib | ||
− | |||
− | |||
− | |||
− | |||
− | |||
Install the documentation that comes with the LAPACK library: | Install the documentation that comes with the LAPACK library: | ||
Line 178: | Line 113: | ||
done | done | ||
− | + | [[Category:Science_Engineering]] | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− |
Latest revision as of 16:39, 19 March 2009
Download Source: | http://www.netlib.org/lapack/lapack-3.1.1.tgz |
---|
Contents
Introduction to LAPACK
LAPACK is a Linear Algebra PACKage that provides routines for solving systems of simultaneous linear equations, least-squares solutions of linear systems of equations, eigenvalue problems, and singular value problems. The associated matrix factorizations (LU, Cholesky, QR, SVD, Schur, generalized Schur) are also provided, as are related computations such as reordering of the Schur factorizations and estimating condition numbers. 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. LAPACK routines are written so that as much as possible of the computation is performed by calls to the ATLAS.
LAPACK libraries can also be obtained from ATLAS (incomplete) or the microprocessor vendor's math library, such as AMD's ACML.
Project Homepage: http://www.netlib.org/lapack/
Dependencies
Required
One of the following is required to build LAPACK:
Configuration Information
There is no configure script for LAPACK. All options are set in the make.inc file. You may wish to modify the following options.
PLAT= appends the architecture to the library name. Beneficial if building LAPACK for more than one architecture. |
OPTS= sets the options passed to the FORTRAN compiler. |
Non-Multilib
First we create a make.inc to use in our build.
cp -v make.inc.example make.inc && sed -i 's@../../blas$(PLAT).a@/usr/lib/blas/atlas/libblas.a@' make.inc && sed -i "s/OPTS = -funroll-all-loops/& ${CFLAGS} -fPIC/" make.inc sed -i "s/NOOPT =/& -fPIC/" make.inc && sed -i "s/EXT_ETIME/INT_CPU_TIME/" make.inc
If you haven't built the F77 compiler provided by gcc-3.3, you need to tell LAPACK that you're using gfortran.
sed -i 's@g77@gfortran@g' make.inc
Compile the LAPACK libraries:
make lib
Install the documentation that comes with the LAPACK library:
install -v -m755 -d /usr/share/doc/LAPACK-3.1.1/html && install -v INSTALL/lawn81.{pdf,ps} /usr/share/doc/LAPACK-3.1.1/ && for doc in html/*.html; do cp -v $doc /usr/share/doc/LAPACK-3.1.1/html done
Multilib
First we create a make.inc to use in our build.
cp -v make.inc.example make.inc && sed -i "s/NOOPT =/& -fPIC/" make.inc && sed -i "s/EXT_ETIME/INT_CPU_TIME/" make.inc
If you haven't built the F77 compiler provided by gcc-3.3, you need to tell LAPACK that you're using gfortran.
sed -i 's@g77@gfortran@g' make.inc
32Bit
Add your build options to the make file:
sed -i 's@../../blas$(PLAT).a@/usr/lib/blas/atlas/libblas.a@' make.inc && sed -i "s/OPTS = -funroll-all-loops/& ${BUILD32} -fPIC/" make.inc
Compile the LAPACK libraries:
make lib
N32
Add your build options to the make file:
sed -i 's@../../blas$(PLAT).a@/usr/lib32/blas/atlas/libblas.a@' make.inc && sed -i "s/OPTS = -funroll-all-loops/& ${BUILDn32} -fPIC/" make.inc
Compile the LAPACK libraries:
make lib
64Bit
Add your build options to the make file:
sed -i 's@../../blas$(PLAT).a@/usr/lib64/blas/atlas/libblas.a@' make.inc && sed -i "s/OPTS = -funroll-all-loops/& ${BUILD64} -fPIC/" make.inc
Compile the LAPACK libraries:
make lib
Install the documentation that comes with the LAPACK library:
install -v -m755 -d /usr/share/doc/LAPACK-3.1.1/html && install -v INSTALL/lawn81.{pdf,ps} /usr/share/doc/LAPACK-3.1.1/ && for doc in html/*.html; do cp -v $doc /usr/share/doc/LAPACK-3.1.1/html done