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
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
链接已复制
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
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
