I am trying to install numpy with OpenBLAS , however I am at loss as to how the site.cfg file needs to be written.

When the installation procedure was followed the installation completed without errors, however there is performance degradation on increasing the number of threads used by OpenBLAS from 1 (controlled by the environment variable OMP_NUM_THREADS).

I am not sure if the OpenBLAS integration has been perfect. Could any one provide a site.cfg file to achieve the same.

P.S.: OpenBLAS integration in other toolkits like Theano, which is based on Python, provides substantial performance boost on increasing the number of threads, on the same machine.

When you say that there was a performance degradation, are you sure that the problem was big enough to warrant the additional threads? For too small problems you will cause performance degradation when using extra threads, and I don't know if openblas is smart enough to only use extra threads when they are useful.
– DavePJul 12 '12 at 7:54

In order to check for variation of performance with the size of the problem I tried using the numpy.linalg.svd function on randomly generated matrices of various sizes, (100x100, 100x1000, 1000x1000, 1000x10000,10000x10000) but in all these cases the best execution times are achieved with single thread in openblas. Even for heavy computation load (e.g. 10000x10000 matrix SVD) the single thread takes 5000 secs while 3 threads take 6000 seconds. This worries me a bit, I just want to check if the openblas integration is right.
– VijayJul 12 '12 at 19:48

There seems to be a noticeable improvement in performance for higher thread counts. However, I haven't tested this very systematically, and it's likely that for smaller matrices the additional overhead would outweigh the performance benefit from a higher thread count.

I have following line even I do strictly what you typed above answer. libopenblas.so.0 => /usr/lib/libopenblas.so.0 (0x00007f77e08fc000)
– erogolJan 30 '14 at 18:06

One more question. Is openBlas depended to OpenMPI or using it increases the performance?
– erogolJan 30 '14 at 22:54

1

In 2015, I had a few problems with the suggested steps here. I found this to work better.
– Felipe AlmeidaJun 25 '15 at 4:27

2

@Afshin - If not a sudo user, best thing it to alter the first step sudo make PREFIX=/opt/OpenBLAS install to use a prefix with a location in your own home directory (e.g. make PREFIX=/home/your_username/my_software/), which then should allow you to run the ldconfig command for your own files.
– n1k31t4Apr 16 '17 at 5:21