Skip to content

Ifpack2: prepare for new kk_extract_diagonal_blocks_crsmatrix_with_rcb_sequential interface in Kokkos Kernels 5.1.0#15025

Merged
vqd8a merged 5 commits intotrilinos:developfrom
vqd8a:ifpack2-riluk-reuse-rcb
Apr 2, 2026
Merged

Ifpack2: prepare for new kk_extract_diagonal_blocks_crsmatrix_with_rcb_sequential interface in Kokkos Kernels 5.1.0#15025
vqd8a merged 5 commits intotrilinos:developfrom
vqd8a:ifpack2-riluk-reuse-rcb

Conversation

@vqd8a
Copy link
Copy Markdown
Contributor

@vqd8a vqd8a commented Mar 4, 2026

@trilinos/ifpack2 @trilinos/kokkos-kernels

This PR is to prepare for the change of the kk_extract_diagonal_blocks_crsmatrix_with_rcb_sequential() interface in the upcoming KK 5.1.0 release. In the new interface, we will not call the recursive_coordinate_bisection(). Instead, the RCB ordering information is given as inputs. With this change, the RCB ordering information only needs to be computed once in RILUK::initialize().

…th_rcb_sequential interface in Kokkos Kernels 5.1.0

Signed-off-by: Vinh Dang <vqdang@sandia.gov>
@vqd8a vqd8a requested a review from ndellingwood March 4, 2026 12:29
@vqd8a vqd8a self-assigned this Mar 4, 2026
@vqd8a vqd8a requested a review from a team as a code owner March 4, 2026 12:29
@github-actions
Copy link
Copy Markdown

github-actions bot commented Mar 4, 2026

CDash for AT2 results [Currently only accessible from Sandia networks]

Signed-off-by: Vinh Dang <vqdang@sandia.gov>
@github-actions
Copy link
Copy Markdown

github-actions bot commented Mar 4, 2026

Your PR updated files that did not respect package formatting settings.
Please apply the patch given below. Alternatively you can download a patch file here.

Patch
diff --git a/packages/ifpack2/src/Ifpack2_RILUK_def.hpp b/packages/ifpack2/src/Ifpack2_RILUK_def.hpp
index 9e57100a..5ca85685 100644
--- a/packages/ifpack2/src/Ifpack2_RILUK_def.hpp
+++ b/packages/ifpack2/src/Ifpack2_RILUK_def.hpp
@@ -573,7 +573,7 @@ void RILUK<MatrixType>::initialize() {
 #if KOKKOS_VERSION >= 5099
             reverse_perm_rcb_ = perm_view_t(Kokkos::view_alloc(Kokkos::WithoutInitializing, "reverse_perm_rcb_"), A_coordinates_lcl.extent(0));
 #endif
-            coors_rcb_  = coors_view_t(Kokkos::view_alloc(Kokkos::WithoutInitializing, "coors_rcb_"), A_coordinates_lcl.extent(0), A_coordinates_lcl.extent(1));
+            coors_rcb_ = coors_view_t(Kokkos::view_alloc(Kokkos::WithoutInitializing, "coors_rcb_"), A_coordinates_lcl.extent(0), A_coordinates_lcl.extent(1));
             Kokkos::deep_copy(coors_rcb_, A_coordinates_lcl);
 #if KOKKOS_VERSION >= 5099
             local_ordinal_type n_levels = static_cast<local_ordinal_type>(std::log2(static_cast<double>(num_streams_)) + 1);

More details about our use of clang-format and other tools can be found in the wiki.

vqd8a added 2 commits March 4, 2026 04:43
Signed-off-by: Vinh Dang <vqdang@sandia.gov>
Signed-off-by: Vinh Dang <vqdang@sandia.gov>
ndellingwood
ndellingwood previously approved these changes Mar 4, 2026
Copy link
Copy Markdown
Contributor

@ndellingwood ndellingwood left a comment

Choose a reason for hiding this comment

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

Changes look reasonable, thanks @vqd8a !

@ndellingwood
Copy link
Copy Markdown
Contributor

@vqd8a let's hold off on merge until we address the old interface

@jhux2 jhux2 changed the title An update to prepare for the new kk_extract_diagonal_blocks_crsmatrix_with_rcb_sequential interface in the upcoming Kokkos Kernels 5.1.0 Ifpack2: prepare for new kk_extract_diagonal_blocks_crsmatrix_with_rcb_sequential interface in Kokkos Kernels 5.1.0 Mar 5, 2026
#if KOKKOS_VERSION >= 50099
local_ordinal_type n_levels = static_cast<local_ordinal_type>(std::log2(static_cast<double>(num_streams_)) + 1);
partition_sizes_rcb_ = KokkosGraph::Experimental::recursive_coordinate_bisection(coors_rcb_, perm_rcb_, reverse_perm_rcb_, n_levels);
KokkosSparse::Impl::kk_extract_diagonal_blocks_crsmatrix_with_rcb_sequential(lclMtx, perm_rcb_, reverse_perm_rcb_, partition_sizes_rcb_,
Copy link
Copy Markdown
Contributor

@cwpearson cwpearson Mar 6, 2026

Choose a reason for hiding this comment

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

If this is something we're using outside KokkosSparse, it should not be in KokkosSparse::Impl. Please make a corresponding change in Kokkos Kernels to move this into KokkosSparse or KokkosSparse::Experimental.

Copy link
Copy Markdown
Contributor Author

@vqd8a vqd8a Apr 1, 2026

Choose a reason for hiding this comment

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

@cwpearson It is now in the Experimental namespace. Could you please review this again? Thanks.

Signed-off-by: Vinh Dang <vqdang@sandia.gov>
@vqd8a vqd8a merged commit 64f8b94 into trilinos:develop Apr 2, 2026
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants