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

Memory Leak While Using PARDISO

Alemdar__Bulent
Beginner
280 Views

Hi

I am planning to use PARDISO in one of my (COM) DLL. I am using VS2005 and I have a Quad-core system with Windows XP.I included these libraries in my project settings:

mkl_c.libmkl_solver.liblibguide.lib

I don't see any errors or warnings when compiling and linking. When I run my code in DEBUG version (inside VS2005), the solver returns correct results, but I see memory leaks upon completion of the execution of the code. I tried different combinations of lib files, butitdidn'tsolve theproblem. When I comment out PARDISO calls, I don't see any memory leaks (but I don't think it relates to PARDISO codes).

Any help is appreciated

Regards

Bulent

0 Kudos
2 Replies
Alemdar__Bulent
Beginner
280 Views

Since I haven't received any feedback regarding my problem, I thought I would provide for information about my problem, so it might be helpful for others to diagnose it.

I am using MKL 10.0.3.021 in VS2005, and my computer is a quad-core INTEL based system with windows XP. I wanted to use PARDISO solver,which is going to be called from a COM DLL. I use static linking, andI added these lib filesto my configuration settings:

mkl_c.lib
libiomp5md.lib
mkl_solver.lib

I don't have any compiling or linking error. I am gettingcorrect results from the solver. But,I see memory leaks afterI quitmy program. Just for testing, I directly copied the PARDISO example from the manual (pardiso_sym.c)into my DLL. After I run the code, I still see memory leaks.On the other had, if I create a Windows Console application and pastepardiso_sym.c, it runs OK (no memory leak).Thus, I though I might be using wronglib files, so I tried a few different variation, but still no luck. What lib files I need to include to run the PARDISO(also taking advantage of quad-core system) ?

Anyway, I hope someonepasses me some feedback on thisissue.

Regards

bulent

0 Kudos
Todd_R_Intel
Employee
280 Views
Bulent,

Have you tried MKL_FreeBuffers()? It's documented in the support functions chapter of the manual (online here).

Intel MKL does allocate memory that it keeps around from call to call to improve performance. You can use the function above to free that memory at the end of your program and that might remove the reports of a memory leak. Or you could set the environment variable MKL_DISABLE_FAST_MM to free memory before each MKL function exits. Note that your performance might suffer a little.

Todd
0 Kudos
Reply