This forum has been archived. All content is frozen. Please use KDE Discuss instead.

Multithreaded sparse matrix vector multiplication

Tags: None
(comma "," separated)
bwolf
Registered Member
Posts
3
Karma
0
Hello,

i started using eigen and i have to say its really nice!

I have to do a sparse matrix vector mutliplication with a rather large matrix, the matrix is 1'000'000 x 10'000 big. Performance is better than expected, but i would like more (i can do it in 1.4seconds now). It seems that eigen does not use threads when doing that multiplication? Or i'm i doing it wrong? I enabled openmp and specified a thread count. Any ideas what i can do? Looking at some other implementations/publications online, it seems like multithreading should give a nice speedboost (not optimal because of memory bandwidth limitations, but still).

Thank you for your feedback! (otherwise i guess i'll have to split the matrix myself and do the parallel multiplication that way)
M00nMan
Registered Member
Posts
32
Karma
0
Only some functions in eigen support multi-threading via openmp.

I had a comparable problem in the past, my solution was to adapt the corresponding function. But take care the matrix write operation have to be coordinated by a semaphore (in openmp critical directive).
Otherwise in good the application will crash ;D in worst case the results are inconsistent. :'(
I assume in your case the overloaded operator function is located in SparseProduct.h .


Bookmarks



Who is online

Registered users: Bing [Bot], claydoh, Google [Bot], rblackwell, Yahoo [Bot]