- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

I have trouble using mkl_dcsrmultcsr when calculating A'A if A is not a square matrix. The problem is the size of array ia.

The doc says ia is an array of length

`m + 1`when

`trans = 'N'`or 'n', or

`n + 1`otherwise. In my case, I was using 'T', so I need to allocate an array of length n + 1. How can a matrix having m rows, but rowIndices array only have length n? I'm really confusing.

Thanks,

Link Copied

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

Many thanks for catching this. It's a bug in documentation. The description of ia must be as follows

ia

INTEGER. Array of length`m + 1`.This array contains indices of elements in the array a, such that

`ia(`is the index in the arraya of the first non-zero element from the row`I`)`I`. The value of the last element`ia(m + 1)`is equal to the number of non-zero elements of the matrix*A*plus one. Refer to rowIndex array description in Sparse Matrix Storage Formats for more details- but array ib should be described as array ia in the current version

ib INTEGER. Array of lengthn

`+ 1`when`trans = 'N'`or 'n', orm`+ 1`otherwise.This array contains indices of elements in the array b, such that

`ib(`is the index in the arrayb of the first non-zero element from the row`I`)`I`. The value of the last element`ib(m + 1)`or`ib(n + 1)`is equal to the number of non-zero elements of the matrix*B*plus one. Refer to rowIndex array description in Sparse Matrix Storage Formats for more details.

Many thanks again

All the best

Sergey

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page