• Home
  • Accessing Our Facilities
    • Apply for Access
    • HPC Resource List
    • Our Staff
    • Our Research Projects
    • Our Research Software

    • Contributions & Costings
    • HPC Driving Test
  • Documentation
    • Documentation Home
    • Getting Started
    • Advanced Topics
    • Training & Workshops
    • FAQ
    • Policies & Procedures
    • Using the Wiki

    • Data & Report Terminology
    • About this website

    • Reports
  • My Account
    • My HPC Projects
HPC Support
Trace: • lapack

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 1, and 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.


Back to Software list

Previous Next

HPC Support

Table of Contents

HPC Service

  • News & Changes

Main Content Sections

  • Documentation Home
  • Getting Started
  • Advanced Topics
  • Training & Workshops
  • FAQ
  • Policies & Procedures
  • Using the Wiki
  • Contact us & Get Help

Documentation Tools

  • Wiki Login
  • RSE-HPC Team Area
Developed and operated by
Research Software Engineering
Copyright © Newcastle University
Contact us @rseteam