[petsc-users] Question about setting block size for arbitrary Mat formats
Matthew Knepley
knepley at gmail.com
Wed Oct 27 14:47:56 CDT 2021
On Wed, Oct 27, 2021 at 12:25 PM Samuel Estes <samuelestes91 at gmail.com>
wrote:
> Hi,
>
> I am solving a linear system in which the matrix has some block structure.
> We will ultimately use the BAIJ format but for now we are just using the
> default CSR and would like to play with different formats to compare
> performance for our problem. Currently, I call MatSetBlockSize so that I
> can then use MatSetValuesBlocked and MatSetValuesBlockedLocal.
>
> My question is: in the absence of specifying one of the blocked formats,
> does setting the block size with MatSetBlockSize have any real effect on
> performance? My understanding is that it is really just useful from a
> programming perspective in that it allows you to set/access Mat values in
> blocks which is often a natural way to do things. Obviously changing the
> actual format to have a blocked structure could make a difference but I
> just want to check if there's anything else going on under the hood with
> the block size when the matrix is in AIJ format.
>
There are no performance gains with MatMult I think. There is some
specialized code for inverting blocks, but it does not sound like you would
be using that.
Thanks,
Matt
> Thanks!
>
> Sam
>
--
What most experimenters take for granted before they begin their
experiments is infinitely more interesting than any results to which their
experiments lead.
-- Norbert Wiener
https://www.cse.buffalo.edu/~knepley/ <http://www.cse.buffalo.edu/~knepley/>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20211027/60d80a73/attachment.html>
More information about the petsc-users
mailing list