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

Pardiso pt pointer

apqiofj
Beginner
151 Views

Hello,

 

I am trying to diagnose a memory leak that is being seen by some of my users, but unfortunately I cannot reproduce.

 

My simulator does multiple solves the sequence is as follows.

1.  Initialize a pt array of null pointers

2. Initialize an iparm array with values appropriate for my problem

3. Calculate LU factors using phase 11, 22

4. Solve using phase 33

5. repeat through 3 until solution found

6. call phase -1 to delete memory

 

I can do the same solution process multiple times in the same application.  Each time I start with a new pt array until I have called phase -1 at the last step..  The next solve I use a new pt array of null pointers.

Is the appropriate approach?  Should I be using the same "pt" array throughout the entire program?  Should I be using a different phase as opposed to "-1" if I am going to continue doing pardiso solutions?

 

0 Kudos
3 Replies
Ruqiu_C_Intel
Moderator
99 Views

Only necessary initialize the internal solver memory pointer for the FIRST call of the PARDISO solver. After initializing, you can repeat perform phase 22 or 33 without initializing.

0 Kudos
apqiofj
Beginner
91 Views

Thanks for your response.  I am not reinitializing the memory pointer until after I call pardiso with phase -1 at the very end, and I am ready to start solving a new problem.

 

Is it better to keep using the same memory array for all of the problems I am solving, even if they may all have a different matrix structure?  Is it safe to call phase -1 and continue using the same pt array?

0 Kudos
Ruqiu_C_Intel
Moderator
57 Views

It is generally not recommend to use the same memory array (pt array) for different matrix structures. It is better for each matrix with different sparsity pattern or dimensions to have its own pt array to avoid potential problems and ensure the best performance

0 Kudos
Reply