Intel® oneAPI Math Kernel Library
Ask questions and share information with other developers who use Intel® Math Kernel Library.
The Intel sign-in experience has changed to support enhanced security controls. If you sign in, click here for more information.

pardiso using a lot of memory


I'm using Pardiso to solve a large number of linear systems, and its using quite a lot of memory. My program takes the following steps

  1. Make a large, sparse matrix
  2. Call Pardiso with phase=11 on that matrix
  3. Call pardiso with phase=22 on that matrix
  4. Call pardiso many times with phase=33, with various right hand sides
  5. Make a new matrix (with the same sparse structure). and go to step 2.

The amount of memory used by this function steadily increases. By the end of the program, the program is using a lot of memory, almost all of which came from calls to pardiso with phase=33. I don't see why pardiso needs to use so much memory, and I assume I am failing to deallocate something. I don't call pardiso with phase=0 until the end of the program, which I think is because pardiso needs the memory where the LU decomposition is stored all the way to the end. (I tried calling pardiso with phase=0 at the start of step 5, this segfaults). I call mkl_free_buffers_() at the start of step 5, this does not solve the problem.

Any help would be greatly appreciated. I'm using the version of MKL which ships with intel composer 2013 sp1 


0 Kudos
4 Replies

pls try the latest 11.3 version of MKL ( free for evaluation purpose ). since the 11.1 version which you are using, many memory related problems have been fixed.


I've tried the latest version but the problem persists

New Contributor I

Can you try the following.  After step 4, call pardiso with phase = -1 .



Two things about this:

calling pardiso with phase=-1 causes a segfault no matter where it is called. I do not understand why this is.

Am I correct in thinking that a call with phase=-1 does everything that phase=0 does, plus more? I can try calling with phase=0 after step 4, this also causes a segfault the next time I call with phase=22. I think this is because every time I call with phase=22 I am using the memory allocated to store the LU matrices. If I free this memory before the last call to phase=22 is done, then the code should segfault