====== LAPACK ====== > LAPACK is a library of Fortran subroutines for solving the most commonly occurring problems in numerical linear algebra. * See: https://github.com/Reference-LAPACK/lapack It is important to note that the BLAS functions included in LAPACK (''libblas.so'' and ''liblapack.so'') are //distinct// to those within OpenBLAS. __Do not__ try to swap out OpenBLAS with LAPACK, or vice versa. LAPACK can be loaded as follows: $ module load LAPACK/3.12.0 This will automatically adjust LD_LIBRARY_PATH to find the compiled libraries. Headers are also available and should be automatically found by any well configured application using ''PKG_CONFIG_PATH''. **Do not use LAPACK 3.12.1** - as mentioned below, it has an unresolved error when attempting to link compiled binaries. ---- ===== Building From Source ===== **Important** You only need to read this section if you want to compile a version of LAPACK //yourself//. We reccomend you use the pre-installed module in most circumstances. Some applications or libraries may need a specific version of LAPACK. The guide below shows how to configure and compile a specific version of LAPACK into your own directory. Note that we have found that when attempting to link applications against LAPACK **3.12.1** we see missing symbol errors - this appears to have been reported by at least one Linux distribution (ARCH) missing several symbols (see [[https://bbs.archlinux.org/viewtopic.php?id=302494|1]], and [[https://gitlab.archlinux.org/archlinux/packaging/packages/lapack/-/issues/3|2]]) but appears to not have been fixed upstream. Either use LAPACK 3.12.0, or > 3.12.1, when it is released. #!/bin/bash LAPACK_DIR=$HOME/lapack echo "Download Lapack ..." echo "===================" wget -q https://github.com/Reference-LAPACK/lapack/archive/refs/tags/v3.12.0.tar.gz -O 3.2.0.tgz echo "" echo "Untar ..." echo "=========" tar -zxf 3.2.0.tgz echo "" echo "Load modules ..." echo "================" module purge module load GCC/13.3.0 echo "" echo "Configure ..." echo "=============" cd lapack-3.12.0 rm -rf build mkdir build cd build CFLAGS="-O3 -pipe -march=znver5" cmake .. -DBUILD_SHARED_LIBS=ON -DCMAKE_INSTALL_PREFIX=$LAPACK_DIR echo "" echo "Compile ..." echo "===========" make -j2 echo "" echo "Install ..." make install To compile code using this specific version of LAPACK you will need to point to the files at ''$HOME/lapack/lib64''. Most users will not need to install LAPACK from source, but this quick guide is for those that do. ---- [[:advanced:software|Back to Software list]]