gha3mi / forlapack

ForLAPACK compiles the latest LAPACK using the Fortran Package Manager (fpm).

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ForLAPACK

GitHub License

ForLAPACK simplifies the compilation of the latest LAPACK library using the Fortran Package Manager (fpm).

Install Instructions

1. Prerequisites:

Ensure you have a Fortran compiler installed on your system.

2. Clone the Repository:

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

3. Preparation:

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

4. Install LAPACK Using fpm:

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.

Integrating LAPACK and BLAS in Your fpm Package

  • Install ForBLAS and ForLAPACK.
  • Copy libforblas.a and libforlapack.a from the lib directory of ForBLAS and ForLAPACK to your fpm package's lib directory.
  • Add link = ["forlapack", "forblas"] to your fpm.toml file.
  • When using fpm, include --flag '-Llib' to specify the library directory.

Contributing

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.

About

ForLAPACK compiles the latest LAPACK using the Fortran Package Manager (fpm).

License:BSD 3-Clause "New" or "Revised" License