The LAPACK library
This page was translated by an AI (LLM) with a cursory human check and is awaiting full review.
Descriptionโ
LAPACK (Linear Algebra Package) is a library dedicated to dense linear algebra and depends on the BLAS (Basic Linear Algebra Subprograms) library. It provides functions for solving systems of linear equations, computing eigenvalues, and matrix decompositions (LU, QR, SVD, Cholesky).
LAPACK is available via the Intel MKL (Math Kernel Libraries) which we recommend because they offer better performance, or in a free version (Netlib).
Installed Versionsโ
The versions installed on Jean Zay can be found using the following commands:
-
Intel MKL Versions
module avail intel-mkl -
Netlib Versions
module avail netlib-lapack
Environmentโ
The versions of LAPACK are available in different environments.
-
Intel Environments
For Intel environments, please refer to our documentation on the Intel MKL library.
-
Free Version
For the free version, this information can be found using the command
module show. For example:module show netlib-lapack
module-whatis {LAPACK version 3.X is a comprehensive FORTRAN library that does linear algebra operations including matrix inversions, least squared solutions to linear sets of equations, eigenvector analysis, singular value decomposition, etc. It is a very comprehensive and reputable package that has found extensive use in the scientific community.}prereq gcc/11.4.1 gcc/10.1.0conflict netlib-lapack
Available software environment(s):- gcc/11.4.1- gcc/10.1.0
To use this library in other environments, please contact the User Support team.
To obtain information on the library access paths for the free version, it will be necessary to first load the chosen environment (gcc in this example):
module load gcc/11.4.1module show netlib-lapackUsageโ
The library is accessible via the module command.
Using LAPACK via MKLโ
For using MKL, please refer to the page concerning the Intel MKL library.
Using the Free Version of LAPACKโ
To load the default version in the current environment (or in the default environment if no environment is previously loaded):
module load netlib-lapack
or to load a specific version in a specific environment (gcc in this example):
module load gcc/8.2.0module load netlib-lapack/3.8.0
Link Editingโ
Link Editing with MKLโ
Please refer to the page concerning the Intel MKL library.
Link editing for using MKL can vary depending on several parameters such as the operating system, compiler type, and architecture. It is recommended to use the Intelยฎ MKL Link Line Advisor to find the appropriate options.
Here is an example for the LAPACK library:
module load intel-compilersmodule load intel-mklifort appel_lapack.f90 -L${MKLROOT}/lib/intel64 -lmkl_intel_lp64 \
-lmkl_sequential -lmkl_core -lpthread -lm -ldl
Link Editing with the Free Versionโ
When link editing, it is necessary to add the options -llapack -lblas:
module load gcc/11.4.1module load netlib-lapackgfortran appel_lapack.f90 -llapack -lblas
Documentationโ
๐ Reference Site
๐ Intel MKL documentation
๐ Intel MKL Link Line Advisor