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

SVD memory spike

tinastone
Beginner
168 Views
Hi there,

I am using MKL for it SVD functionality in a C++ program. I notice a huge memory spike towards the end of computing the SVD. This is sometimes causing crashes, slowdowns, etc, when swapping occurs.

my code call is the following:
info = LAPACKE_sgesvd(LAPACK_ROW_MAJOR, 'S', 'S', m, n, src, n, s, u, m, vt, n, superb);

My computer is a Dell Precision T7500 with 2 Xeon E5645 CPUs. Hyperthreading is enabled. I have 12 GB system RAM.

My testing dataset is 150x190x1340 (real, single precision), which I "flatten" into 28500x1340. This uses very little memory (perhaps some few hundreds of MB) for most of the computing time for the SVD. However, there is a brief spike to more than 6 GB usage. What is causing this huge spike? Is there some way I can avoid it? It is limiting the data set size that I can use.

0 Kudos
2 Replies
Gennady_F_Intel
Moderator
168 Views
did you check whatmkl_mem_stat( buf) returns in this case?
tinastone
Beginner
168 Views
Excellent, I'm very happy to know about this tool. The problem was elsewhere in my code. Thank you for pointing me to this function.
Reply