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

Switch to Krylov.jl 0.7.3 #176

Merged
merged 3 commits into from
Jul 8, 2021
Merged

Switch to Krylov.jl 0.7.3 #176

merged 3 commits into from
Jul 8, 2021

Conversation

frapac
Copy link
Member

@frapac frapac commented Jun 3, 2021

Krylov.jl adds a new feature that is of direct interest for us: inplace BICGSTAB.

  • Indeed, the BICGSTAB algorithm is using some intermediate arrays. When we were solving the powerflow equations, we had to allocate these auxiliary arrays each time we were calling Krylov.bicgstab.
  • This PR releases this burden, as we are using the new API of Krylov.jl to instantiate the intermediate arrays once and for all, at the beginning. Then, everything runs like a bliss

But ... we could not merge this PR as is. We need to discuss the API to instantiate a new AbstractLinearSolver instance inside ExaPF. Currently, we are calling

lin_solver = LinearSolvers.KrylovBICGSTAB(J, precond)

with J power flow Jacobian, and precond a preconditioner.
I would suggest we use instead:

lin_solver = LinearSolvers.KrylovBICGSTAB(J; precond=:block_jacobi, npartitions=100)

and then instantiate the preconditioner directly inside the constructor of KrylovBICGSTAB (and other linear solvers).
What do you think?

@frapac frapac mentioned this pull request Jun 25, 2021
9 tasks
* preconditioner is now an optional argument in the constructor
Copy link
Member

@dmaldona dmaldona left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great PR!

@michel2323 michel2323 merged commit 9c73c36 into develop Jul 8, 2021
@frapac frapac deleted the fp/krylov_inplace branch July 23, 2021 13:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants