LAPACK is a library of Fortran subroutines for solving the most commonly occurring problems in numerical linear algebra. LAPACK reference implementation is available on GitHub, corresponding releases are available on netlib. It is worth noting that there are further implementations of BLAS/LAPACK libraries, such as OpenBLAS and Intel MKL,
LAPACK and BLAS are packaged and distributed by distros such as Debian, Ubuntu, Pop!OS, CentOS and others. It is recommended to install these packages using apt or yum package managers. They can be installed on Debian or Ubuntu systems using the following commands.
sudo apt update && sudo apt upgrade sudo apt install libblas3 libblas-dev sudo apt install liblapack3 liblapack-dev
Below is a short summary of instructions on how to compile and install LAPACK by hand (for the case you wish to do so).
First clone the LAPACK repository. And configure cmake to build lapack as a shared library. The following commands will result in a set of .so files or shared library files installed in the path specified with CMAKE_INSTALL_LIBDIR flag :
cd lapack mkdir build cd build cmake -DBUILD_SHARED_LIBS=ON -DCMAKE_INSTALL_LIBDIR=$HOME/.local/lapack ../ make installAfter successful execution of above set of commands, a list of .so files such as libblas.so, libblas.so.3, liblapack.so, liblapack.so.3 are generated.
Support for LAPACK will be enabled automatically if a system wide installation of LAPACK can be found. To use a self compiled version, specify
cmake, for example,
git clone https://github.com/dealii/dealii.git cd dealii mkdir build cd build cmake -DDEAL_II_WITH_LAPACK=ON -DLAPACK_DIR=$HOME/.local/lapack/ ../ make
You can override the autodetection by manually setting