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

Speed up SparseLU

Tags: None
(comma "," separated)
metalfox
Registered Member
Posts
7
Karma
0

Speed up SparseLU

Tue Jun 21, 2016 11:32 am
I’m performing 2D shell elements analysis. My problem has geometric and constitutive non-linearities and is time dependent. I solve the resulting sparse system of equations by means of Eigen::SparseLU<Eigen::SparseMatrix<double>>, which for the problem at hand performs faster than the conjugate gradient iterative solver. I compute the solver only once and solve it multiple times.
Since I have to solve thousands of such systems I’d like to speed it up. I turned –fopenmp on but I only noticed a shy use of the available cores and calculation time stays more or less the same. Are there any other ways of improving its performance?
Thanks
User avatar
ggael
Moderator
Posts
3447
Karma
19
OS

Re: Speed up SparseLU  Topic is solved

Tue Jun 21, 2016 2:56 pm
The solve step is bound by sparse triangular solves with dense rhs. This operation is not multithreaded yet, and its multi-threading is not a trivial task, so I'm afraid there is no easy way to get significant speed up at the moment.

In the future it would be very welcome to implement such an algorithm, for instance following the STS-k paper: http://www.personal.psu.edu/gpa5039/res ... 5-stsk.pdf
metalfox
Registered Member
Posts
7
Karma
0

Re: Speed up SparseLU

Thu Sep 15, 2016 7:59 am
I gave a try to PardisoLU (together with EIGEN_USE_MKL_ALL) and I got a massive speedup. I'm very impressed. Hope this helps other users.
User avatar
ggael
Moderator
Posts
3447
Karma
19
OS

Re: Speed up SparseLU

Thu Sep 15, 2016 8:09 am
Are you still referring to the solve step ? If so, I'd be interested to know more precisely the speed-up you got for the solve step?
metalfox
Registered Member
Posts
7
Karma
0

Re: Speed up SparseLU

Thu Sep 15, 2016 8:43 am
ggael wrote:Are you still referring to the solve step ? If so, I'd be interested to know more precisely the speed-up you got for the solve step?

No. I'm referring to the whole program, but I'd say the bottleneck is the solve step. This afternoon (in Spain) I'll make some timing experiments and I'll post the results.
metalfox
Registered Member
Posts
7
Karma
0

Re: Speed up SparseLU

Thu Sep 15, 2016 9:40 am
I've made the test:

Sparse matrix of doubles with about 100 000 non-zero elements.

Test ran on a Intel Xeon E5645 (SSE4.2 I believe)

Eigen::SparseLU compiled with g++-4.8 -std=c++1y -Ofast -fopenmp -march=native
solve step: 45 ms

Eigen::PardisoLU compiled with icpc-16 -std=c++1y -fast -mkl=parallel -qopenmp
solve step: 7 ms

EDIT:
Eigen::SparseLU compiled with icpc-16 -std=c++1y -fast -qopenmp
solve step: 37 ms
User avatar
ggael
Moderator
Posts
3447
Karma
19
OS

Re: Speed up SparseLU

Thu Sep 15, 2016 2:01 pm
That's indeed a huge speed up. Thanks for the numbers.
ivanchang
Registered Member
Posts
7
Karma
0

Re: Speed up SparseLU

Fri Sep 16, 2016 3:22 am
metalfox wrote:I gave a try to PardisoLU (together with EIGEN_USE_MKL_ALL) and I got a massive speedup. I'm very impressed. Hope this helps other users.


Would you mind teach me how to use PardisoLU in IDE?? I installed MKL in my mac and include the path in my project. But when I use Eigen::PardisoLU, it fails to run.


Bookmarks



Who is online

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