After upgrading numpy no longer links to MKL

0 views
Skip to first unread message

Alexander Botev

unread,
Jun 25, 2017, 12:50:26 AM6/25/17
to conda - Public
So anaconda forced me to update my numpy version to 1.11 so that it can install scipy:

alex@alex-work:~/work/python$ conda install scipy
Fetching package metadata ...........
Solving package specifications: .

Package plan for installation in environment /opt/anaconda3:

The following NEW packages will be INSTALLED:

    blas:         1.1-openblas       conda-forge
    openblas:     0.2.19-2           conda-forge

The following packages will be UPDATED:

    numpy:        1.11.3-py36_0                  --> 1.11.3-py36_blas_openblas_200      conda-forge [blas_openblas]
    scikit-learn: 0.18.1-np111py36_1             --> 0.18.2-np111py36_blas_openblas_200 conda-forge [blas_openblas]
    scipy:        0.18.1-np111py36_1             --> 0.19.1-np111py36_blas_openblas_200 conda-forge [blas_openblas]

Proceed ([y]/n)? y

However, I don't want to use the openblas as it is 10x slower than MKL on my Xeon as MKL has various optimizations for it and I have benchmarked it.
Before this numpy was linking to MKL, but now:

>>> np.__config__.show()
blas_mkl_info:
  NOT AVAILABLE
openblas_info:
    libraries = ['openblas', 'openblas']
    library_dirs = ['/opt/anaconda3/lib']
    language = c
    define_macros = [('HAVE_CBLAS', None)]
blas_opt_info:
    libraries = ['openblas', 'openblas']
    library_dirs = ['/opt/anaconda3/lib']
    language = c
    define_macros = [('HAVE_CBLAS', None)]
openblas_lapack_info:
    libraries = ['openblas', 'openblas']
    library_dirs = ['/opt/anaconda3/lib']
    language = c
    define_macros = [('HAVE_CBLAS', None)]
lapack_opt_info:
    libraries = ['openblas', 'openblas']
    library_dirs = ['/opt/anaconda3/lib']
    language = c
    define_macros = [('HAVE_CBLAS', None)]

 How can I go back to my original numpy with MKL and ditch the openblas and I want my scipy to come with it.

Ilan Schnell

unread,
Jun 25, 2017, 1:20:15 AM6/25/17
to Alexander Botev, conda - Public
The problem appears to be that you have the conda-forge channel in your configuration.  Therefore the conda-forge (which does not support MKL) version of numpy is getting picked up, instead of the numpy from the default channel.  The following command will tell you the channel configuration:
$ conda info

- Ilan

--
You received this message because you are subscribed to the Google Groups "conda - Public" group.
To unsubscribe from this group and stop receiving emails from it, send an email to conda+un...@continuum.io.
To post to this group, send email to co...@continuum.io.
Visit this group at https://groups.google.com/a/continuum.io/group/conda/.
To view this discussion on the web visit https://groups.google.com/a/continuum.io/d/msgid/conda/a07ffe30-986e-40f6-813a-05681e56336a%40continuum.io.
For more options, visit https://groups.google.com/a/continuum.io/d/optout.

Alexander Botev

unread,
Jun 25, 2017, 1:22:23 AM6/25/17
to conda - Public, bot...@gmail.com
Thanks for the fast reply!
Yes that seems to be the problem, how can I reorder the channels priorities?

PS: Also, my original message might have been a bit out of tone, but at 6am this was really getting under my nerves, so I apologise for that.

Ilan Schnell

unread,
Jun 25, 2017, 1:26:12 AM6/25/17
to Alexander Botev, conda - Public
You can simply edit the file ~/.condarc.  The "conda info" command actually shows you which configuration file is used.

- Ilan

Reply all
Reply to author
Forward
0 new messages