Slow SpMV (sparse matrix vector product) performance

4 ビュー (過去 30 日間)
Zheng Gu
Zheng Gu 2015 年 5 月 21 日
回答済み: Zheng Gu 2015 年 5 月 22 日
In R2014b, I am performing many SpMV operations using a sparse complex banded matrix with 9 elements per row, grouped in triplets (one triplet is a tridiagonal), and a dense complex vector with about 4 million elements. For some reason, it is extremely slow, taking around 10 seconds to do one on my Core i7 (2.66Ghz quad core) in Win7 x64. I've seen the CUDA libraries for SpMV, but do not have the parallel computing toolbox. Is there anything better to do than just a A*b to try to improve the awful performance?
Edit: I tried this individual command in the MATLAB console and it is about 30x faster (just over 0.3 seconds)! E.g., in my script, I have:
while x
tic
y = A*b;
toc
% other code
end
And in the console I have: tic; y=A*b; toc; And there is a 30x difference between the two. This is consistent and reproducible, but makes no sense to me. If anything, shouldn't the m-file be faster?

採用された回答

Zheng Gu
Zheng Gu 2015 年 5 月 22 日
Issue solved. This was a memory problem. I had used too much memory in the script and MATLAB needed to copy the data from the swap file in order to perform the SpMV.

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeGPU Computing についてさらに検索

タグ

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by