Intel® oneAPI Math Kernel Library
Ask questions and share information with other developers who use Intel® Math Kernel Library.
7291 ディスカッション

mkl_sparse_z_create_csr. How to delete matrix handle

marcsolal
ビギナー
2,768件の閲覧回数

I am fighting with memory leaks in some sparse matrix code. It looks I have some memory leak which is linked to the creation (or non destruction) of a matrix handle. I  have some very simple questions. I could not find an answer in the documentation, so I am asking here. Here is the question.

I am constructing a sparse matrix using:

 sparse_matrix_t A;
 sparse_status_t ok=mkl_sparse_z_create_csr (&A,SPARSE_INDEX_BASE_ONE,nRows,nCols,ia,ia+1,ja,z);

The handle A is generated for the complex array z and the integer arrays ia and ja. I am trying to understand if the data in the arrays is copied in some new arrays or if the handle A refers to the original arrays. If I remember correctly. A refers to the original arrays but I would like to check. My current code keeps the arrays and does not delete them. 

I am also trying to understand what happens when I destroy the matrix using  the function mkl_sparse_destroy. Assuming arrays ia,ja and z are referred to by the handle, are these arrays deleted when I use mkl_sparse_destroy or do I need to delete them? As you can understand, I am trying to remove memory leaks.

Thanks for helping.

Marc

 

 

 

 

 

 

 


 

0 件の賞賛
5 返答(返信)
VidyalathaB_Intel
モデレーター
2,736件の閲覧回数

Hi Marc,

 

Thanks for reaching out to us.

Could you please confirm if you have priority support?

If yes, we suggest you please post your question on https://supporttickets.intel.com/?lang=en-US

 

Regards,

Vidya.

 

marcsolal
ビギナー
2,722件の閲覧回数

Yes I have priority support. I was thinking this question should interest everybody. Also, I was hoping for a fast response. I used to get very fast responses here. I am posting on priority support.

Thanks

VidyalathaB_Intel
モデレーター
2,685件の閲覧回数

Hi Marc,

 

>>I am posting on priority support.

Could you please confirm if we can close this thread from our end as you are posting this issue on priority support?

 

Regards,

Vidya.

 

marcsolal
ビギナー
2,670件の閲覧回数

You can close if you wish as long as I will get a response from support.

Thanks.

VidyalathaB_Intel
モデレーター
2,641件の閲覧回数

Hi Marc,


>>You can close..

Thanks for the confirmation.

Since you have opened an issue in OSC we are going ahead and closing this issue here considering this as a duplicate query.


Have a Nice Day!


Regards,

Vidya.


返信