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 --recursiveRemove the DEPRECATED directory from LAPACK source code:
rm -r src/SRC/DEPRECATEDCopy the src/INSTALL directory to src/SRC:
cp -r src/INSTALL src/SRCInstall 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.aandlibforlapack.afrom thelibdirectory of ForBLAS and ForLAPACK to your fpm package'slibdirectory. - Add
link = ["forlapack", "forblas"]to yourfpm.tomlfile. - 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.