ForLAPACK simplifies the compilation of the latest LAPACK library using the Fortran Package Manager (fpm).
Ensure you have a Fortran compiler installed on your system.
Clone the ForLAPACK repository from GitHub, including submodules:
git clone --recurse-submodules https://github.com/gha3mi/forlapack.git
cd forlapack
git submodule update --init --recursive
Remove the DEPRECATED
directory from LAPACK source code:
rm -r src/SRC/DEPRECATED
Copy the src/INSTALL
directory to src/SRC
:
cp -r src/INSTALL src/SRC
Install ForLAPACK using fpm:
fpm install --profile release --prefix .
The compiled library will be located in the lib
directory.
Adjust installation directory, compiler, and flags as needed:
- Use
--prefix <dir>
to set the installation directory. - Use
--compiler <compiler>
to specify your Fortran compiler. - Use
--flag '<flags>'
to customize compiler flags.
- Install ForBLAS and ForLAPACK.
- Copy
libforblas.a
andlibforlapack.a
from thelib
directory of ForBLAS and ForLAPACK to your fpm package'slib
directory. - Add
link = ["forlapack", "forblas"]
to yourfpm.toml
file. - When using fpm, include
--flag '-Llib'
to specify the library directory.
Contributions to ForLAPACK
are welcome! If you find any issues or would like to suggest improvements, please open an issue or submit a pull request.