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

FGMRES Residual stagnate for a solvable but badly conditioned system

DvdC
Beginner
966 Views

Hello. I have encountered some unexpected behaviour when using the RCI FGMRES solver.

 

I am solving a system A x = b with 200 unknowns. A is a badly conditioned matrix (of size 200 x 200), x is the vector we are solving for,  and b is the RHS vector (that I know). I also know the correct solution of x.

I am solving this system using both the FGMRES solver with initial solution vector set to zero, and by doing a direct solve using LAPACKE_dgesv.

 
The direct solver finds the solution with an relative error of ~1e-10.
 
However the FGMRES solver does not find the solution. In particular, the residual start to stagnate after around 100 iterations, and continue to stagnate regardless of how many iterations I let it run (I tried up to 50 000 iterations). The error of the solution after the residual stagnate is around 2% relative error.
 
This behaviour is unexpected. While its true that the matrix is badly conditioned, the system is solvable (as demonstrated by the linear solver), and GMRES is supposed (according to some literature I read) to always converge in, at maximum, n iterations (with n equal to the size of the system, in this case 200 iterations).

 

The solver is used in a c# environment.

 I have attached a .zip file containing the code to reproduce the issue. This is a VisualStudio solution which targets .Net framework 4.7.2.

Program.cs contains all the code and input data, and the only dependency are the MKL .dll files. We are using MKL version 2020.0.2.1 and Windows 10 Pro Ver. 21H2.

0 Kudos
4 Replies
ShanmukhS_Intel
Moderator
910 Views

Hi David,


Thanks for posting in Intel Communities.


>>We are using MKL version 2020.0.2.1 and Windows 10 Pro Ver. 21H2.

Sorry, we no longer support this product/version. We would like to request you download the latest product as mentioned below and let us know if the issue persists to get further assistance.  


https://www.intel.com/content/www/us/en/developer/tools/oneapi/base-toolkit-download.html


Best Regards,

Shanmukh.SS


0 Kudos
DvdC
Beginner
877 Views

Dear Shanmukh,

 

Thanks for the quick reply.

I confirm the same behaviour in version 2024.0.0 

 

Kind Regards,

David

 

0 Kudos
DvdC
Beginner
850 Views

The issue can be closed. I realised that ipar[14] was set to the default value 150, i.e. I was running a restarted FGMRES. If I modify this to a higher value the solver does converge in exactly 200 iterations as expected. 

 

0 Kudos
ShanmukhS_Intel
Moderator
841 Views

Hi,


It’s great to know that the issue has been resolved, in case you run into any other issues please feel free to create a new thread.


Best Regards,

Shanmukh.SS


0 Kudos
Reply