← Back to team overview

dolfin team mailing list archive

Re: [HG] Use UMFPACK (if installed) for LU solution of uBlas matrices.

 

On Mon, 2006-07-10 at 20:07 +0200, Anders Logg wrote:
> Great. How does it compare to solving with a dense uBlas matrix (for a
> reasonably small system) and using the "built-in" uBlasMatrix::solve()?
> 

I've done some testing for a small Poisson problem and here are the
timings solving the system using dense matrices

Matrix size   Factor ( >1 means uBLAS is faster then UMFPACK )
16x16	      9
49x49         2.3
81x81         1.1
121x121       0.5

uBlasLUSolver::solve() does involve the conversion of a dense row major
matrix into a sparse compressed column matrix at each solve, which could
be eating up some time. For sparse matrix data structures, UMFPACK is
faster for all sizes. uBlas functions are generally not optimised for
sparse matrices (the exception is the function axpy_prod()).

Garth


> /Ander
> 
> On Mon, Jul 10, 2006 at 06:37:06PM +0200, Garth N. Wells wrote:
> > On Mon, 2006-07-10 at 18:32 +0200, DOLFIN wrote:
> > > One or more new changesets pushed to the primary DOLFIN repository.
> > > A short summary of the last three changesets is included below.
> > > 
> > > changeset:   2054:0691435ba8b47358c9c50a363ac3424c24ca8420
> > > tag:         tip
> > > user:        "Garth N. Wells <g.n.wells@xxxxxxxxxx>"
> > > date:        Mon Jul 10 18:13:24 2006 +0200
> > > files:       configure configure.ac src/kernel/la/dolfin/uBlasLUSolver.h src/kernel/la/dolfin/ublas.h src/kernel/la/uBlasLUSolver.cpp src/test/Makefile src/test/main.cpp
> > > description:
> > > Use UMFPACK (if installed) for LU solution of uBlas matrices.
> > > 
> > 
> > The direct solver for uBlas data types now uses UMFPACK (which is very
> > fast) if it's installed, otherwise it uses a Krylov solver. When UMFPACK
> > is installed, the demos in src/demo/pde run nice and fast with uBlas
> > matrices and vectors.
> > 
> > If you have a Debian-based distribution, you can install UMFPACK by
> > doing
> > 
> >     apt-get install libumfpack4 libumfpack4-dev 
> >     
> > Packages are available for most common Linux distributions under the
> > name "umfpack" or "ufsparse".
> > 
> > Garth
> > 
> > 
> > > 
> > > changeset:   2053:10663473e69cf9ea1824380b0ef1181744696623
> > > user:        "Garth N. Wells <g.n.wells@xxxxxxxxxx>"
> > > date:        Fri Jul 07 20:18:29 2006 +0200
> > > files:       src/kernel/la/dolfin/uBlasMatrix.h
> > > description:
> > > Use iterators in uBlasMatrix::disp().
> > > 
> > > 
> > > changeset:   2052:9ab764260e78856ffab0b4cb74f90c8815896478
> > > user:        "Anders Logg <logg@xxxxxxxxx>"
> > > date:        Fri Jul 07 19:59:38 2006 +0200
> > > files:       src/kernel/la/dolfin/uBlasMatrix.h
> > > description:
> > > Fix bug in uBlasMatrix::disp(), remove unused variable N
> > > 
> > > 
> > > -------------------------------------------------------
> > > For more details, visit http://www.fenics.org/hg/dolfin
> > > _______________________________________________
> > > DOLFIN-dev mailing list
> > > DOLFIN-dev@xxxxxxxxxx
> > > http://www.fenics.org/mailman/listinfo/dolfin-dev
> > 
> _______________________________________________
> DOLFIN-dev mailing list
> DOLFIN-dev@xxxxxxxxxx
> http://www.fenics.org/mailman/listinfo/dolfin-dev
-- 
Dr. Garth N. Wells
Faculty of Civil Engineering and Geosciences
Delft University of Technology
Stevinweg 1
2628 CN Delft
Netherlands

tel.   +31 15 278 7922
fax.   +31 15 278 6383
e-mail g.n.wells@xxxxxxxxxx
url    http://www.mechanics.citg.tudelft.nl/~garth



References