- SBCL (> 1.3.19), CCL (>= 1.11) or ECL (>= 20.4.24) on AMD64
- gfortran
- quicklisp
- libffi
- BLAS and LAPACK
On Linux, this can be installed with your favorite package manager. For example, it can be installed on Ubuntu with:
apt-get install libffi-dev
On new versions of macOS, this comes preinstalled. If you find this to not be the case for you (this could potentially be an issue on OS X), it can be installed with Homebrew using:
brew install libffi
On Linux, you can install BLAS and LAPACK with your favorite package manager.
All that's expected is that you have libblas.so
and liblapack.so
.
For example, on Ubuntu this can be done with:
apt-get install liblapack-dev libblas-dev libgfortran3
You may need libgfortran
if you built Fortran libraries. You can
install that with:
apt-get install libgfortran3
Intel's Math Kernel Library, or MKL, contains math routines, including BLAS and LAPACK,
that are specifically optimized for Intel processors. If the versions of BLAS and LAPACK
mentioned above do not suit your needs, you may consider installing MKL. To install MKL,
download the package from the Intel website
and follow the instructions within the Install_Guide.pdf file.
The particular library of interest that will be installed is libmkl_rt.so
.
It is also important to setup the proper environmental variables, especially the LD_LIBRARY_PATH
that specifies where to look for libmkl_rt.so
; directions can be found
here.
In order to use MKL in MAGICL, add :magicl.use-mkl
to your *features*
before compilation.
On macOS, Homebrew is the easiest way to get BLAS and LAPACK. You can install them with the following:
brew install gcc lapack
If you need gfortran
, you can get that with
brew install gcc
By default, libgfortran
is searched for where Homebrew installs it,
namely /usr/local/opt/gcc/lib/gcc/7/
. Likewise with libblas
and liblapack
,
located in /usr/local/opt/lapack/lib/
.
Refer to CFFI's documentation
on search paths to configure this more specifically. Libraries are searched here by default.
Another way to get BLAS and LAPACK on macOS is through the Accelerate framework.
The required libraries are libBLAS.dylib
and libLAPACK.dylib
. While the Accelerate framework includes these libraries,
they are not complete. We count more than 500 missing functions provided in the standard LAPACK distribution.
In order to use the system-provided libraries, add :magicl.use-accelerate
to your *features*
before compilation.
Intel's Math Kernel Library is also available for macOS, and directions for installing it can be found here here.
In order to use MKL in MAGICL, add :magicl.use-mkl
to your *features*
before compilation.