- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I just want to convert a sparse matrix from COO to the BSR format using the code below. It works for very small matrices only. For larger ones I got "BSR error 3" (for SPARSE_LAYOUT_ROW_MAJOR too). Direct conversion from COO to BSR works the same. What am I doing wrong?
Best
P
----------------------
sparse_matrix_t acoo,absr,acsr;
sparse_status_t stat = mkl_sparse_d_create_coo(&acoo, SPARSE_INDEX_BASE_ZERO, m, n, nz, I, J, val);
if(stat!=SPARSE_STATUS_SUCCESS){
printf("COO error %d\n",stat);
exit(1);
}
stat = mkl_sparse_convert_csr(acoo, SPARSE_OPERATION_NON_TRANSPOSE, &acsr);
if(stat!=SPARSE_STATUS_SUCCESS){
printf("CSR error %d\n",stat);
exit(1);
}
MKL_INT bsize=2;
stat = mkl_sparse_convert_bsr(acsr, bsize, SPARSE_LAYOUT_COLUMN_MAJOR, SPARSE_OPERATION_NON_TRANSPOSE, &absr);
if(stat!=SPARSE_STATUS_SUCCESS){
printf("BSR error %d\n",stat);
exit(1);
}
--------------------
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
It seems I have solved the problem: the number of rows should be a multiple of bsize.
Best
P
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You can code the convertion between matrix formats by yourself, this is an easy problem.
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page