- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I recently found a strange phenomenon when calling the pardiso solver to solve a linear equation, the details are as follows:
For a linear equation with multiple right-hand sides: AX=B, where A is an n*n matrix, B is an n*m matrix, and m is the number of right-hand sides.
do i=1,m
call pardiso(A,B(i),X(i))
end do
However, when I solve the equation in the following way (pseudo code), all or some of the threads compute the same result, i.e. all or some of the columns of X are the same.
Notice:
2. These same calculation results may be the correct result of a certain thread, or may be the initial 0 value.
3. In rare cases, all threads can get different calculation results, and the results are correct.
!$OMP Parallel Do Num_Threads(p)
do i=1,m
call pardiso(A,B(i),X(i))
end do
!$OMP end Parallel Do
Note: Parallel results are not repeatable (i.e., every time you run the code, you get a different result, and most of the time the results are unexpected). In addtion, parallel results are often wrong or unexpected whether I use sequential or parallel MKL library.
Thanks,
Ewigstern
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Ewigstern,
Thanks for reaching out to us.
Could you please let us know the reason/use case behind calling pardiso in OpenMP parallel region? Because according to the MKL manual
"By default, Intel® oneAPI Math Kernel Library uses the number of OpenMP threads equal to the number of physical cores on the system."
To do that you can run the code by setting MKL to the /Qmkl: Parallel option.
>>I need to adjust the input parameters of the pardiso solver when calling the pardiso solver in OpenMP
Maybe you can refer to the below link which might help you https://www.intel.com/content/www/us/en/develop/documentation/onemkl-developer-reference-fortran/top/sparse-solver-routines/onemkl-pardiso-parallel-direct-sparse-solver-iface/pardiso-iparm-parameter.html
Regards,
Vidya.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Reminder:
As we haven't back from you, could you please provide us with an update regarding the issue ?
Regards,
Vidya.
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page