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

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

damienhocking
新分销商 I
1,157 次查看

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 项奖励
1 解答
Gennady_F_Intel
主持人
1,119 次查看

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 项奖励
2 回复数
damienhocking
新分销商 I
1,139 次查看

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 项奖励
Gennady_F_Intel
主持人
1,120 次查看

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 项奖励
回复