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

Pardiso with OpenMP problem

zidanea
Novice
1,903 Views

Hello,

According to the manual of pardiso (link)  setting iparm(2) = 3, the solver runs in parallel using the maximum number of threads. 

In my case the pardiso solver crashes with the following message 

"

Intel MKL INTERNAL ERROR: Condition -1 detected in function MKL_DCSRCOO.
"

The error code is: -2 which stands for "not enough memory", which is strange in this case since 

if I just change the visual studio project properties from Generate Parallel Code (/Qopenmp) to Generate Sequential Code (/Qopenmp-stubs) in Language (process omp directives) then it works fine. But then it works sequential not parallel.

Any help how to use pardiso with openmp is appreciated.

Thanks

0 Kudos
11 Replies
VidyalathaB_Intel
Moderator
1,858 Views

Hi,


Thanks for reaching out to us.


Could you please let us know the MKL version being used in this case? Also please provide us with a sample reproducer (maybe you can attach your VS project file here) so that we can work on it from our end.


Regards,

Vidya.


0 Kudos
zidanea
Novice
1,845 Views

Hi,

I'm using the mkl from oneapi.

Please see attached the VS project. 

If you make the process omp directives to Generate Parallel Code (/Qopenmp) it doesn't work, if you make it sequential it works.

Hope you can help with this!

 

Thanks

 

0 Kudos
VidyalathaB_Intel
Moderator
1,821 Views

Hi,

 

Thanks for sharing the details.

 

I could reproduce the issue from my end when enabling /Qopenmp in the language field of the settings page.

Since we already set the MKL to run in parallel mode (Under configuration properties > Fortran > Libraries > Use MKL > /Qmkl: parallel), I tried disabling the Generate Parallel Code (/Qopenmp) option because 

the MKL manual says,

 

"In the parallel mode, Intel® oneAPI Math Kernel Library utilizes multiple processor cores available on your system (uses the number of OpenMP threads equal to the number of physical cores on the system), uses the OpenMP*or Intel TBB threading technology, and requires a proper threading runtime library (RTL) to be linked with your application and the threading RTLs are provided by your compiler."

 

After disabling the option, I could see that output as shown in the below screenshot with the total count of threads being used in the code which shows that it is working in parallel mode as well.

VidyalathaB_Intel_0-1655383735562.png

 

Please refer to the below link and do let me know if I miss anything.

https://www.intel.com/content/www/us/en/develop/documentation/onemkl-windows-developer-guide/top/linking-your-application-with-onemkl/linking-in-detail/linking-with-threading-libraries.html

 

Regards,

Vidya. 

 

0 Kudos
zidanea
Novice
1,809 Views

Thanks Vidya, I followed your instructions, and I used a loop of 1 M iterations of the two calls to the solver to see if what we're doing here is actually taking advantage of the parallel process. 

So the result is that sequential is more efficient? Are we really doing things right here ?

Here's the results:

Process OpenMP directives: Disable
Threads>> 8
Simulation time(sec): 295.1770

Process OpenMP directives: Generate Sequential Code (/Qopenmp-stubs):
Threads>> 1
Simulation time(sec): 293.5310

 

 

0 Kudos
VidyalathaB_Intel
Moderator
1,801 Views

Hi,


Thanks for getting back to us.

Could you please let me know how did you measure/calculate the simulation time here (maybe you can give me the steps you are following)?


Regards,

Vidya.


0 Kudos
zidanea
Novice
1,794 Views

Hello,

I used the following:

 

CALL system_clock(count_rate=rate)
call SYSTEM_CLOCK(timein)

!
do i = 1,1000000
      write(*,*)'Solve once!'
      call LINEAR_SOLVER_PARDISO
      write(*,*)'Solve twice!'
      call LINEAR_SOLVER_PARDISO
enddo
call SYSTEM_CLOCK(timeout)

!
write(*,*)'Simulation time(sec):',real(timeout-timein)/real(rate)

 

Thanks

0 Kudos
VidyalathaB_Intel
Moderator
1,737 Views

Hi,


Thanks for sharing the details.

We are working on your issue. we will get back to you soon.


Regards,

Vidya.


0 Kudos
zidanea
Novice
1,721 Views
0 Kudos
Khang_N_Intel
Employee
1,712 Views

Hi Ali,

I will do some investigation and will get back to you.


Best,

Khang


0 Kudos
zidanea
Novice
1,708 Views
0 Kudos
zidanea
Novice
1,586 Views

Hi Khang,

Any updates so far ?

 

Thanks,

Z

0 Kudos
Reply