- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I am using the MKL (2022.0.3) out of the oneAPI Base Toolkit in our product to solve linear equations. In tests artificial equations are inserted into the MKL to test our system. For example the following equation shall be solved:
A * x = b,
while A is a 3 x 3 matrix with ones [1, 1, 1; 1, 1, 1; 1, 1, 1, 1] and b is a column vector with values [1; 2; 3]. There exists no unique solution to this problem. The documentation of the function ?geqrf recommends the use of the functions ?geqrf, ormqr and trsm to solve linear equations and that's what we do.
What we realized now is, that the results of the chain of functions (?geqrf, ormqr and trsm) differ depending on the processors the tests are running on. While processors i7-3610QE CPU with 4 Cores and 8 logical processors yield the 'solution' [NaN, NaN, Infinity], the processors i7-1085OH CPU and i7-8700 CPU with 6 Cores and 12 logical processors yield [0, 0, 0].
Why these results differ?
The status of the methods ?geqrf and ormqr equal to 0 (success) if we insert the variables as explained above. Why the library does not use the status of the functions ?geqrf and ormqr to propagate the singularity of the problem to reveal the user the uncertainty of the results?
Best regards Isa
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Isa,
Thanks for reaching out to us.
>>Why these results differ?
In this case, we request you to provide us with
- the sample reproducer code and
- steps you have followed (mainly for compilation)
- the output of MKL_VERBOSE environment variable for both processors
(usage:- set MKL_VERBOSE=1 before running your code) so that we can test the same from our end as well?
I hope the compilation command used is the same when running the code on both processors.
Additionally, I just want to share some information that might be helpful in case you miss it,
There is a tool named "oneMKL LAPACK Function Finding Advisor", which helps you to find the recommended routines for your particular use case
>>...that the results of the chain of functions
we see that you are using computational routines to solve the system of linear equations, maybe you can also give it a try using the driver routine which combines several tasks in one call
Anyways, Please get back to us with the sample reproducer code which will help us to investigate this issue on our end.
Regards,
Vidya.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
thanks for your advises. I tried to set the environmental variable and succeeded, but I do not know where the additional information is printed. I am writing C# code in Visual Studio 2022.
Anyway I found out, that setting the architecture via "mkl_cbwr_set" to "MKL_CBWR_AVX" solved my problem. Now the results coincide on all devices.
You asked yourself why we used these computational routines. My task was to translate old algorithms in C++ to new code in C#. In the old version we used a QR decomposition which was part of the IPP long time ago. In the first step I just wanted to translate it into C# language and since the QR decomposition is no longer part of the IPP, I had to switch to MKL.
Best regards
Isa
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Isa,
>>Anyway I found out, that setting the architecture via "mkl_cbwr_set" to "MKL_CBWR_AVX" solved my problem. Now the results coincide on all devices.
Yes, you are right, these settings help us to get reproducible results.
To anyone else who is looking into this issue, here are some more details about mkl_cbwr_set function and its usage.
Glad to know that your issue is resolved and thanks for letting us know about it.
As the issue is resolved, could you please let us know if we can close this thread from our end?
Regards,
Vidya.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
you can close it. I am fine with it.
Have a nice day
Isa
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Isa,
>>you can close it
Thanks for the confirmation.
Please post a new question if you need any additional assistance from Intel as this thread will no longer be monitored.
Have a Great Day!
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