Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue with Isai Preconditioner (Isai Type: General, Sparsity power > 1) #1250

Closed
aggarwal2000 opened this issue Jan 2, 2023 · 3 comments · Fixed by #1327
Closed

Issue with Isai Preconditioner (Isai Type: General, Sparsity power > 1) #1250

aggarwal2000 opened this issue Jan 2, 2023 · 3 comments · Fixed by #1327
Assignees
Labels
is:bug Something looks wrong.

Comments

@aggarwal2000
Copy link
Contributor

The general isai preconditioner seems to produce an incorrect output for cases where the sparsity pattern power for the approximate inverse is chosen to be greater than 1. Currently, the tests for general isai preconditioner use a matrix with full(dense) sparsity pattern (no zeroes) as the input matrix, thus the sparsity pattern does not change as the power is increased from 1 to anything greater than 1. As a result, the issue is not detected in the tests.

Running general isai preconditioner for the cases: pores_1 with sparsity power = 7 and LF10 with sparsity power = 9 demonstrates the problem very clearly.

With such high sparsity powers, the inverse pattern spy(A^spy_power) for both the cases is a full sparsity pattern, i.e with no zero elements.

The left approximate inverse: approx_inv_A * A = I on S, spy(approx_inv_A) = S = spy(A^spy_power)

Following from the above equation, in cases, where S = full sparsity pattern, approx_inv_A should be equal to the exact inverse of matrix A. However, it is turns out that the approximate inverse that is produced by general isai is not equal to the exact inverse for the above test cases.

Not only that, there are many cases where the iterative solvers converge with general isai preconditioner when spy_power used is equal to 1, but run out the maximum iteration limit when the spy_power is increased.

As a side note, the above problem is only for the case of general isai with spy_power > 1. Lower and upper triangular isai work perfectly fine.

@aggarwal2000 aggarwal2000 added the is:bug Something looks wrong. label Jan 2, 2023
@upsj
Copy link
Member

upsj commented Jan 2, 2023

Quick check to identify where things go wrong: Does this also happen if you artificially turn the matrix dense by adding numerical zeros to its sparsity pattern?

@aggarwal2000
Copy link
Contributor Author

No, it works absolutely fine in that case.

My observation is that the general isai output gets messed up only for cases where there is a change in the sparsity pattern as the power is increased. If the sparsity pattern is already full, increasing the power does not induce any change in the pattern. In such cases, the output generated by general isai for any spy_power (> 1) is correct; it is the same as for spy_power = 1. In short, the isai works as expected.

Another observation: In the incorrect output, it seems that some of the rows are overwritten.

@upsj
Copy link
Member

upsj commented Jan 9, 2023

I'll investigate further, thanks!

@upsj upsj self-assigned this Jan 9, 2023
@MarcelKoch MarcelKoch linked a pull request Apr 21, 2023 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
is:bug Something looks wrong.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants