[petsc-users] building kokkos matrices on the device

Junchao Zhang junchao.zhang at gmail.com
Tue Feb 25 16:16:37 CST 2025


Hi, Steven,
  MatSetSeqAIJKokkosWithCSRMatrix(Mat A, Mat_SeqAIJKokkos *akok) uses a
private data type Mat_SeqAIJKokkos, so it can not be directly made public.
  If you already use COO, then why not directly make the matrix of type
MATAIJKOKKOS and call MatSetPreallocationCOO() and MatSetValuesCOO()?
  So I am confused by your needs.

Thanks!
--Junchao Zhang


On Tue, Feb 25, 2025 at 3:39 PM Steven Dargaville <
dargaville.steven at gmail.com> wrote:

> Hi
>
> I'm just wondering if there is any possibility of making:
> MatSetSeqAIJKokkosWithCSRMatrix or MatCreateSeqAIJKokkosWithCSRMatrix in
> src/mat/impls/aij/seq/kokkos/aijkok.kokkos.cxx
> MatSetMPIAIJKokkosWithSplitSeqAIJKokkosMatrices in
> src/mat/impls/aij/mpi/kokkos/mpiaijkok.kokkos.cxx
>
> publicly accessible outside of petsc, or if there is an interface I have
> missed for creating Kokkos matrices entirely on the device?
> MatCreateSeqAIJKokkosWithCSRMatrix for example is marked as PETSC_INTERN so
> I can't link to it.
>
> I've currently just copied the code inside of those methods so that I can
> build without any preallocation on the host (e.g., through the COO
> interface) and it works really well.
>
> Thanks for your help
> Steven
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20250225/416dd3fc/attachment.html>


More information about the petsc-users mailing list