written in front
The author's operating environment: Ubuntu20.04
1. Problem description
The following error occurs when running the python program:
INTEL MKL ERROR: /lib/x86_64-linux-gnu/libmkl_avx2.so: undefined symbol: mkl_sparse_optimize_bsr_trsm_i8.
Intel MKL FATAL ERROR: Cannot load libmkl_avx2.so or libmkl_def.so.
Two, the solution
# 在代码开头写下
import mkl
mkl.get_max_threads()
If an error occurs:
ModuleNotFoundError: No module named 'mkl'
Please refer to the blog to run the python program ModuleNotFoundError: No module named 'mkl' solution
After solving the error, just run it again~~
reference link
[1] In.Z. Faiss undefined symbol appears when running faiss: mkl_sparse-optimize_bsr_trsm_i8 [EB/OL]. https://blog.csdn.net/acm_cxq/article/details/111358509, 2020-12-18/2023- 01-16.