Sparse preconditioners

Sparse preconditioners

Hi all.

I am currently experimenting some troubles using Adaptive-Spike with sparse preconditioners while it works perfectly with dense preconditioners.

I am using the library to solve general sparse linear systems with preconditioners almost always sparse within the band.
When I set my sparse preconditioner in the dense format (pre.format='D'), it works but leads to poor performances (due to comunication and computation overheads). When I set my preconditioner in the CSR format (pre.format='S'), the library seems to use an identity matrix as the preconditioner.

You will find enclosed two examples to illustrate this. These examples
are special cases and use M=A.
sets preconditioner in the dense banded format and bicgstab do not need
to iterate to converge as expected. Example_2 sets the same preconditioner in the CSR format and bicgstab need two iterations
to converge. Results are exactly the same
by setting identity matrix as the preconditioner. Obviously, bicgstab
fails to converge in more realistic cases.

I don't understand this behavior (documentation states that it is possible to define sparse preconditionners) and have no idea where I am wrong.

Advices would be helpful.

Best regards,

Benoit Claudel

Downloadtext/x-csrc example_1.c3.33 KB
Downloadtext/x-csrc example_2.c2.45 KB
2 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

Dear Benoit,Thank you for your interest in SPIKE and your clear description of the problem.It is a small error within SPIKE when a sparse preconditioner is provided that caused the problem.A quick fix consist of adding few extra-lines in your driver examples where the local size of the partitions neednow to be specified.In example2, you should add (just after "pre.n = mat.n;"): pre.sizeAj=pre.n/nb_procs;meaning that the size of each partition has to be known locally for each processors.This has solved the problem.However, in case pre.n cannot by divided by nb_procs, and following the definition of the automatic partitioning within SPIKE, the partitions 1 to nb_procs-1 have all the same size and the last partition should be the smallest size. For example n=18, and you run on 4 processors, sizeAj should have the values 5,5,5,3 respectively for ranks 0,1,2 and 3.Best Regards,Eric Polizzi

Leave a Comment

Please sign in to add a comment. Not a member? Join today