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

PARDISO Phases called in different routines,Mem leak?

Orlando_R_
Beginner
262 Views

Hi

I am calling pardiso  with c/c++. for that I packed all phases of pardiso  in a library  , but splitted into different soubroutines using *pt and *iparm as  global variables within that file/library (see the pseudo code below)

library.c:

void *pt[64]
MKL_INT  iparm[64]

phase_init( ... ){
....
}

phase_11(a, ia, ja){
....
}

phase_22(a,ia,ja){
   ....
}

phase_33(a, ia,ja, double* x, double* b){
...
}



 

After that with the client code call phase 33 passing x and b, as many times as I want (the problem is actually I can call only one RHS at once , since a RHS will be calculated with previous RHS's)

The code is working well , but  memory is increasing uncrontrolled , I read that  one should not  modify pt after the first phase since a severe memory leak might occur, which is my case. But I am not modifiying pt , I am  just passing it from function to function as global, and I dont see why pt have to be always local to the function that calls it.

I am using mkl 11.2 with gcc linking static w/o multi-threa.

 

0 Kudos
3 Replies
Alexander_K_Intel2
262 Views

Hi,

Which update of MKL 11.2 you use? If not MKL 11.2.3 could you check to run your code with this update to verify that issue is fixed?

Thanks,

Alex

0 Kudos
Orlando_R_
Beginner
262 Views

 

 

0 Kudos
Orlando_R_
Beginner
262 Views

Hi

 

I found my mistake ,  thanks for your clarification though

 

Cheers

0 Kudos
Reply