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

[SOLVED] LU only half as fast as LAPACK/BLAS?

Tags: None
(comma "," separated)
User avatar
bjacob
Registered Member
Posts
658
Karma
3
n2k wrote:
bjacob wrote:If you're using linux or unix you can always make it work on a huge matrix so that it takes like 10 seconds to complete, and during the computation you run 'top' in a terminal. If it says "200%" this means it's using 2 cores of your CPU. Of course this experiments only works if you have a dual core CPU. If you have 1 core, disregard all I said!


I do have 2 cores. I observed that armadillo (blas/lapack) reached 191% while matlab exceeded 200%. Eigen spiked at 101%. So it actually seems that armadillo and matlab are using two cores but this happens only after a few seconds (I'm not sure if this is due to the refresh rate of "top").

I also did other tests and Eigen turned out to be the fastest at smaller matrix sizes. These are the results for the solution of a 50x50 system:
Eigen (partial lu) -> 0.216 ms.
Armadillo -> 0.238 ms
Eigen (full lu) -> 0.332 ms.
Matlab -> 0.350ms


Thanks for the results!

Then increasing the matix size Eigen seems to slow down more rapidly than the other two.


OK so it's going to be a mix of 2 things: 1) the fact that for larger sizes, the ability of other programs to use multiple cores pays off, and 2) the fact that they probably have block versions of these algorithms.

We can fix 2) soon (help still welcome) but 1) is a much tougher one.


Join us on Eigen's IRC channel: #eigen on irc.freenode.net
Have a serious interest in Eigen? Then join the mailing list!


Bookmarks



Who is online

Registered users: Bing [Bot], Google [Bot], Sogou [Bot]