Correct LAPACK installation

Most linux distributions provide lapack and blas as system libraries. Often there will be a choice of optimized libraries. These are much less work, and are usually faster, than building your own.

For example, Ubuntu 22.04 LTS offers these for amd64

File Packages
/usr/lib/R/lib/liblapack.so revolution-mkl
/usr/lib/x86_64-linux-gnu/atlas/liblapack.so libatlas-base-dev
/usr/lib/x86_64-linux-gnu/lapack/liblapack.so liblapack-dev
/usr/lib/x86_64-linux-gnu/mkl/liblapack.so libmkl-dev
/usr/lib/x86_64-linux-gnu/openblas-openmp/liblapack.so libopenblas-openmp-dev
/usr/lib/x86_64-linux-gnu/openblas-pthread/liblapack.so libopenblas-pthread-dev
/usr/lib/x86_64-linux-gnu/openblas-serial/liblapack.so libopenblas-serial-dev

You may already have one or more installed. You make need to modify paths to link them and find them at run time.

You will need to do some research to see what is available for your system and works with your Fortran compiler.

1 Like