← Back to team overview

dolfin team mailing list archive

Re: Use of LinearSolver

 

On Fri, May 16, 2008 at 10:55:09AM +0100, Nuno David Lopes wrote:
> GMRES seems to work: 
> -------------------------------------------------------------------------------------------------
> Solving linear system of size 40121 x 40121 (uBlas Krylov solver).
> Krylov solver converged in 14 iterations.
> -------------------------------------------------------------------------------------------------
> I've got the same results for factorized LU.
> 
> 
> CG isn't recognized

CG isn't implemented for uBLAS. Check line 130 and onward in
uBlasKrylovSolver.h.

> and  BiCGStab (the default) "doesn't converge"...
> it makes only one iteration:

I'm not sure how well tested the BiCGStab implementation is, but it's
not very unusual for an iterative method to not converge.

-- 
Anders


> -------------------------------------------------------------------------------------------------
> Solving linear system of size 40121 x 40121 (uBlas Krylov solver).
> *** Warning: Requested Krylov method unknown. Using BiCGStab.
> Krylov solver converged in 1 iterations.
> -------------------------------------------------------------------------------------------------
> The results aren't in agreement with the ones i've got with LU.
> I didn't change any default parameters....
> 
> (I'm testing on a standard heat equation with several boundary conditions and 
> two different heat diffusion coefficient subdomains)
> 
> On Thursday 15 May 2008, Anders Logg wrote:
> > On Thu, May 15, 2008 at 05:24:39PM +0100, Nuno David Lopes wrote:
> > > After a great struggle for a clean install in a ubuntu 8.04 box i could
> > > compile dolfin, with umfpack and without petsc. Just like i have in my
> > > ubuntu 7.10 laptop.
> > >
> > > After some tests i've found that I'm unable to get a KrylovSolver other
> > > than Bicgstag!!!! Is this a Known issue? I guess i've all the blas
> > > related libs...
> >
> > Yes, I think someone else mentioned it to me.
> >
> > See if it works now. I've attempted to fix it. If not, it should be
> > easy to fix.
> >
> > > libboost
> > > atlas3
> > > lapack3
> > > refblas3
> > > with dev's also.
> > >
> > > if i have something like:
> > >
> > > KrylovSolver solver(gmres,ilu);
> > >
> > > KrylovSolver solver(cg);
> > >
> > > LinearSolver solver(gmres);
> > >
> > > solve(A,x,b,gmres);
> > >
> > > i got the following message
> > >
> > > Solving linear system of size 40121 x 40121 (uBlas Krylov solver).
> > > *** Warning: Requested Krylov method unknown. Using BiCGStab.
> > >
> > > I've no problems with LUSolver.(umfpack seems to be alright)
> > >
> > > Is this a Known issue?
> > > Do i need petsc for that?
> > > I can't compile with umfpack and petsc...
> > > but as i've seen thru the mailing list that is known and difficult issue
> > > about package dependencies, right?
> > >
> > > Thanks.
> > >
> > > On Saturday 10 May 2008, Anders Logg wrote:
> > > > LinearSolver is now a general wrapper for all linear solvers
> > > > (rather than a base class for linear solvers). Creating a LinearSolver
> > > > and reusing it instead of calling solve() multiple times gives
> > > > about 5% speedup.
> > > >
> > > > It's a subclass of Parametrized, meaning that it's possible to set
> > > > parameters. For example, it should be possible to do
> > > >
> > > >   LinearSolver solver(gmres, amg);
> > > >   solver.set("Krylov relative tolerance", 1e-6);
> > > >   solver.set("Krylov absolute tolerance". 1e-6);
> > > >   solver.solve(A, x, b);
> > > >
> > > > and have those parameters passed on to the backend (for example
> > > > PETSc).
> > > >
> > > > For those of you interested in setting special parameters to different
> > > > backends, the available parameters are listed in
> > > >
> > > >   dolfin/parameter/DefaultParameters.h
> > > >
> > > > and they are accessed in the different backends by for example
> > > >
> > > >   tol = get("Krylov relative tolerance");
> > > >
> > > > Supply a patch if there are parameters you think are missing.
> > > >
> > > > We probably should not support all parameters for all backends.
> >
> > _______________________________________________
> > DOLFIN-dev mailing list
> > DOLFIN-dev@xxxxxxxxxx
> > http://www.fenics.org/mailman/listinfo/dolfin-dev
> 
> 
> 


Follow ups

References