- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I tried Inspector Executor using CSR storage format and it is fine. But when I tried the COO version, I get
SPARSE_STATUS_NOT_SUPPORTED error, in the mkl_sparse_optimize function. Here is a my code:
//Get COO Arrays
//IF you need the implementation of this function I can provide it, I can sort based on column or row used both same error
ExtractCoo(argv[1], &nr, &nc, &nnz, &rows, &columns, &A); float * x = (float*)malloc(nc * sizeof(float)), *y = (float*)malloc(nr * sizeof(float)); //3) Prepare X Array for (int i = 0; i < nc; i++) { x = static_cast <float> (rand()) / static_cast <float> (RAND_MAX); } CALL_AND_CHECK_STATUS( mkl_sparse_s_create_coo(&cooInternal, SPARSE_INDEX_BASE_ONE, nr, nc,nnz, rows, columns, A), "Error in csrCreate \n"); CALL_AND_CHECK_STATUS( mkl_sparse_set_mv_hint(cooInternal, SPARSE_OPERATION_NON_TRANSPOSE, martixDescription, runs), "Error after Sparse Hint \n"); mkl_sparse_set_memory_hint (cooInternal, SPARSE_MEMORY_AGGRESSIVE); CALL_AND_CHECK_STATUS( mkl_sparse_optimize(cooInternal), "Error after MKL_SPARSE_OPTIMIZE \n"); // Here I get an error // Cold Start mkl_sparse_s_mv(SPARSE_OPERATION_NON_TRANSPOSE, 1, cooInternal, martixDescription, x, 0, y); for (int i = 0; i < runs; i++) { stime = dsecnd(); mkl_sparse_s_mv(SPARSE_OPERATION_NON_TRANSPOSE, 1, cooInternal, martixDescription, x, 0, y); etime = dsecnd(); runResults = (etime - stime); }
So what am I doing wrong ?
Thanks,
Mohammad Almasri
Link Copied
2 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
All is ok with this case, the problem is not all optimizations are implemented into the current version. We will improve that into one of the future updates. --regards
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Currently computational routines operate on a matrix handle that stores a matrix in CSR or BSR formats. Other formats should be converted to CSR or BSR format before calling any computational routines. So i recommend to call mkl_sparse_convert_csr before optimization phase
Thanks,
Alex
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page