[Numpy-discussion] OpenBLAS on Mac

Jurgen Van Gael jurgen.vangael at gmail.com
Fri Feb 21 04:57:24 EST 2014

First thing I noticed when installing into /opt/OpenBLAS was that the
LAPACK header files were not being copied properly. This was because the
OpenBLAS makefile uses the "-D" option in the install command which the
default Mac install doesn't support. A quick "brew install coreutils"
solved that problem.

I rebuilt a new virtualenv and rebuilt numpy into it using the OpenBLAS in
/opt/OpenBLAS and things seem to be absolutely fine now. I can run the
OpenBLAS version on my mac. Thanks for the suggestions!

I ran the test:

On my Macbook Pro (Intel(R) Core(TM) i7-2720QM CPU @ 2.20GHz, 8GB Ram)
the Atlas version gives consistent 0.02,
the OpenBLAS version runs in 0.1 with OMP_NUM_THREADS=1 and 0.04 with

Happy to run a more extensive test suite if anyone is interested.


On Thu, Feb 20, 2014 at 6:07 PM, Olivier Grisel <olivier.grisel at ensta.org>wrote:

> I have exactly the same setup as yours and it links to OpenBLAS
> correctly (in a venv as well, installed with python setup.py install).
> The only difference is that I installed OpenBLAS in the default
> folder: /opt/OpenBLAS (and I reflected that in site.cfg).
> When you run otool -L, is it in your source tree or do you point to
> the numpy/core/_dotblas.so of the site-packages folder of your venv?
> If you activate your venv, go to a different folder (e.g. /tmp) and type:
> python -c "import numpy as np; np.show_config()"
> what do you get? I get:
> $ python -c "import numpy as np; np.show_config()"
> lapack_opt_info:
>     libraries = ['openblas', 'openblas']
>     library_dirs = ['/opt/OpenBLAS/lib']
>     language = f77
> blas_opt_info:
>     libraries = ['openblas', 'openblas']
>     library_dirs = ['/opt/OpenBLAS/lib']
>     language = f77
> openblas_info:
>     libraries = ['openblas', 'openblas']
>     library_dirs = ['/opt/OpenBLAS/lib']
>     language = f77
> blas_mkl_info:
> --
> Olivier
> _______________________________________________
> NumPy-Discussion mailing list
> NumPy-Discussion at scipy.org
> http://mail.scipy.org/mailman/listinfo/numpy-discussion
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/numpy-discussion/attachments/20140221/008f1c03/attachment.html>

More information about the NumPy-Discussion mailing list