Intel® oneAPI Math Kernel Library
Ask questions and share information with other developers who use Intel® Math Kernel Library.
7069 Discussions

segmentation fault when mkl_sparse_d_mv for sparse matrix with many nonzeros

qiu__jiezhong
Beginner
1,513 Views

Hi,

I am computing y=Ax (mkl_sparse_d_mv) for a 81,000 x 81,000 sparse matrix A (csr format) with 2.3*10^9 nnzs, but MKL produce segmentation fault.

The sparse matrix is dumped from another program. I first read it from disk, and then call mkl_sparse_d_create_csr to create the matrix. mkl_sparse_d_create_csr returns SPARSE_STATUS_SUCCESS. But when I move to mkl_sparse_d_mv, it shows me segmentation fault.

My another observation is that when I decrease #nnz to be 1.5*10^9, MKL can finish the computation successfully.

My hypothesis is that MKL 2.3*10^9 > 2^31, and MKL may have constraints on #nnz in a sparse matrix.

Any help would be appreciated. Thanks!

Env: Linux, parallel_studio_xe_2019_update4.

0 Kudos
1 Solution
MariaZh
Employee
1,513 Views

Hi!
Can you please try ILP64 interface for MKL? 
(https://software.intel.com/en-us/mkl-linux-developer-guide-using-the-ilp64-interface-vs-lp64-interface)

I believe it may help in your case, as number of nonzero elements is indeed big.

Best regards,
Maria

View solution in original post

0 Kudos
3 Replies
MariaZh
Employee
1,514 Views

Hi!
Can you please try ILP64 interface for MKL? 
(https://software.intel.com/en-us/mkl-linux-developer-guide-using-the-ilp64-interface-vs-lp64-interface)

I believe it may help in your case, as number of nonzero elements is indeed big.

Best regards,
Maria

0 Kudos
qiu__jiezhong
Beginner
1,513 Views

Zhukova, Maria (Intel) wrote:

Hi!
Can you please try ILP64 interface for MKL? 
(https://software.intel.com/en-us/mkl-linux-developer-guide-using-the-ilp...)

I believe it may help in your case, as number of nonzero elements is indeed big.

Best regards,
Maria

 

Yes, it helps. Thanks a lot!!!

0 Kudos
Reply