Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Beginner
8 Views

Delete data fitting task seems to fail clearing internal memory

Jump to solution

Hi,

I have observed that deleting an interpolation task by dfDeleteTask doesn't affect the number of allocated buffers (using mkl_mem_stat). Is this an expected behaviour? According to the manual of dfDeleteTask I expect the deallocation owned by the task.

To explain this I have attached code which is an adapted example taken from https://software.intel.com/en-us/node/522217. I have executed the attached example with icpc version 17.0.0.

Thank you very much for helpful comments.

 

0 Kudos

Accepted Solutions
Highlighted
8 Views

Hi Mario,
Data Fitting component of Intel MKL internally relies on use of the Intel MKL memory allocator.
To improve the performance of the Intel MKL based application, the allocator uses memory pools where buffers can be collected for fast re-use.
You should call  mkl_free_buffers() routine, that frees unused memory allocated  by the memory allocator, after the last call to the library’s functions.
Please, see additional details on mkl_free_buffers() routine at https://software.intel.com/en-us/node/522136
You may want to check the status of Intel MKL memory allocator by calling the mkl_mem_stat() routine before and after call the call to mkl_free_buffers() routine.

Best regards,
Vlad V.

 

View solution in original post

0 Kudos
2 Replies
Highlighted
9 Views

Hi Mario,
Data Fitting component of Intel MKL internally relies on use of the Intel MKL memory allocator.
To improve the performance of the Intel MKL based application, the allocator uses memory pools where buffers can be collected for fast re-use.
You should call  mkl_free_buffers() routine, that frees unused memory allocated  by the memory allocator, after the last call to the library’s functions.
Please, see additional details on mkl_free_buffers() routine at https://software.intel.com/en-us/node/522136
You may want to check the status of Intel MKL memory allocator by calling the mkl_mem_stat() routine before and after call the call to mkl_free_buffers() routine.

Best regards,
Vlad V.

 

View solution in original post

0 Kudos
Highlighted
Beginner
8 Views

Hi Vlad,

thanks for this useful hint!

I hoped to use mkl_mem_stat to detect memory leaks in my code. This implies that the information provided by mkl_mem_stat is useless this case.

Best regards,
Mario

0 Kudos