Cytnx icon indicating copy to clipboard operation
Cytnx copied to clipboard

MKL Error when cytnx is imported

Open lovelycakery opened this issue 1 year ago • 2 comments

If I import Cytnx installed in conda, the following code will raise MKL Error. Note that no Cytnx function is used.

import sys
import cytnx
import numpy as np

A = np.ones((2,2))
U,S,V = np.linalg.svd(A)

The error message is

Intel MKL ERROR: Parameter 12 was incorrect on entry to DGBBRDM.

Intel MKL ERROR: Parameter 10 was incorrect on entry to DGESDD.
init_gesdd failed init

If I import Cytnx installed from source, I do not have this error.

lovelycakery avatar Apr 17 '24 02:04 lovelycakery

What is the version of MKLs in each case?

yingjerkao avatar Apr 23 '24 03:04 yingjerkao

In conda, here is the output of MKL version in python:

>>> import mkl
>>> mkl.get_version_string()
'Intel(R) oneAPI Math Kernel Library Version 2023.2-Product Build 20230613 for Intel(R) 64 architecture applications'

and again in conda, this is the output of conda list | grep mkl

blas                      1.0                         mkl  
libblas                   3.9.0            19_linux64_mkl    conda-forge
libcblas                  3.9.0            19_linux64_mkl    conda-forge
liblapack                 3.9.0            19_linux64_mkl    conda-forge
mkl                       2023.2.0         h84fe81f_50495    conda-forge
mkl-include               2023.2.0         h84fe81f_50495    conda-forge
mkl-service               2.4.0            py39h5eee18b_1  
mkl_fft                   1.3.8            py39h5eee18b_0  
mkl_random                1.2.4            py39hdb19cb5_0

Without conda, this is the MKL version:

>>> import mkl
>>> mkl.get_version_string()
'Intel(R) oneAPI Math Kernel Library Version 2023.1-Product Build 20230303 for Intel(R) 64 architecture applications'

lovelycakery avatar Apr 23 '24 07:04 lovelycakery