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

Can multiple Pardiso factorizations/solutions be conducted concurrently in one process?

damienhocking
New Contributor I
709 Views

Hello,

I know the answer to this used to be no, you had to run in separate memory spaces because Pardiso would overwrite common memory blocks. Has this been changed in recent releases? 

Damien 

0 Kudos
1 Solution
Gennady_F_Intel
Moderator
671 Views

Damien, Kirill,

I am very sorry, I wrongly deleted the original Kirill's reply. Here it is:


>> from Kirill:

Hi!

Could you clarify what do you mean exactly?

Multiple factorizations/solving steps for different matrices? One process = one OS process or how do you define it?

What about smth like:

#pragma omp parallel num_threads(2)

{

 int thread_id = ...

 if (thread_id == 0) {

  // solve with the first matrix with handle pt0, iparm0, ia0, ja0, a0, ...

 }

 if (thread_id == 1) {

  // solve with the first matrix with handle pt1, iparm1, ia1, ja1, a1, ...

 }

}

It will call PARDISO concurrently from two threads, each operating on a different matrix. And you can enable nested parallelism if you like. You just need separate PARDISO handles for that.

Is this what you want? If not, why?

Best,

Kirill


View solution in original post

0 Kudos
2 Replies
damienhocking
New Contributor I
691 Views

Kirill,

Thanks, that's what I was looking for. We have multiple, concurrent nonlinear solvers that we run on small, sparse equation systems all of different sizes. We used to have to run them in independent processes because in one memory space multiple Pardiso instances would step on each other. This used to be a problem with MUMPS as well until that was fixed in recent versions.

Damien   

0 Kudos
Gennady_F_Intel
Moderator
672 Views

Damien, Kirill,

I am very sorry, I wrongly deleted the original Kirill's reply. Here it is:


>> from Kirill:

Hi!

Could you clarify what do you mean exactly?

Multiple factorizations/solving steps for different matrices? One process = one OS process or how do you define it?

What about smth like:

#pragma omp parallel num_threads(2)

{

 int thread_id = ...

 if (thread_id == 0) {

  // solve with the first matrix with handle pt0, iparm0, ia0, ja0, a0, ...

 }

 if (thread_id == 1) {

  // solve with the first matrix with handle pt1, iparm1, ia1, ja1, a1, ...

 }

}

It will call PARDISO concurrently from two threads, each operating on a different matrix. And you can enable nested parallelism if you like. You just need separate PARDISO handles for that.

Is this what you want? If not, why?

Best,

Kirill


0 Kudos
Reply