I think the easiest thing to do is use a BAIJ matrix with blocksize 4 to store<br>all the matrices. Then factorization will handle LAPACK for you.<br><br>&nbsp; Matt<br><br><div class="gmail_quote">On Fri, Feb 13, 2009 at 3:01 PM, Shao-Ching Huang <span dir="ltr">&lt;<a href="mailto:schuang@ats.ucla.edu">schuang@ats.ucla.edu</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Hi<br>
<br>
I need to invert a bunch of independent, dense 4x4 matrices on each<br>
MPI process. (This is separate from the main computation, a parallel<br>
Ax=b solve.) I am thinking of using LAPACK&#39;s DGESV to invert these 4x4<br>
matrices.<br>
<br>
In my code, is it necessary to call LAPACK directly? Or does PETSc<br>
already have a convenient interface to LAPACK?<br>
<br>
The size 4x4 may be increased to 8x8 or so later, so I am not trying<br>
to use the closed-form inversion formula.<br>
<br>
Thanks,<br><font color="#888888">
<br>
Shao-Ching<br>
</font></blockquote></div><br><br clear="all"><br>-- <br>What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.<br>-- Norbert Wiener<br>