Add poisson examples (WIP) - #2054
Open
cflinto wants to merge 4 commits into
Open
Conversation
The Ginkgo team is proud to announce the new Ginkgo minor release 1.9.0. This release brings new features such as: - Support for half precision (IEEE FP16). The type `gko::half` can now be selected in most instances as the value type of a matrix, solver, preconditioner, etc. If the selected backend supports FP16 as a native type, the native type is used within the kernels, otherwise an overhead might occur. The new behavior is enabled by default, but it can be turned off during configuration. - New implementations of the ILU and IC factorization for CUDA, HIP, OpenMP, and Reference backends. These are available in addition to the existing implementations based on the vendor libraries cuSPARSE and hipSPARSE. - New (S)SOR and Gauss-Seidel preconditioners. - Simplifyied distributed matrix assembly by exchanging local rows between neighboring processes. And more! See [the Changelog](./CHANGELOG.md) for more information.
The Ginkgo team is proud to announce the new Ginkgo minor release 1.10.0. This release brings new features such as: - Support for bfloat16 precision. The type `gko::bfloat16` can now be selected in most instances as the value type of a matrix, solver, preconditioner, etc. If the selected backend supports bfloat16 as a native type, the native type is used within the kernels, otherwise they may incur a conversion overhead. The new behavior is enabled by default, but it can be turned off during CMake configuration. - Mixed precision support in our distributed matrix, provided the underlying matrix formats support mixed precision. - New pipelined CG solver. This specialization of the CG solver is suitable to reduce the communication overhead in large scale distributed computations. - New Chebyshev iteration solver. - An OpenMP implementation of the merge-path based SpMV algorithm. And more! See the changelog for more details.
The Ginkgo team is proud to announce the new Ginkgo minor release 1.11.0. This release brings new features such as: - New interface for sparse matrix-matrix multiplication and addition. The new interface can yield speedups, in the case of repeated computations where the matrix values may change, but the matrix structure (i.e. position of non-zero entries) doesn't. - Performance improvements for the distributed SpMV and pipelined CG solver. - Better support for ARM platforms and support for ROCm 7 and CUDA 13. And more! See the changelog for more details.
yhmtsai
self-requested a review
July 23, 2026 08:14
yhmtsai
reviewed
Jul 23, 2026
yhmtsai
left a comment
Member
There was a problem hiding this comment.
the assembled part looks good to me
Comment on lines
+1
to
+2
| add_executable(distributed-poisson-assembled-matrix distributed-poisson-assembled-matrix.cpp) | ||
| target_link_libraries(distributed-poisson-assembled-matrix Ginkgo::ginkgo) |
Member
There was a problem hiding this comment.
you will need to install pre-commit and run the formatting
| #endif | ||
|
|
||
| // Helper function to map 3D grid coordinates (x, y, z) to a global 1D row index. | ||
| // The modulo operator (%) is used to enforce periodic boundary conditions, |
Member
There was a problem hiding this comment.
Suggested change
| // The modulo operator (%) is used to enforce periodic boundary conditions, | |
| // The modulo operator (%) is used to enforce periodic boundary conditions, | |
| // The addition operator (+ Nx/Ny/Nz) is used to deal with negative index in periodic boundary condition |
if I understand it correctly
Comment on lines
+97
to
+104
| const std::map<std::string, std::function<std::shared_ptr<gko::Executor>(MPI_Comm)>> executor_factory_mpi{ | ||
| {"reference", [](MPI_Comm) { return gko::ReferenceExecutor::create(); }}, | ||
| {"omp", [](MPI_Comm) { return gko::OmpExecutor::create(); }}, | ||
| {"cuda", [](MPI_Comm comm) { | ||
| int device_id = gko::experimental::mpi::map_rank_to_device_id( | ||
| comm, gko::CudaExecutor::get_num_devices()); | ||
| return gko::CudaExecutor::create(device_id, gko::ReferenceExecutor::create()); | ||
| }}}; |
Member
There was a problem hiding this comment.
because you fully rely on the ginkgo functionality, it should also work on the other devices. Could you copy the full executor map here?
It might not be necessary in other example if you do not have them on different backend
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR introduces a series of examples demonstrating how to solve a 3D Poisson equation using Ginkgo's distributed matrix capabilities.
For the moment, I have only completed the
distributed-poisson-assembled-matrixexample. I am opening this PR early to get some initial feedback on the structure (@yhmtsai ?). The other two examples (distributed-poisson-matrix-free-monolithicanddistributed-poisson-matrix-free-split) are NOT done yet.