FlexiBLAS Installation Instructions

This page provides installation instructions for some common linux distributions. If yours is not among them, you may try adapt one of the below, or simply follow the basic compilation instructions in the README file that comes as part of the source tarball.

Ubuntu / Debian

The easiest way is build a Debian package out of the source and install those one. Therefore you have to install a small set of prerequisites before using

  sudo apt-get update
  
sudo apt-get install debhelper cmake gfortran gcc libatlas-base-dev libopenblas-dev build-essential fakeroot

Afterwards you can build the debian package out of the source code by typing

  fakeroot dpkg-buildpackage -us -uc

inside the extracted source. The build process creates a set of packages which are available one directory level above. They are installed using

  sudo dpkg -i ../libflexiblas-*.deb

After build the package the temporary files created during the build process can be removed via

  debian/rules clean

Caveats

  • If FlexiBLAS is not automatically selected by the update-alternatives mechanism you have to select it via
          sudo update-alternatives --config libblas.so sudo update-alternatives --config libblas.so.3 sudo update-alternatives --config
          libblas.so.3gf
        
    The last one is only necessary upto Ubuntu 12.04 and Debian 6.
  • FlexiBLAS requires that you use the reference implementation of LAPACK that means if update-alternatives uses the LAPACK implementation provided by ATLAS many program will fail. Please install the reference LAPACK package and set it in the update-alternatives mechanism via
          sudo update-alternatives --config liblapack.so sudo update-alternatives --config liblapack.so.3 sudo update-alternatives
          --config liblapack.so.3gf
        
    The last one is only necessary upto Ubuntu 12.04 and Debian 6.
  • Due to a bug in the Ubuntu OpenBLAS packages FlexiBLAS does not work with the OpenBLAS package versions between 0.2.6 and 0.2.8-4. Therefore we provide for Ubuntu 13.10 a backport of OpenBLAS 0.2.8-5 in the prebuild package directory if this package does not work on your system you have to update OpenBLAS by yourself..

Gentoo

Make sure you have the science overlay installed (see here and here for further information) to get the latest versions of BLAS and LAPACK packages. You can either compile the library directly from the source tar-balls, or use our local portage overlay. For the later download the portage.tgz above to your home directory. Then do:

  cd /usr/local/ tar -xvzf ~/portage.tgz

Now add the following to your systems make.conf (usually located in either /etc/ or /etc/portage/)

  # PORTDIR_OVERLAY specifies the location of a local Portage overlay PORTDIR_OVERLAY="${PORTDIR_OVERLAY} /usr/local/portage/"

to register the local overlay. Finally you need to soft unmask the latest BLAS and LAPACK versions from the science overlay and our flexiblas versions in your package.keywords or package.accept_keywords files:

  <sci-libs/flexiblas-99999999 ~x86 sci-libs/blas-reference ~x86 sci-libs/cblas-reference ~x86 sci-libs/lapack-reference
  ~x86 virtual/blas ~x86 virtual/lapack ~x86 virtual/cblas ~x86 sci-libs/gsl ~x86 sci-libs/eselect-cblas ~x86 sci-libs/atlas
  ~x86 sci-libs/gotoblas2 ~x86

Now to install the actual library simply do:

  emerge -av flexiblas

Similarly for the profiling version do

  emerge -av flexiblas-profile

In case you have you have Intels MKL installed you can activate support by adding

  sci-libs/flexiblas mkl

to your /etc/portage/package.use file. After successful installation use eselect blas list, eselect cblas list, and the coresponding set commands to choose flexiblas as your standard BLAS implementation for both Fortran and C access. You may also want to do equery depends cblas blas to find the packages depending on BLAS and recompile/reinstall them using emerge -1 packagename.

Addon Package for GNU Octave

GNU Octave is a Scientific Programming Environment similar to MATLAB. Our FlexiBLAS library can be managed from inside GNU Octave using an Octave Package. The package can be downloaded from https://www2.mpi-magdeburg.mpg.de/mpcsc/software/flexiblas/flexiblas-octave-1.3.0.tar.gz  and installed usign the pkg command from the Octave commandline prompt via:

  pkg install -verbose flexiblas-octave.tar.gz

The installed package is named flexiblas. In order to use this package you either have to link Octave against FlexiBLAS or you have to make sure that FlexiBLAS is selected in the update-alternative system.

Go to Editor View