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

mkl_sparse_z_create_csr. How to delete matrix handle

marcsolal
Beginner
608 Views

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 Kudos
5 Replies
VidyalathaB_Intel
Moderator
576 Views

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.

 

0 Kudos
marcsolal
Beginner
562 Views

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

0 Kudos
VidyalathaB_Intel
Moderator
525 Views

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.

 

0 Kudos
marcsolal
Beginner
510 Views

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

Thanks.

0 Kudos
VidyalathaB_Intel
Moderator
481 Views

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.


0 Kudos
Reply