MPIAIJ and MatSetValuesBlocked
rlmackie862 at gmail.com
Mon May 4 14:56:18 CDT 2009
Can you explain how to tell if the matrix is truly blocked? What's the
difference between a blocked matrix and one with several degrees of freedom
at each node, or are they the same thing? I'm solving Maxwell's equations
in 3D, so I have three vector field components at each node, is that what
you mean by blocked?
Jed Brown wrote:
> Ryan Yan wrote:
>> Could you make a little bit more clarification
>> on why the MatSetValuesBlocked() have some advantage on blocked structure?
> In addition to the assembly advantages that Satish pointed out, BAIJ
> requires less storage for the column indices, effectively improving the
> arithmetic intensity of many kernels, and speeding up matrix
> factorization (e.g. symbolic factorization only needs to compute fill in
> terms of blocks instead of individual elements). The use of inodes with
> AIJ (default when applicable) reduces the memory bandwidth requirements
> of the column indices, turns point relaxation smoothers (SOR) into
> stronger block relaxation, and allows a certain amount of unrolling.
> BAIJ requires even less metadata, provides more regular memory access,
> and does more unrolling.
> If your matrix is truly blocked, BAIJ should provide better performance
> with all preconditioners that support it. Many third-party
> preconditioners will not work with BAIJ, so it is useful to give your
> matrix a prefix (or check the options database if you are getting your
> matrix from a DA or similar) so that you can set it's type with
> -foo_mat_type when using a preconditioner that requires it.
More information about the petsc-users