Showing results for

- Intel Community
- Software Development SDKs and Libraries
- Intel® oneAPI Math Kernel Library & Intel® Math Kernel Library
- GMRES residual does not change with iteration

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page

Highlighted
##

eh4

Beginner

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

11-14-2011
06:25 AM

24 Views

GMRES residual does not change with iteration

Hi all

I am trying to solve a sparse system of linear equations using GMRES (7600 x 7600). I have not done any preconditioning yet. THe procedure of calling the subroutines follows the example for unsymmetric matrices given in the help files.

The problem I am facing is that after a certain number of iterations, the residual between two consecutive steps does not change. Well, it does change but very very slowly. I am talking about 1d-12 or smaller per iteration.

The system of equations solved nicely with PARDISO. As I need to solve a large system later on, I really need to get GMRES to work. Does anyone know any remedy to this problem? Another thing I should mention is that the iterative solver does not stop even when the maximum number of iterations specified has been exceeded. It just kept on iterating. Why is this so? The condition number of the matrix is about 5e6.

One final thing, does the arrangement of the system of equations affect the convergence of the solver? I have tried arranging it two ways and both of them gave the same outcome. Just to point out, I failed also to obtain a solution for the same matrix using the GMRES solver in Matlab.

Thank you.

Best wishes,

EH

14 Replies

Highlighted
##

Hi,

Alexander_K_Intel2

Employee

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

11-14-2011
06:34 AM

24 Views

I don't think that idea to use GMRES without any precondition is pretty good. The number of GMRES iterations to achieve some accuracyproportional to condition number of matrix and nobody know coefficient of this proportional. So try to use some preconditioner (for example ilu0 or ilut or your own preconditioner) with GMRES to get good result.

With best regards,

Alexander Kalinkin

Highlighted
##

Hi Alex,

I have tried a simple diagonal preconditioner but it does not appear to be helping. I have not tried ilut or ilu0 yet because I am having troubles trying to get it to run properly.

By the way, when using ilut or ilu0, do you know what the parameter maxfil is for? The help menus says:

"maxfil --INTEGER. Maximum fill-in, half of the preconditioner bandwidth. The number of non-zero elements in the rows of the preconditioner can not exceed (2*maxfil+1)."

What is the appropriate value of maxfil, may I know?

Thank you so much.

Best wishes,

EH

eh4

Beginner

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

11-14-2011
07:09 AM

24 Views

I have tried a simple diagonal preconditioner but it does not appear to be helping. I have not tried ilut or ilu0 yet because I am having troubles trying to get it to run properly.

By the way, when using ilut or ilu0, do you know what the parameter maxfil is for? The help menus says:

"maxfil --INTEGER. Maximum fill-in, half of the preconditioner bandwidth. The number of non-zero elements in the rows of the preconditioner can not exceed (2*maxfil+1)."

What is the appropriate value of maxfil, may I know?

Thank you so much.

Best wishes,

EH

Highlighted
##

Hi,

Alexander_K_Intel2

Employee

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

11-14-2011
07:31 AM

24 Views

It's a really hard question. If you set maxfil really huge then time of multiplication of your preconditioner on vector will be huge.. If you set maxfil really small then preconditioner will be bad and number of GMRES iterations will be huge...

With best regards,

Alexander Kalinkin

Highlighted
##

Hi Alex,

I tried a simple diagonal preconditioning but still face the same problem. Then I tried the ilu0 preconditioner in FORTRAN but somehow after the second iteration the Euclidean residual norm becomes NaN. I couldn't figure out what is going wrong. What problem do you thinkwould lead to the residual norm becoming NaN?

Thank you.

Best wishes,

EH

eh4

Beginner

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

11-15-2011
12:28 AM

24 Views

I tried a simple diagonal preconditioning but still face the same problem. Then I tried the ilu0 preconditioner in FORTRAN but somehow after the second iteration the Euclidean residual norm becomes NaN. I couldn't figure out what is going wrong. What problem do you thinkwould lead to the residual norm becoming NaN?

Thank you.

Best wishes,

EH

Highlighted
##

Hi,

Alexander_K_Intel2

Employee

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

11-15-2011
08:43 AM

24 Views

Such situation is typical when ilu0 preconditioner calculated incorrectly (number of rows in preconditioner is not equal number of row of stiffness matrix, element of preconditioner was modified etc...). Could you provide test case to reproduce your results on our side?

With best regards,

Alexander Kalinkin

Highlighted
##

Alexander_K_Intel2

Employee

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

11-17-2011
06:32 PM

24 Views

Hi,

