I have a sparse matrix in the coo format obtained from finite element assembly. It has many duplicate entries in the triplet format. I want to sum them up efficiently using Fortran. I went through the sparse kit package but I didn't find a subroutine that does this job. Any suggestions on how to achieve this efficiently? thanks.
Asked
Active
Viewed 136 times
0
-
which sparse kit are you using? – epsi1on Jul 20 '21 at 05:46
-
Hi @epsi1on, I am using sparsekit2 by saad. I didn't find any routine for removing duplicates from a coo matrix. Is it embedded in any other subroutine? – bharat Jul 22 '21 at 17:41
-
are you sure that the sparsekit2 do not handle duplicates when it convert COO format to CSR format? – epsi1on Aug 02 '21 at 04:44
1 Answers
0
I don't know about your kit, but in the Python implementation, this summing is done as part of the conversion to csr
format. The coo
entries are sorted, by row, and within that by column. That puts duplicates next to each other.

hpaulj
- 221,503
- 14
- 230
- 353