User Tools

Site Tools


public:openblas

This is an old revision of the document!


Table of Contents

OpenBLAS

Multiprocessing python code can work very slow (with linear equations) on multicore machines when numpy linked to the wrong blas library.
Here is the link how to install OpenBLAS and numpy in a proper way to speed up the performance:

https://hunseblog.wordpress.com/2014/09/15/installing-numpy-and-openblas/

This procedure has been done on Server: rose

  • sudo apt-get install git python-dev gfortran

OpenBLAS

To install OpenBLAS, do the following commands

  1. cd ~/src
  2. cd OpenBLAS
  3. make FC=gfortran
  4. sudo make PREFIX=/opt/openblas install

Need to tell the system about the new library; create config file and insert the path to new library!

vi /etc/ld.so.conf.d/openblas.conf

/opt/openblas/lib

Update system with new library path!

sudo ldconfig

Numpy

Install Numpy

  1. cd ~/src
  2. cd ~/numpy

By default, the repository will be on the current development (master) branch. I prefer to use the latest stable branch. To find this, type git checkout v and press Tab.

  • git checkout v1.11.1

Add a config file site.cfg

  vi site.cfg
[default]
include_dirs = /opt/openblas/include
library_dirs = /opt/openblas/lib
 
[openblas]
openblas_libs = openblas
library_dirs = /opt/openblas/lib
 
[lapack]
lapack_libs = openblas
library_dirs = /opt/openblas/lib

Now run:

 python setup.py config
 python setup.py build --fcompiler=gnu95
 

If all configured without errors, finally install it!

 python setup.py install
/data/www/wiki.inf.unibz.it/data/attic/public/openblas.1470143164.txt.gz · Last modified: 2019/01/16 10:03 (external edit)