My code is in the following format :
! $OMP PARALLEL shared (...) private(..)
!OMP END DO
!$OMP END PARALLEL
For every loop, I need to solve a different linear equation. So pardiso has to be called during every loop.
Unfortunately, the suggested measures did not help.
- Setting OMP_WAIT_POLICY to passive did not help
- Arguments I have passed are all behaving fine, othewise I should have got the wrong answers when both the threads are active. Its only when one thead stops that the problem occurs.
- Nested parallelism is enabled.
- I will give another example. When I set OMP_SET_NUM_THREADS = 2, and include PARDISO inside a critical construct like this :
!$OMP END CRITICAL
and run the code, even then PARDISO refuses to run and just hangs. For whatever reason pardiso expects both the threads to be active, otherwise it won't run. If one of the threads is inactive (when OMP_SET_NUM_THREADS = 2) then it hangs. However if I make OMP_SET_NUM_THREADS = 1, then the code runs fine.