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
- Make a large, sparse matrix
- Call Pardiso with phase=11 on that matrix
- Call pardiso with phase=22 on that matrix
- Call pardiso many times with phase=33, with various right hand sides
- 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