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

pardiso Memory leak?

Frank_W_1
Beginner
1,041 Views

I feel very puzzled with the Win32 Pardiso version.

My integrated enviroment is Intel(R) Visual Fortran Compiler XE 12.1.7.371.

My matrix has 5 million non zeros ,and n =200,000 , real and symmetric indefinite

 I first test the memory I could use(1022M could be used), then I call pardiso to do the 23 phase,then call pardiso to do the -1 phase;

then I test the memory I could use again,

I fould that only about 700 M Memory that could be used.

What should I do? Theoretically I could use 1022 M Memory again.

This doesnt happen under win64.

Hope for the reply.

Thanks.

 

0 Kudos
7 Replies
Gennady_F_Intel
Moderator
1,041 Views

I am not sure I understand your question: if you call pardiso with -1 phase, then you release all internal data structures and therefore the next time you need to make all steps ( symb. and numeric factorizations and forward / backward computation ) again. in the case if you will not call -1 phase, then you can reuse the factorizations. 

0 Kudos
Frank_W_1
Beginner
1,041 Views

Sorry, some details has been expressed wrongly.
I haved called pardiso to do the 11,22,33 phase sequentially.
Then I need to do -1 phase to free the memorty that pardiso has allocated;
But when after I have done -1 phase,the memory space couldn't recover to
the original.
I guess some memory leak has happpened.

0 Kudos
Frank_W_1
Beginner
1,041 Views

Sorry, some details has been expressed wrongly.
I haved called pardiso to do the 11,22,33 phase sequentially.
Then I need to do -1 phase to free the memorty that pardiso has allocated;
But when after I have done -1 phase,the memory space couldn't recover to
the original.
I guess some memory leak has happpened.

0 Kudos
Gennady_F_Intel
Moderator
1,041 Views

this is how mkl memory manager works. Intel MKL has memory management software that controls memory buffers for the use by the library functions. New buffers that the library allocates when your application calls Intel MKL are not deallocated until the program ends. To get the amount of memory allocated by the memory management software, call the mkl_mem_stat() function. If your program needs to free memory, call mkl_free_buffers().

see more details into mkl's users Guide

0 Kudos
Frank_W_1
Beginner
1,041 Views

Gennady,

Thank you very much.

I have found the reason  that the pointer pt(i) have been modified more than once.

The pointer pt(i) should be set to 0 always and  must be used only at the beginning when one wants to call pardiso.

Except for the details of pointer pt(i) of mkl‘s users Guide, is there any other function of  pt(i)? 

 

Gennady Fedorov (Intel) wrote:

this is how mkl memory manager works. Intel MKL has memory management software that controls memory buffers for the use by the library functions. New buffers that the library allocates when your application calls Intel MKL are not deallocated until the program ends. To get the amount of memory allocated by the memory management software, call the mkl_mem_stat() function. If your program needs to free memory, call mkl_free_buffers().

see more details into mkl's users Guide

0 Kudos
Dogan__Hakan
Beginner
1,041 Views

Hey Frank,

I have the same problem. How did you solve it at the end? Do you call the mkl_free_buffers() at end of the subroutine, i.e. after the -1 phase? 

Or do you delete pt() somewhere in the subroutine?

Regards,

Hakan.

0 Kudos
Frank_W_1
Beginner
1,041 Views

Hakan,

The pointer pt(i) should be set to 0 always and  must be used only once.

The mkl_free_buffers() has no effect at all. I think it has no relation with pardiso.

Frank

0 Kudos
Reply