[petsc-users] Why use MATMPIBAIJ?

Justin Chang jychang48 at gmail.com
Wed Jan 13 22:24:46 CST 2016


Thanks Barry,

1) So for block matrices, the ja array is smaller. But what's the
"hardware" explanation for this performance improvement? Does it have to do
with spatial locality where you are more likely to reuse data in that ja
array, or does it have to do with the fact that loading/storing smaller
arrays are less likely to invoke a cache miss, thus reducing the amount of
bandwidth?

2) So if one wants to assemble a monolithic matrix (i.e., aggregation of
more than one dof per point) then using the BAIJ format is highly
advisable. But if I want to form a nested matrix, say I am solving Stokes
equation, then each "submatrix" is of AIJ format? Can these sub matrices
also be BAIJ?

Thanks,
Justin

On Wed, Jan 13, 2016 at 9:12 PM, Barry Smith <bsmith at mcs.anl.gov> wrote:

>
> > On Jan 13, 2016, at 9:57 PM, Justin Chang <jychang48 at gmail.com> wrote:
> >
> > Hi all,
> >
> > 1) I am guessing MATMPIBAIJ could theoretically have better performance
> than simply using MATMPIAIJ. Why is that? Is it similar to the reasoning
> that block (dense) matrix-vector multiply is "faster" than simple
> matrix-vector?
>
>   See for example table 1 in
> http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.38.7668&rep=rep1&type=pdf
>
> >
> > 2) I am looking through the manual and online documentation and it seems
> the term "block" used everywhere. In the section on "block matrices" (3.1.3
> of the manual), it refers to field splitting, where you could either have a
> monolithic matrix or a nested matrix. Does that concept have anything to do
> with MATMPIBAIJ?
>
>    Unfortunately the numerical analysis literature uses the term block in
> multiple ways. For small blocks, sometimes called "point-block" with BAIJ
> and for very large blocks (where the blocks are sparse themselves). I used
> fieldsplit for big sparse blocks to try to avoid confusion in PETSc.
> >
> > It makes sense to me that one could create a BAIJ where if you have 5
> dofs of the same type of physics (e.g., five different primary species of a
> geochemical reaction) per grid point, you could create a block size of 5.
> And if you have different physics (e.g., velocity and pressure) you would
> ideally want to separate them out (i.e., nested matrices) for better
> preconditioning.
>
>    Sometimes you put them together with BAIJ and sometimes you keep them
> separate with nested matrices.
>
> >
> > Thanks,
> > Justin
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20160113/90bc6e1f/attachment.html>


More information about the petsc-users mailing list