- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The mkl_dcsrcsc function has a buffer overrun when used on rectangular matrices. It seems to confuse rows and columns when writing the ia / ia1 buffer. See the attached minimal test program for a demonstration of the problem.
This was verified with mkl10.2.5.0.35 and mkl 10.3.0.025.
Best regards,
Brian
Brian
This is the output I get for the test program
Input
Values: 11 12 13 14 15
colIndex: 1 2 1 2 2
colStart: 1 2 3 5
11 *
* 12
13 14
* 15
Output
Values: 11 13 12 14 15
colIndex: 1 3 2 3 4
colStart: 1 3
11 * 13 *
* 12 14 15
Out of bounds access to entry 3 of out_colStart, expected -1 but got 6
Out of bounds access to entry 4 of out_colStart, expected -1 but got 6
Link Copied
1 Reply
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Brian,
Thanks a lot for the small test case! We can reproduce the problem with it. I get same result as yours.
But the result may be expected if we consider the fact of the routinetakethe sparse matrix as square matrices by default.(Thisinfo seems be missed mkldocumentation. I will ask ourdoc developer to add such claim.).
For example, the parameter m INTEGER. Dimension of the matrix A.We give it 4 as input,
as a result, it thought the sparse matrix is 4x4.Thus, theresult matrix should be
11 ** *
*12**
1314 * *
*15 * *
The colIndex: 1 32 3 4 is explained as row in CSC format ( Valume, Row, ColumnIndex)
Value: 11, 13, 12, 14, 15
The out_colStart will be explained as column Index in CSC . It is array with m+1=5 elements. Thusit is 1, 3, 6, 6, 6. according to the below definition.
ia1 INTEGER. Array of length m + 1, containing indices of elements in the array acsc, such that ia(I) is
the index in the array acsc of the first non-zero element ia1 from thecolumn I. The value of the last element ia(m + 1)
is equal to the number of non-zeros plus one.
(It is ok to explainthem as ( Value,Column,RowIndex) inCSCifthe matrix is transposed in your case)
Thanks
Ying
ia1 INTEGER. Array of length m + 1, containing indices of elements in the array acsc, such that ia(I) is
the index in the array acsc of the first non-zero element ia1 from thecolumn I. The value of the last element ia(m + 1)
is equal to the number of non-zeros plus one.
(It is ok to explainthem as ( Value,Column,RowIndex) inCSCifthe matrix is transposed in your case)
Thanks
Ying
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