- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I can "optionally" break my computation (that calls MKL) into multiple threads using BOOST::threads. Or I execute the a single "worker" routine from the main thread.
I am finding that MKL is not freeing memory in the situation where I use boost::threads ( these map to standard windows thread objects)
The basic loop is
LOOP i= 1..N
CREATE <n> THREADS TO SOLVE PROBLEM <i>
PRINT MKL_MEM_STATS
END LOOP
When running multiple threads that call MKL I see ( using mkl_mem_stat), after each set of threads has run to completion.
mkl_mem_stat:36077592 buffers 13
mkl_mem_stat:65724824 buffers 21
mkl_mem_stat:95372056 buffers 29
mkl_mem_stat:125019288 buffers 37
mkl_mem_stat:154666520 buffers 45
mkl_mem_stat:184313752 buffers 53
mkl_mem_stat:213960984 buffers 61
mkl_mem_stat:243608216 buffers 69
mkl_mem_stat:273255448 buffers 77
mkl_mem_stat:302902680 buffers 85
mkl_mem_stat:332549912 buffers 93
When calling the identical computational code using only the main thread I see
mkl_mem_stat:14823616 buffers 4
mkl_mem_stat:14823616 buffers 4
mkl_mem_stat:14823616 buffers 4
mkl_mem_stat:14823616 buffers 4
mkl_mem_stat:14823616 buffers 4
mkl_mem_stat:14823616 buffers 4
......
Note this is memory use by MKL. This is not a leak in my code, these are INTERNAL MKL memory allocations, that occur as below.
msvcrt!malloc+70
mkl_mc3!mkl_serv_allocate+3ea
mkl_mc3!mkl_blas_xzgemm3m+5f7
mkl_core!mkl_blas_xzgemm3m+c5
mkl_intel_thread!mkl_blas_zgemm3m+46c7
libiomp5md!_kmp_invoke_microtask+8c
libiomp5md!_kmp_fork_call+9d87
libiomp5md!_kmp_fork_call+10f4
libiomp5md!_kmpc_fork_call+6c
mkl_intel_thread!mkl_blas_zgemm3m+df9
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page