forums.silverfrost.com Forum Index forums.silverfrost.com
Welcome to the Silverfrost forums
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Sparse Matrix Solution tools for matrix inversion
Goto page Previous  1, 2
 
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> Support
View previous topic :: View next topic  
Author Message
John-Silver



Joined: 30 Jul 2013
Posts: 1520
Location: Aerospace Valley

PostPosted: Sun Mar 27, 2016 2:45 am    Post subject: Reply with quote

just out of interest in passing, for those interested in buying 1 or all the volumes, for themselves or their place of work, on the Elsevier site there's a special promotion, Buy 1 get 1 Free.
Each book is nominally 112 Euros (or equiv. in your currency).
Available in paper or electronic form at same price.
Here's a link to the page for those interested.

http://store.elsevier.com/product.jsp?isbn=9781856176330&_requestid=406247

Code:- STEM16 (just in case it disappears from the linked page above, it might still work for people who only see this post at a later date.

Ignore the 'buy them both for' offer at top of page , it's mor expensive than using the code !!!Just search for each volume and add to basket then apply code on form (view basket).

So, choose 2 for 112 euros, or 4 for 224, or all 6 (book and electronic of all 3 volumes) for 336. Half price.
Back to top
View user's profile Send private message
narayanamoorthy_k



Joined: 19 Jun 2014
Posts: 142
Location: Chennai, IN

PostPosted: Mon Mar 28, 2016 7:02 am    Post subject: Reply with quote

Thank you all for your reply & suggestions.
_________________
Thanks and Regards
Moorthy
Back to top
View user's profile Send private message
narayanamoorthy_k



Joined: 19 Jun 2014
Posts: 142
Location: Chennai, IN

PostPosted: Tue Mar 29, 2016 4:44 am    Post subject: Re: Reply with quote

DanRRight wrote:
PM me your email address and I will send the source codes


Hi Dan
Thanks for your reply. I have sent my email id through PM yesterday. Did you receive it?. Not sure you received it, as the mail is still in my OutBox and not dispatched. Hence, attaching my personal email id here.
narayanamoorthy_k@yahoo.com

Thanks
_________________
Thanks and Regards
Moorthy
Back to top
View user's profile Send private message
JohnCampbell



Joined: 16 Feb 2006
Posts: 2554
Location: Sydney

PostPosted: Thu Mar 31, 2016 12:21 am    Post subject: Reply with quote

Moorthy,

You have been requesting information on solution of linear equations with sparse matrices. The most common approach is the use of a skyline or profile solver and there are many examples of this published. I suggest googling Taylor skyline solver. Robert Taylor (UCB) provided the solver code in Zienkiewicz's book Ver ? and I think for the feap package, which is a widely known source.
I first used the skyline solver based on a paper by Graham Powell in 1973 and I am still modifying it today, using vector instructions and OpenMP.

A couple of other points:
It is rarely a good approach to invert the matrix, unless it is very small. Any sparsity is typically lost when the matrix is inverted.
Skyline solvers are used for a class of sparse matrices, which are "banded". You did not describe the sparsity that your matrix has, but the type of sparsity is an important issue. Most finite element matrices have this type of sparsity.
Most skyline solvers are for symmetric positive definite matrices, although the sparsity attribute these solvers utilise can be modified/applied to non-symmetric indefinite matrices.

I would expect that there is a Fortran version of a skyline solver available from someone in every university engineering school.

You should spend some more time reviewing the sparsity types that are solved and where these matrices are used. There are maths packages (eg MKL and Pardiso) that support different types of sparsity, although they can require a greater understanding of the solution process to be used effectively. Others would have more experience of these than me.

John
Back to top
View user's profile Send private message
narayanamoorthy_k



Joined: 19 Jun 2014
Posts: 142
Location: Chennai, IN

PostPosted: Thu Mar 31, 2016 6:14 am    Post subject: Reply with quote

John
Thank you very much for your wonderful suggestions. I will explore.

I know that finding an inverse of a sparse matrix, will fetch in full matrix, hence the exploitation of the sparsity will be advantageous in terms of storage and performance. I am trying with factorisation, reduction and forward and backward substitution approaches to use it for finding the unknown variables. I will check your suggestions too. Thanks.

What is the title of the paper by Graham Powell who published in 1973?
_________________
Thanks and Regards
Moorthy
Back to top
View user's profile Send private message
JohnCampbell



Joined: 16 Feb 2006
Posts: 2554
Location: Sydney

PostPosted: Thu Mar 31, 2016 9:51 am    Post subject: Reply with quote

"Towards optimal in-core equation solving"
by Digambar P. Mondkar and Graham H. Powell
Computers & Structures, Vol. 4, pp. 531-548. Pergamon Press 1974.

See also Computers & Structures, Vol. 4, pp. 699-728. Pergamon Press 1974. for second paper.

It has a Fortran IV listing, which can be updated to F77/F90 DO loop syntax.
This has been the basis for many codes developed since then, and I would suspect was used by Taylor.
Back to top
View user's profile Send private message
narayanamoorthy_k



Joined: 19 Jun 2014
Posts: 142
Location: Chennai, IN

PostPosted: Fri Apr 01, 2016 12:11 pm    Post subject: Reply with quote

Thank you John, for the details of the paper.
_________________
Thanks and Regards
Moorthy
Back to top
View user's profile Send private message
DanRRight



Joined: 10 Mar 2008
Posts: 2816
Location: South Pole, Antarctica

PostPosted: Sun Apr 03, 2016 5:39 am    Post subject: Reply with quote

John,
Is the skyline solver your primary CPU time killer? Try LAIPE parallel skyline solver and compare it to your parallel method, interesting what you'll get. And one more info: on AMD processors vs Intel ones the LAIPE skyline solver was literally doing unexplainable miracles: even cheapest 4-core AMD laptops were beating super-overclocked Intel desktop monsters. Do not believe me? Go to equation dot com website and download skyline test program compiled using IVF Fortran to supposedly best fit Intel computers. Run it on AMD and Intel and see yourself
Back to top
View user's profile Send private message
JohnCampbell



Joined: 16 Feb 2006
Posts: 2554
Location: Sydney

PostPosted: Mon Apr 04, 2016 1:56 am    Post subject: Reply with quote

Hi Dan,
The skyline solver is the solver I use.
I am aware of Laipe, but prefer to develop my own solver and learn from the process. I have made good progress and have a solver which works well in comparison to other solvers I have reviewed.
The main outcome of this study was:
* use of OpenMP to enable multiple threads
* use of vector instructions to speed up each thread
* partitioning of the solution process to balance thread load
* and importantly adopting a strategy of cache usage to minimise the limitations of the memory transfer bottleneck.

When I first started learning about OpenMP, I did not appreciate the limitation of memory access speed, transferring information to and from memory. It is important to use strategies to keep information in the cache and to modify the cache info, minimising the transfers between cache and memory. If you have 8 threads all accessing memory this becomes the performance bottleneck. Even single thread AVX vector instructions become constrained and can only work effectively if the vectors are already in the cache. You can see this when running on processors with different clock rates, the performance ratios are more dominated by the memory access speed and the cache size. (Early on, I wrote tests that could not show the benefit of AVX over SSE, because of the memory speed problem)

There are lots of calculations that become too complex for multi-thread coding (too much work!) or the calculation packet is too small to overcome the multi-thread overheads (entering a !$OMP region can take about 20,000 processor cycles). I have found they can be more easily improved by running multiple single-thread processes that target vector instructions. The hopeful inclusion of vector instructions in FTN95 will maintain it as a useful development and operation compiler.

John
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> Support All times are GMT + 1 Hour
Goto page Previous  1, 2
Page 2 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group