[Dune] AMG and performance

Arne Rekdal arne at stud.ntnu.no
Sun Apr 26 16:50:48 CEST 2009


Hi all,

I am trying to solve the linear system of equations,
    S r = b,

with Dune::AMG and Dune::CGSolver. I have compared the computation  
time with Fraunhofer's SAMG solver. SAMG uses approx. one third of the  
computation time independent from the problem size, but the memory  
usage of SAMG is twice as high. I am wondering if you have some tips  
of how I can improve the performance of the Dune implementation. I am  
currently using the ILU0 as smoother (relaxfactor=0.8), and the code  
compiled with -O3 option. Any suggestions would be greatly appreciated.


Best regards
Arne Rekdal

---------------------------------------------------------------
 From my code:
---------------------------------------------------------------
Matrix S; // BCRSMatrix
Vector r, b; // BlockVector

typedef Dune::MatrixAdapter<Matrix,Vector,Vector> Operator;
Operator op(S);

typedef  
Dune 
::Amg 
::CoarsenCriterion 
<Dune::Amg::SymmetricCriterion<Matrix,Dune::Amg::FirstDiagonal> >
   Criterion;
typedef Dune::SeqILU0<Matrix,Vector,Vector> Smoother;
typedef Dune::Amg::SmootherTraits<Smoother>::Arguments SmootherArgs;
typedef Dune::Amg::AMG<Operator,Vector,Smoother> AMG;

SmootherArgs smootherArgs;
smootherArgs.relaxationFactor=relax; // relax = 0.8
Criterion criterion;

AMG prec(op, criterion, smootherArgs, 1, 1, 1, false);

double reduction=1e-8;
int maxit=S.N();
int verbose=0;

Dune::CGSolver<Vector> solver(op,prec,reduction,maxit,verbose);
Dune::InverseOperatorResult res;

solver.apply(r,b,res);






More information about the Dune mailing list