-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update pychm_singuarity build to add MKL library #26
Comments
notes from another user installing scipy/numpy with mkl |
So here are some better instructions which work without need root or creating random files. First you have to download the MKL library from Intel. I had to register at https://registrationcenter.intel.com/en/forms/?productid=2558&licensetype=2 to be able to download the MKL installer for Linux (interestingly enough the yum repo doesn't require registration to use but the installer does...). It's also a very large download (885 MB). After downloading:
Several environmental variables will be needed:
(the Then numpy/scipy can be installed as follows:
(if it is already installed this will not re-install it, may need to do a To make sure that numpy and scipy are using MKL instead of OpenBLAS you can do the following:
And the output should be something like:
If the |
@coleslaw481 Nice little guide but I think it is a bit out of date and the above doesn't require creating some random file anymore and allows everything to be done with alternative paths (given |
Ha - out of date - it was posted 7 days ago. But that silly .numpy-site.cfg file is not necessary and pip is definitely the way to go with installing instead of using setup.py manually. One possible improvement in theirs is the following definitions before compiling numpy/scipy:
However some of these seem like they would be unnecessary:
|
So |
I have confirmed that if you do the following before doing the
The Also I included the OpenMP stuff since it doesn't hurt. |
MKL has a Yum-compatible repo, I just tried it out and it works on my machine at home where I have root access: https://software.intel.com/en-us/articles/installing-intel-free-libs-and-python-yum-repo
After getting the repo up and installing intel-mkl-64-bit-2017 I had to change the environmental variables:
export LD_LIBRARY_PATH=/opt/intel/:$LD_LIBRARY_PATH
and create the file ~/.numpy-site.cfg with the contents:
[mkl]
library_dirs = /opt/intel/mkl/lib/intel64
include_dirs = /opt/intel/mkl/include
mkl_libs = mkl_rt
lapack_libs =
pip install --no-binary :all: numpy scipy
makes numpy and scipy use the MKL. The file ~/.numpy-site.cfg can then be deleted but you must always set the LD_LIBRARY_PATH or import numpy will fail.
The text was updated successfully, but these errors were encountered: