KokkosKernels: Problems with Kokkos_Sparse_CrsMatrix
Created by: brian-kelley
I'm trying to use the Kokkos::CrsMatrix to write a local threaded matrix addition. I've run into a couple of issues with it (one I've figured out, and one I haven't - maybe I should make 2 issues?):
-The documentation says that the raw host array constructor expects coordinates format (rows, cols, values) but it really expects CRS (rowptrs, colinds, values). I've changed my usage code to give CRS and it now works.
-I should be able to get a Kokkos::SparseRowView of row i by calling mat.row(i). This should let me directly get at the colinds and values in row i. But, every view I get back is empty (rowView.length == 0). I tried calling .row(i) for every row:
C has 380473 nonzeros, 10000 rows, 10000 cols. Number of nz in each row: 0 0 0 0 0 0 0 0 0 0 (...and so on for 10,000 zeros)
C->nnz(), C->numRows() and C->numCols() all print what I expect (the first line of output), so there are entries in there. This looks like a simple bug, but is there anything special I need to do to get these row views?