[Numpy-discussion] Building numpy with OpenBLAS

Bradley M. Froehle brad.froehle at gmail.com
Fri Dec 14 12:10:15 EST 2012


Hi Sergey: 

I recently ran into similar problems with ACML.

See an original bug report (https://github.com/numpy/numpy/issues/2728) & documentation fix (https://github.com/numpy/numpy/pull/2809).

Personally, I ended up using a patch similar to https://github.com/numpy/numpy/pull/2751 to force NumPy to respect site.cfg (so that I could put the libacml in the [blas_opt] & [lapack_opt] sections).  But this seems unlikely to get merged into NumPy as it changes the behavior of site.cfg.  Instead I think we should discuss adding a "have cblas" flag of some sort to the [blas] section so that the user can still get _dotblas to compile.

-Brad 


On Friday, December 14, 2012 at 1:17 AM, Sergey Bartunov wrote:

> Hi. I'm trying to build numpy (1.6.2 and master from git) with
> OpenBLAS on Ubuntu server 11.10.
> 
> I succeed with this just once and performance boost was really big for
> me, but unfortunately something went wrong with my application and I
> had to reinstall numpy. After that I couldn't reproduce this result
> and even just perform faster than default numpy installation with no
> external libraries anyhow.
> 
> Now things went even worse. I assume that numpy built with BLAS and
> LAPACK should do dot operation faster than "clean" installation on
> relatively large matirces (say 2000 x 2000). Here I don't use OpenBLAS
> anyway.
> 
> I install libblas-dev and liblapack-dev by apt-get and after that
> build numpy from sources / by pip (that doesn't matter for the
> result). Building tool reports that BLAS and LAPACK are detected on my
> system, so says "numpy.distutils.system_info" after installation. But
> matrix multiplication by dot takes the same time as clean installation
> (12 s vs 0.16 s with OpenBLAS). That's the first thing I'm wondering
> about.
> 
> Nevertheless I tried to compile numpy with OpenBLAS only. I have
> forced this by setting ATLAS="" BLAS=/usr/lib/libopenblas.a
> LAPACK=/usr/lib/libopenblas.a as I saw somewhere in the internet. I
> had installed numpy exactly this way at the first time when I was
> lucky. But now it doesn't work for me. I tryied installing OpenBLAS
> from sources and as libopenblas-dev ubuntu package.
> 
> So how can I fix this? Many thanks in advance.
> _______________________________________________
> NumPy-Discussion mailing list
> NumPy-Discussion at scipy.org (mailto:NumPy-Discussion at scipy.org)
> http://mail.scipy.org/mailman/listinfo/numpy-discussion






More information about the NumPy-Discussion mailing list