I've reproduced your issue the problem comes from your matrix. There are a lot of string in initial matrix that have all elements before and on diagonal are equal to zero. That's why ILU0 preconditioner return almost zero elements on diagonal and several NAN appeared during solution process. Are you checks condition number of your matrix?

With best regards,

Alexander Kalinkin

Highlighted
##

Hi,

The condition number of the matrix is approximately 5e+06. This problem that you mentioned, will it also cause GMRES to iterate such that residual norm does not change?

If this is the matrix problem, does it mean that GMRES cannot solve this problem at all? Iterative sovlers would seem to be very limited.

EH

eh4

Beginner

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

11-18-2011
12:27 AM

24 Views

The condition number of the matrix is approximately 5e+06. This problem that you mentioned, will it also cause GMRES to iterate such that residual norm does not change?

If this is the matrix problem, does it mean that GMRES cannot solve this problem at all? Iterative sovlers would seem to be very limited.

EH

Highlighted
##

Hi,

Alexander_K_Intel2

Employee

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

11-18-2011
10:38 AM

24 Views

The iterative solvers are really useful if they are used with preconditioner. There is a huge number of different preconditioner, for example Jacobi, Gauss-Zeidel, preconditioners based on incomplete Cholesky decomposition, based on decomposition approach, and so on. But problem is that the best preconditioner based on initial differential equation that produced your system of linear equation. That's why it's hard to find the best combination of iterative solver + preconditioner without any knowledge about problem, domain of problem, elements that discretized the problem and etc. When you use direct solvers like PARDISO such problem doesn't exist but if you want to use iterative solver I need to know details I mentioned before to advice sufficiently good preconditioner. Could you provide such data here? If it is kind of secret you could provide it using private answer.

With best regards,

Alexander Kalinkin

Highlighted
##

eh4

Beginner

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

11-21-2011
06:16 AM

24 Views

Sorry for the late reply. May I know what kind of information or details that you need? I am a little curious about thedetails that you need.

EH

Highlighted
##

Alexander_K_Intel2

Employee

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

11-21-2011
03:53 PM

24 Views

Hi,

Any details will be useful, first of all: how you constructed this matrix? Does it comes from some differential equation or not? If yes then could you provide this differential equation, domain of problem and way of developing discrete problem (FEM, finite difference).

With best regards,

Alexander Kalinkin

Highlighted
##

Hi,

Well, the matrix comes from setting up a system of equations from thepartial differentialHelmholtz equation in 2D define over the square domain of [-0.5 0.5; -0.5 0.5]. The matrix was constructed using a meshless method based on the integral equation approach with radial basis function approximation. Each node has a local subdomain where the unknowns are approximated by the unknown values of the surrounding node. As such, the matrix generated is block banded and sparse. In this case, most of the values populate the diagonal of the matrix. It is unsymmetric though.

Are there anymore information that is required?

Thank you.

EH

eh4

Beginner

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

11-21-2011
10:47 PM

24 Views

Well, the matrix comes from setting up a system of equations from thepartial differentialHelmholtz equation in 2D define over the square domain of [-0.5 0.5; -0.5 0.5]. The matrix was constructed using a meshless method based on the integral equation approach with radial basis function approximation. Each node has a local subdomain where the unknowns are approximated by the unknown values of the surrounding node. As such, the matrix generated is block banded and sparse. In this case, most of the values populate the diagonal of the matrix. It is unsymmetric though.

Are there anymore information that is required?

Thank you.

EH

Highlighted
##

Hi,

Alexander_K_Intel2

Employee

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

11-22-2011
02:28 AM

24 Views

What kind of your grid? Is it triangular orrectangular? I've asked it because there is direct solver of Helmoltz equation on uniform rectangular grid in MKL and if it's possible to use it as preconditioner then condition number of such system could be pretty good.

With best regards,

Alexander Kalinkin

Highlighted
##

eh4

Beginner

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

11-22-2011
02:51 AM

24 Views

My objective is to solve a 3D fluid flow problem and the same problem with GMRES occurred, i.e. the iteration number increases but the residual does not change.

Best regards,

EH

Highlighted
##

Hi,

Alexander_K_Intel2

Employee

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

11-24-2011
12:14 AM

24 Views

Sorry for late reply. As I wrote before, it's really difficult to choose one perfect preconditioner to all variants of initial problem. You could use Gauss-Zeidel (D-L)^-1 of Jacobi (D)^-1 preconditioner (where A = -L +D -R, L-lower triangular, R-upper triangular and D-diagonal matrix), but I'm not sure that condition number of your problem will be good enough.

With best regards,

Alexander Kalinkin

For more complete information about compiler optimizations, see our Optimization Notice.