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.ste...@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 >