Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Wolfram_Ruehaak
Beginner
61 Views

Problem with mkl_dcsrmv

Hello

In the attached example (creating dense matrix sv - > transforming into sparse matrix v -> multiplying with vector u) there is a problem with the mkl_dcsrmv routine. I.e. the value stored in the product vector y is wrong.
I would be very happy if someone could tell me what I do wrong.

Heres the code:
test.cpp

Kind regards
Wolfram
0 Kudos
1 Reply
Wolfram_Ruehaak
Beginner
61 Views

I found the reason: as the solution which is solved is y = alpha*A*x + beta*y (and not just y=A*x) it is necessary to initialize y. In the given case all y values hasve to be set to 0 before calling to mkl_dcsrmv.

Kind regards
Wolfram
Reply