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

Add a Multilevel schwarz preconditioner #1431

Open
wants to merge 8 commits into
base: develop
Choose a base branch
from

Conversation

pratikvn
Copy link
Member

This PR uses the distributed coarse level generation from PGM to use as a coarse level for the additive Schwarz preconditioner. The only requirement is that the galerkin product generator ($RAP$) generate a multigrid::MultigridLevel which is a triplet of restrict, prolong and coarse operators. The user additionally also needs to set the solver for the coarse level.

TODO

  • Add options to switch between multiplicative and additive
  • Options for arbitrary number of levels.

Possible issues

  1. The coarse level solve significantly reduces the number of iterations, but can be extremely expensive. Maybe makes sense to apply coarse solve, only a few times instead of every preconditioner apply (need to be careful of consistency of preconditioner apply) ?
  2. Weighting between the local solver solution and the coarse solution is unclear.
  3. Though the coarse solve and the local solve are independent, we have no way of performing them in parallel. This will probably require a rewrite of the apply interface to enable asynchronicity, in addition to support for multiple streams/queues.

@pratikvn pratikvn self-assigned this Oct 15, 2023
@ginkgo-bot ginkgo-bot added reg:testing This is related to testing. mod:core This is related to the core module. reg:example This is related to the examples. type:preconditioner This is related to the preconditioners labels Oct 15, 2023
@tcojean tcojean added this to the Ginkgo 1.9.0 milestone May 3, 2024
@yhmtsai yhmtsai force-pushed the distributed_pgm branch 4 times, most recently from a10beb2 to 8667fa1 Compare May 9, 2024 08:00
Base automatically changed from distributed_pgm to develop May 9, 2024 12:23
@pratikvn pratikvn marked this pull request as draft July 11, 2024 14:31
@pratikvn pratikvn force-pushed the multilevel-schwarz branch 2 times, most recently from 24c6f7d to 8df491e Compare August 12, 2024 14:45
@pratikvn pratikvn force-pushed the multilevel-schwarz branch from 8df491e to 9101732 Compare October 7, 2024 12:18
@MarcelKoch MarcelKoch modified the milestones: Ginkgo 1.9.0, Ginkgo 1.10.0 Dec 9, 2024
@ginkgo-bot
Copy link
Member

Error: The following files need to be formatted:

core/distributed/preconditioner/schwarz.cpp
core/test/mpi/distributed/preconditioner/schwarz.cpp
examples/distributed-solver/distributed-solver.cpp
include/ginkgo/core/distributed/preconditioner/schwarz.hpp
test/mpi/preconditioner/schwarz.cpp

You can find a formatting patch under Artifacts here or run format! if you have write access to Ginkgo

@pratikvn pratikvn marked this pull request as ready for review January 31, 2025 16:03
@pratikvn pratikvn changed the title WIP: Add a Multilevel schwarz preconditioner Add a Multilevel schwarz preconditioner Jan 31, 2025
@pratikvn
Copy link
Member Author

As a first step, I just added a two-level preconditioner with equal weighting for the local solution and the coarse solution. I think it maybe makes sense to try this out in some applications and then think about arbitrary number of levels, additive/multiplicative etc.

@pratikvn pratikvn added the 1:ST:ready-for-review This PR is ready for review label Jan 31, 2025
@pratikvn pratikvn requested review from a team January 31, 2025 16:05
@pratikvn
Copy link
Member Author

format!

Co-authored-by: Pratik Nayak <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1:ST:ready-for-review This PR is ready for review mod:core This is related to the core module. reg:example This is related to the examples. reg:testing This is related to testing. type:distributed-functionality type:preconditioner This is related to the preconditioners
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants