Skip to content

Installation

Sam edited this page May 6, 2024 · 4 revisions

cl-mpm has a couple of main depenancies.

SBCL

It requires sbcl with sb-simd enabled

Which can be acquired here: https://www.sbcl.org/

Linux, Windows, and Mac binaries are available

Can be install via package manager:

sudo apt install sbcl

In the console we can start a lisp REPL with: sbcl --dynamic-space-size 4000

Quicklisp

Quicklisp is the de-facto common lisp package manager, which may be found here: https://www.quicklisp.org

At the time of writing installation is done by using curl:

curl -O https://beta.quicklisp.org/quicklisp.lisp
sbcl --load quicklisp.lisp

And in the sbcl repl typing

(quicklisp-quickstart:install)
(ql:add-to-init-file)

Magicl

Magicl is a matrix library that attempts to be flexible and reasonably efficient: https://github.com/quil-lang/magicl.

Speed is gained by leaning heavily on interfacing with BLAS, however I've extend parts of it to use SIMD for performance in the core-loop.

To install the altered version you should clone the forked repo into the quicklisp local-projects folder.

On linux this is:

~/quicklisp/local-projects/

on windows it is probably C:/Users/../quicklisp/local-projects

we can then:

git clone https://github.com/Ionsto/magicl.git

We can then follow the magicl install steps https://github.com/quil-lang/magicl/blob/master/doc/requirements.md

Linux

apt-get install libffi-dev liblapack-dev libblas-dev libgfortran3

Windows

Personally I use WSL to use SBCL on windows, however it is possible to run SBCL nativly. Magicl currently doesn't run on windows due to a bug in a dependancy.

I suspect it is possible to run the full stack of SBCL/MAGICL/BLAS through MYSYS2 however I havn't checked this in detail https://www.msys2.org/.

GNUplot

Used for the live plotter

http://www.gnuplot.info/download.html Note if using wsl & windows, install the Windows gnuplot, then add it to path.

Clone this wiki locally