Intel® DevCloud
Help for those needing help starting or connecting to the Intel® DevCloud

Intel MKL FATAL ERROR: Cannot load libmkl_avx512.so or libmkl_def.so.

virtualdvid
Innovator
6,591 Views

I'm getting this error:

Intel MKL FATAL ERROR: Cannot load libmkl_avx512.so or libmkl_def.so.

It seems it is numpy issue but updating the library is not working.

0 Kudos
1 Solution
ChithraJ_Intel
Moderator
6,591 Views

Hi,

Could you please try out the below steps.

Step 1: Create a conda environment and activate the environment as

conda create -n env_face -c intel python=3.6
source activate env_face

Step 2: Uninstall the existing numpy package

pip uninstall numpy

Step 3: Install intel-numpy using pip

pip install intel-numpy

Now, in python shell, import the face_recognition package

python
import face_recognition

Hope it will resolve your issue.

View solution in original post

0 Kudos
6 Replies
ChithraJ_Intel
Moderator
6,591 Views

Hi,

Thanks for reaching out to us.

Could you please let us know the steps you have followed.

Kindly attach the screenshots, so that we can try it from our end.

0 Kudos
virtualdvid
Innovator
6,591 Views

Sure!

Steps:

  1. qsub -I        (to start a job)
  2. conda create -n my_env python=3.5 -y
  3. conda activate my_env
  4. pip install face_recognition --user        (I used the `user` flag since I was getting a user error see bellow)
  5. python
  6. import face_recognition
  7. error

I found the libraries in several places:

# export LD_LIBRARY_PATH=/glob/intel-python/versions/2018u2/intelpython3/lib:${LD_LIBRARY_PATH}
# export LD_LIBRARY_PATH=/glob/intel-python/versions/2019u1/intelpython3/lib:${LD_LIBRARY_PATH}
# export LD_LIBRARY_PATH=/glob/intel-python/versions/2019u2/intelpython3/lib:${LD_LIBRARY_PATH}
# export LD_LIBRARY_PATH=/glob/intel-python/versions/2019u3/intelpython3/lib:$LD_LIBRARY_PATH
export LD_LIBRARY_PATH=/home/u14913/.conda/envs/face/lib/:$LD_LIBRARY_PATH

also did:

export LD_PRELOAD=/home/u14913/.conda/envs/face/lib/libmkl_avx512.so python -c 'import face_recognition'

also followed this post: anaconda mkl

Nothing worked so far

####

########################################################################
#      Date:           Mon Jan 13 23:48:37 PST 2020
#    Job ID:           463052.v-qsvr-1.aidevcloud
#      User:           uXXXXX
# Resources:           neednodes=1:batch:ppn=2,nodes=1:batch:ppn=2,walltime=06:00:00
########################################################################

(base) uXXXXX@s001-n105:~$ conda activate my_env
(my_env) uXXXXX@s001-n105:~$ python
Python 3.6.3 |Intel Corporation| (default, Feb 12 2018, 06:37:09)
[GCC 4.8.2 20140120 (Red Hat 4.8.2-15)] on linux
Type "help", "copyright", "credits" or "license" for more information.
Intel(R) Distribution for Python is brought to you by Intel Corporation.
Please check out: https://software.intel.com/en-us/python-distribution
>>> import face_recognition
Intel MKL FATAL ERROR: Cannot load libmkl_avx512.so or libmkl_def.so.
(my_env) u14913@s001-n105:~$

 

#### User error #####

(my_env) uXXXXX@s001-n105:~$ pip install face_recognition
Collecting face_recognition
  Using cached https://files.pythonhosted.org/packages/3f/ed/ad9a28042f373d4633fc8b49109b623597d6f193d3bbbef7780a5ee8eef2/face_recognition-1.2.3-py2.py3-none-any.whl
Collecting Click>=6.0 (from face_recognition)
  Using cached https://files.pythonhosted.org/packages/fa/37/45185cb5abbc30d7257104c434fe0b07e5a195a6847506c074527aa599ec/Click-7.0-py2.py3-none-any.whl
Collecting numpy (from face_recognition)
  Using cached https://files.pythonhosted.org/packages/62/20/4d43e141b5bc426ba38274933ef8e76e85c7adea2c321ecf9ebf7421cedf/numpy-1.18.1-cp36-cp36m-manylinux1_x86_64.whl
Collecting my_env-recognition-models>=0.3.0 (from face_recognition)
Collecting Pillow (from face_recognition)
  Using cached https://files.pythonhosted.org/packages/19/5e/23dcc0ce3cc2abe92efd3cd61d764bee6ccdf1b667a1fb566f45dc249953/Pillow-7.0.0-cp36-cp36m-manylinux1_x86_64.whl
Collecting dlib>=19.7 (from face_recognition)
Installing collected packages: Click, numpy, my_env-recognition-models, Pillow, dlib, my_env-recognition
Exception:
Traceback (most recent call last):
  File "/home/uXXXXX/.local/lib/python3.6/site-packages/pip/basecommand.py", line 215, in main
    status = self.run(options, args)
  File "/home/uXXXXX/.local/lib/python3.6/site-packages/pip/commands/install.py", line 342, in run
    prefix=options.prefix_path,
  File "/home/uXXXXX/.local/lib/python3.6/site-packages/pip/req/req_set.py", line 784, in install
    **kwargs
  File "/home/uXXXXX/.local/lib/python3.6/site-packages/pip/req/req_install.py", line 851, in install
    self.move_wheel_files(self.source_dir, root=root, prefix=prefix)
  File "/home/uXXXXX/.local/lib/python3.6/site-packages/pip/req/req_install.py", line 1064, in move_wheel_files
    isolated=self.isolated,
  File "/home/uXXXXX/.local/lib/python3.6/site-packages/pip/wheel.py", line 345, in move_wheel_files
    clobber(source, lib_dir, True)
  File "/home/uXXXXX/.local/lib/python3.6/site-packages/pip/wheel.py", line 316, in clobber
    ensure_dir(destdir)
  File "/home/uXXXXX/.local/lib/python3.6/site-packages/pip/utils/__init__.py", line 83, in ensure_dir
    os.makedirs(path)
  File "/glob/intel-python/versions/2018u2/intelpython3/lib/python3.6/os.py", line 220, in makedirs
    mkdir(name, mode)
OSError: [Errno 30] Read-only file system: '/glob/intel-python/versions/2018u2/intelpython3/lib/python3.6/site-packages/click'
You are using pip version 9.0.1, however version 19.3.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.

Please use "pip install --user <package>" to install user packages.
Please visit the forums at: https://software.intel.com/en-us/forums/intel-devcloud
(my_env) uXXXXX@s001-n105:~$

 

0 Kudos
ChithraJ_Intel
Moderator
6,591 Views

Hi,

We are also able to reproduce your issue.

We are working on it and let you know the updates later.

0 Kudos
ChithraJ_Intel
Moderator
6,592 Views

Hi,

Could you please try out the below steps.

Step 1: Create a conda environment and activate the environment as

conda create -n env_face -c intel python=3.6
source activate env_face

Step 2: Uninstall the existing numpy package

pip uninstall numpy

Step 3: Install intel-numpy using pip

pip install intel-numpy

Now, in python shell, import the face_recognition package

python
import face_recognition

Hope it will resolve your issue.

0 Kudos
virtualdvid
Innovator
6,591 Views

There we go, it worked. Thank you!

0 Kudos
ChithraJ_Intel
Moderator
6,591 Views

Hi,

Thanks for the confirmation.We are closing the case.

Please feel free to raise a new thread in case if you face any further issues.

0 Kudos
Reply