- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
I am solving a big system by PARDISO but it gives me a very high residual error. In order to post and upload the code here, I just want to try for a small size (in this case the residual is 1463.71). So please can you suggest, what is the issue about high residual error? The code is in the attachment .cpp file.
Best Regards,
Sal_Ahm
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Sal_Ahm,
Thanks for the details.
In your code, you calculate the value of Ax using the routine mkl_dcsrgemv() which employs one-based indexing while ia and ja values are actually used as zero-based indexing.
So adding 1 to each element of ia and ja values gave the low residual value. Please the below screenshot for more details.
And, the routine mkl_dcsrgemv() is deprecated, we recommend you to use the mkl_sparse_d_mv() for this sparse matrix-vector multiplication. For more details, please find the below link:
https://www.intel.com/content/www/us/en/docs/onemkl/developer-reference-c/2023-0/mkl-sparse-mv.html
And also, you can calculate the residual error value using loops. We have attached all the 3 methods in the attached file. Could you please try the below-attached code and let us know if you are able to run it without any errors?
Thanks & Regards,
Varsha
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Sal_Ahm,
Thanks for posting in Intel Communities.
We are working on your issue. We will get back to you soon.
Thanks & Regards,
Varsha
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Sal_Ahm,
Thanks for the details.
In your code, you calculate the value of Ax using the routine mkl_dcsrgemv() which employs one-based indexing while ia and ja values are actually used as zero-based indexing.
So adding 1 to each element of ia and ja values gave the low residual value. Please the below screenshot for more details.
And, the routine mkl_dcsrgemv() is deprecated, we recommend you to use the mkl_sparse_d_mv() for this sparse matrix-vector multiplication. For more details, please find the below link:
https://www.intel.com/content/www/us/en/docs/onemkl/developer-reference-c/2023-0/mkl-sparse-mv.html
And also, you can calculate the residual error value using loops. We have attached all the 3 methods in the attached file. Could you please try the below-attached code and let us know if you are able to run it without any errors?
Thanks & Regards,
Varsha
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
Thank you so much for your support, now it works in good way.
Best Regards,
Sal_Ahm
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Glad to know that your issue is resolved. Thanks for accepting our solution. This thread will no longer be monitored by Intel. If you need additional information, please start a new thread.
Thanks & Regards,
Varsha
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page