I actually found very few indications on the net to install Armadillo with OpenBLAS on Ubuntu, and I ran into problems when I tried to install the Ubuntu pre-build packages (using apt-get
). So I decided to share my experience building the whole thing from scratch, hopefully this can serve as a step-by-step through the install.
As of writing this, I'm using Ubuntu desktop 14.04 with an Intel i7 4820k Ivy-Bridge E CPU. Of course your config will be different, but I think it should be fairly similar for any Intel + Ubuntu desktop platform.
I'm not going to install Armadillo on my entire system, although it shouldn't make a whole lot of difference. I'm using this inside another project, which is currently synchronized between three machines (Ubuntu desk, OSX Yosemite desk, laptop OSX Snow Leopard). I'll update the gist when I setup the whole thing.
You should create a local directory in which we'll build the standalone install. I'll simply call it myproject
from now on.
You should of course have a decent C/C++ compiler (ie up-to-date gcc
or clang
suite).
You should install cmake
, gfortran
, LAPACK
, BLAS
, ATLAS
and ARPACK
:
sudo apt-get install cmake cmake-gui gfortran
sudo apt-get install liblapack-dev libblas-dev libatlas-base-dev libarpack2-dev libarpack++2-dev
Note that because we're going to use OpenBLAS, it is not necessary to install BLAS
or ATLAS
. If you want to install them anyway (you might not always want to use OpenBLAS for some reason):
sudo apt-get install libblas-dev libatlas-base-dev