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

MKL Sparse BLAS segfaults due to integer overflow

Alexander_G_2
Beginner
406 Views

Hello

I am a very recent user of Intel MKL. I was trying to use Sparse BLAS library (Inspector/Executor routines), when I ran into an obscure segfault. The segfault appeared in CSR matrix transpose operations, and only when the number of rows was large enough (roughly 100M). Here is a more detailed description that I posted on stackoverflow.com: http://stackoverflow.com/questions/37395541/mkl-sparse-blas-segfault-when-transposing-csr-with-100m-rows .

Eventually I was able to track it down to obvious integer overflow, while computing memory size for malloc (number of rows is getting multiplied by the number of threads, which was 32 in my case).

It took me a couple of days, so I keep wondering

  1. Did I miss some relevant part of MKL documenation? An explanation about maximum feasible number of rows in a sparse matrix seems essential. Spending time to figure it out from gdb disas somehow doesn't feel right.
  2. Regardless, it sure feels like a bug. I would expect mkl_sparse_convert_csr to return an error status instead of crashing. 

Is it a known issue? Are there any other known limits here that I should be aware of?

0 Kudos
2 Replies
Gennady_F_Intel
Moderator
406 Views

Alexander, thanks for the issue. We will check this on our side, but meantime, could you try ILP64 API? 

0 Kudos
Gennady_F_Intel
Moderator
406 Views

Alexander, I see ( http://stackoverflow.com/questions/37395541/mkl-sparse-blas-segfault-when-transposing-csr-with-100m-rows ) one  of my colleague, have checked the problem with latest 11.3.2 and recommended to play with ILP64 also. 

0 Kudos
Reply