This is an old revision of the document!

Table of Contents


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:

This procedure has been done on Server: rose

  • sudo apt-get install git python-dev gfortran


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/


Update system with new library path!

sudo ldconfig


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
include_dirs = /opt/openblas/include
library_dirs = /opt/openblas/lib
openblas_libs = openblas
library_dirs = /opt/openblas/lib
lapack_libs = openblas
library_dirs = /opt/openblas/lib

Now run:

 python config
 python build --fcompiler=gnu95

If all configured without errors, finally install it!

 python install
/var/www/ · Last modified: 2019/01/16 10:03 (external edit)
CC Attribution-Share Alike 4.0 International
Driven by DokuWiki Recent changes RSS feed Valid CSS Valid XHTML 1.0