- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
There are a number of Sparse BLAS routines such as mkl_?cscmm etc that compute, say,C=(alpha*A*B + beta* C) or similar.
I would assume that if beta==0.0 that the matrix C does not need to be initialized to 0.0 ( or any other value). That is that MKL will not do the beta*C operation if beta is identically 0.0. It is not clear from the documentation.
I ask this as I have found this NOT to be the case with mkl_?cscmm. I was not initializing C. Most of the time this is ok, as all entries of beta*C will evaluate to 0.0. However, sometimes, the un-initialized memory of C would randomly be some kind of NaN, and beta(0.0) * NaNevaluatedto a NaN which polluted the resultant matrix.
zgemm(3) does not have this 'problem'. It specifically says "When beta is equal to zero, then c need not be set on input".
1 Solution
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Quoting - Gennady Fedorov (Intel)
Vasci, yes this is the bug and we will work at this problem in the next version.
--Gennady
--Gennady
Hi Vasci,
The problem you reported was fixed in the version 10.2.
This version available for download from intel registration center: https://registrationcenter.intel.com/
I am closing the issue.
You can reopen this issue within 30 days or open a new one
if you will encounter further problem with this issue.
Regards, Gennady
Please see below the output for the MKL 10.1 and MKL 10.2 versions:
==================== MKL 10.1 ==========================
EXAMPLE PROGRAM FOR COMPRESSED SPARSE ROW FORMAT ROUTINES
INPUT DATA FOR MKL_DCSCMM
WITH TRIANGULAR MATRIX
M = 5 N = 2
ALPHA = 1.0 BETA = 0.0
TRANS = 'T'
Input matrix
1.0 5.0
1.0 4.0
1.0 3.0
1.0 2.0
1.0 1.0
OUTPUT DATA FOR MKL_DCSCMM
WITH TRIANGULAR MATRIX
>>>> -1.$ >>>> -1.$
>>>> -1.$ >>>> -1.$
>>>> -1.$ >>>> -1.$
>>>> -1.$ >>>> -1.$
>>>> -1.$ >>>> -1.$
Press any key to continue . . .
==================== MKL 10.2 ===========================
EXAMPLE PROGRAM FOR COMPRESSED SPARSE ROW FORMAT ROUTINES
INPUT DATA FOR MKL_DCSCMM
WITH TRIANGULAR MATRIX
M = 5 N = 2
ALPHA = 1.0 BETA = 0.0
TRANS = 'T'
Input matrix
1.0 5.0
1.0 4.0
1.0 3.0
1.0 2.0
1.0 1.0
OUTPUT DATA FOR MKL_DCSCMM
WITH TRIANGULAR MATRIX
>>>> -5.0 >>>> -11.0
>>>> 13.0 >>>> 28.0
>>>> 6.0 >>>> 16.0
>>>> 7.0 >>>> 14.0
>>>> -5.0 >>>> -5.0
Press any key to continue . . .
--Gennady
Link Copied
3 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Vasci, yes this is the bug and we will work at this problem in the next version.
--Gennady
--Gennady
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
But 0 * NaNshould equal NaN, no?
As in:
double n = 0 * std::numeric_limits::quiet_NaN();
printf("%f", n);
which outputs: 1.#QNAN0
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Quoting - Gennady Fedorov (Intel)
Vasci, yes this is the bug and we will work at this problem in the next version.
--Gennady
--Gennady
Hi Vasci,
The problem you reported was fixed in the version 10.2.
This version available for download from intel registration center: https://registrationcenter.intel.com/
I am closing the issue.
You can reopen this issue within 30 days or open a new one
if you will encounter further problem with this issue.
Regards, Gennady
Please see below the output for the MKL 10.1 and MKL 10.2 versions:
==================== MKL 10.1 ==========================
EXAMPLE PROGRAM FOR COMPRESSED SPARSE ROW FORMAT ROUTINES
INPUT DATA FOR MKL_DCSCMM
WITH TRIANGULAR MATRIX
M = 5 N = 2
ALPHA = 1.0 BETA = 0.0
TRANS = 'T'
Input matrix
1.0 5.0
1.0 4.0
1.0 3.0
1.0 2.0
1.0 1.0
OUTPUT DATA FOR MKL_DCSCMM
WITH TRIANGULAR MATRIX
>>>> -1.$ >>>> -1.$
>>>> -1.$ >>>> -1.$
>>>> -1.$ >>>> -1.$
>>>> -1.$ >>>> -1.$
>>>> -1.$ >>>> -1.$
Press any key to continue . . .
==================== MKL 10.2 ===========================
EXAMPLE PROGRAM FOR COMPRESSED SPARSE ROW FORMAT ROUTINES
INPUT DATA FOR MKL_DCSCMM
WITH TRIANGULAR MATRIX
M = 5 N = 2
ALPHA = 1.0 BETA = 0.0
TRANS = 'T'
Input matrix
1.0 5.0
1.0 4.0
1.0 3.0
1.0 2.0
1.0 1.0
OUTPUT DATA FOR MKL_DCSCMM
WITH TRIANGULAR MATRIX
>>>> -5.0 >>>> -11.0
>>>> 13.0 >>>> 28.0
>>>> 6.0 >>>> 16.0
>>>> 7.0 >>>> 14.0
>>>> -5.0 >>>> -5.0
Press any key to continue . . .
--Gennady
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