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

pardiso within parallel region

fah10
New Contributor I
296 Views
Hello,
is it possible to call the PARDISO solver within an OpenMP
parallel region? I want to do something like

!$omp parallel
call mysubroutine(...)
!$omp end parallel

subroutine mysubroutine(...)
...
!$omp single
call omp_set_num_threads(nthreads)
call pardiso(...)
!$omp end single
...
end subroutine mysubroutine

However, within the pardiso solver, the program justs stalls when
the number of threads is greater than one. The call to omp_set_num_threads
doesn't have any effect. What can I do?


0 Kudos
3 Replies
barragan_villanueva_
Valued Contributor I
296 Views
Please take a look at the similar threadrelated to nested OMP parallelization
0 Kudos
fah10
New Contributor I
296 Views
Thanks for the link.
I have successfully called omp_set_nested(.true.) to enable nesting.

However, PARDISO always stalls (at 0% cpu usage) when it's called
within an active parallel region:
call omp_set_nested(.true.)
print*,omp_get_nested() ! returns true
!$omp parallel
!$omp single
call pardiso(...) ! stalls
!$omp end single
!$omp end parallel

I also tried to start a single PARDISO thread, e.g.
call omp_set_nested(.true.)
print*,omp_get_nested() ! returns true
!$omp parallel
!$omp single
call omp_set_num_threads(1)
!... set pardiso number of threads, iparm(3)=1
call pardiso(...)
!$omp end single
!$omp end parallel

Even this call stalls when the number of outer threads>1 just like in
the non-nested case:

call omp_set_nested(.false.)
!$omp parallel
!$omp single
!... set pardiso number of threads, iparm(3)=1
call pardiso(...) ! stalls
!$omp end single
!$omp end parallel

Creating a thread pool of 2x the number of logical processors or invoking
KMP_BLOCKTIME as described in the other forum thread also didn't help.
Is there something special about PARDISO?
0 Kudos
barragan_villanueva_
Valued Contributor I
296 Views

Hi,

Please be sure that diferent threads use diferent ipram's because they are supposed to be private

0 Kudos
Reply