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

memory leakage using the MKL functions: vsldCorrNewTask1D, vsldCorrExec1D and vslCorrDeleteTask

nh_wulff
Beginner
694 Views
Hi MKL forum

Can anybody hel me:

I am using the following routine to calculate the correlation between the two arrays x and y:

int intel_corr(double *h, int inch, double *x, int incx, double *y, int incy, int nh, int nx, int ny){

int status;

VSLConvTaskPtr task;

vsldCorrNewTask1D(&task,VSL_CONV_MODE_AUTO,ny,nx,nh);

status = vsldCorrExec1D(task,y,incy,x,incx,h,inch);

vslCorrDeleteTask(&task);

return status;

}/* intel_corr */

The routine works perfectly and is indeed very fast (much faster than the Numerical Recipes routines).

However, it seems that the function hasa little memory leakage. It is quite small and I can actually live with it, but maybe you guys can tell me if I use the above MKL functions wrongly?

Best regards

Niels

0 Kudos
8 Replies
Gennady_F_Intel
Moderator
694 Views
We had the similar problem in the previous version of MKL and it has been already fixed. The fix available in MKL 10.2.
What MKL version you are using?
--Gennady
0 Kudos
nh_wulff
Beginner
694 Views
We had the similar problem in the previous version of MKL and it has been already fixed. The fix available in MKL 10.2.
What MKL version you are using?
--Gennady

Hi Gennady

Thanks for the answer. I am using ver 9.0 so I gues I just have to upgrade!

Again thanks a lot and have a nice day
Niels
0 Kudos
barragan_villanueva_
Valued Contributor I
694 Views

Hi Niels,

Could you please sendus detailsabout sizes used by you (and small test-case) when memory leak was detected?

Thanks
-- Victor
0 Kudos
nh_wulff
Beginner
694 Views

Hi Niels,

Could you please sendus detailsabout sizes used by you (and small test-case) when memory leak was detected?

Thanks
-- Victor

0 Kudos
nh_wulff
Beginner
694 Views

Hi Niels,

Could you please sendus detailsabout sizes used by you (and small test-case) when memory leak was detected?

Thanks
-- Victor

Hi Victor
I only saw your question today.

The code in the attached file should demonstrate the memory leak.

best
Niels



0 Kudos
barragan_villanueva_
Valued Contributor I
694 Views
Quoting - nh_wulff

Hi Victor
I only saw your question today.

The code in the attached file should demonstrate the memory leak.

best
Niels




Niels,

Thank you for the test case! BTW, did you try it with the latest MKL 10.2.2?

-- Victor

0 Kudos
barragan_villanueva_
Valued Contributor I
694 Views

Niels,

Using valgrind 3.5.0 and MKL 10.2.2, I have on your test-case:

==20378== HEAP SUMMARY:
==20378== in use at exit: 0 bytes in 0 blocks
==20378== total heap usage: 0 allocs, 0 frees, 0 bytes allocated
==20378==
==20378== All heap blocks were freed -- no leaks are possible

So, please upgrade your MKL.

-- Victor
0 Kudos
nh_wulff
Beginner
694 Views

Niels,

Thank you for the test case! BTW, did you try it with the latest MKL 10.2.2?

-- Victor

No, I have not got that version yet (I think that I will look into that sometime next year).

best
Niels
0 Kudos
Reply