Misc

Intel MKL error: undefined symbol: mkl_sparse_optimize_bsr_trsm_i8

Reading Time: < 1 minute

This problem came up when I moved an anaconda environment onto a server that doesn’t have internet, simply by copying over the env folder. This somehow breaks the symbolic link for the library, even though the library is completely in the env folder.

The only solution I that I found working is to set the LD_PRELOAD environment variable to the base anaconda lib folder.

export LD_PRELOAD=~/anaconda3/lib/libmkl_core.so:~/anaconda3/lib/libmkl_sequential.so:~/anaconda3/lib/libmkl_def.so

You may have to include the specific *.so file that is reported in the error message. Apparently MKL library have different versions of the *.so file and it didn’t word the specific version in the env folder.

You can include this in the ~/.bashrc file to it loads up everytime.

Original post in linked here.