inverting independent, small dense matrices

Matthew Knepley knepley at
Fri Feb 13 15:11:24 CST 2009

I think the easiest thing to do is use a BAIJ matrix with blocksize 4 to
all the matrices. Then factorization will handle LAPACK for you.


On Fri, Feb 13, 2009 at 3:01 PM, Shao-Ching Huang <schuang at>wrote:

> Hi
> I need to invert a bunch of independent, dense 4x4 matrices on each
> MPI process. (This is separate from the main computation, a parallel
> Ax=b solve.) I am thinking of using LAPACK's DGESV to invert these 4x4
> matrices.
> In my code, is it necessary to call LAPACK directly? Or does PETSc
> already have a convenient interface to LAPACK?
> The size 4x4 may be increased to 8x8 or so later, so I am not trying
> to use the closed-form inversion formula.
> Thanks,
> Shao-Ching

What most experimenters take for granted before they begin their experiments
is infinitely more interesting than any results to which their experiments
-- Norbert Wiener
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the petsc-users mailing list