[petsc-users] MatMPIBAIJSetPreallocation() diagonal block:
Ferrand, Jesus A.
FERRANJ2 at my.erau.edu
Mon Jan 17 17:40:27 CST 2022
Greetings!
I have a question about preallocating memory for a parallel BAIJ matrix. From the documentation of MatMPIBAIJSetPreallocation(), the preallocation is divided between the so-called "diagonal" and "off-diagonal" sub matrices. In the example from the documentation, the following illustration is given for the portion of a matrix that owns rows 3,4, and 5 of some 12-column matrix:
0 1 2 3 4 5 6 7 8 9 10 11
--------------------------
row 3 |o o o d d d o o o o o o
row 4 |o o o d d d o o o o o o
row 5 |o o o d d d o o o o o o
--------------------------
I have a few questions: about MPIBAIJ matrices, I am somewhat confused by the description:
1. If the rank owned, say 5 rows instead of 3 on the same matrix, would the "d" block become a 5 by 5? as in:
2.
0 1 2 3 4 5 6 7 8 9 10 11
--------------------------
row 3 |o o o d d d d d o o o o
row 4 |o o o d d d d d o o o o
row 5 |o o o d d d d d o o o o
row 6 |o o o d d d d d o o o o
row 7 |o o o d d d d d o o o o
--------------------------
1. Is there a way to not have to deal with "d" blocks and "o" blocks separately? I know how many nonzero blocks are in each row of my matrix but I can't easily determine which of those zeros are in the "d" block or "o" block of my ranks.
2. The block size "bs", that is the size of each individual "d" or "o" as shown in the diagrams right?
3. TRUE/FALSE: The parameters d_nz, o_nz, d_nnz, and o_nnz, those specify the number of "d" and "o" blocks that are nonzero (where each "d" or "o" is its own dense submatrix), not the actual number of nonzeros in the rows, right? Say the block size is 3 and I set d_nz to 2, then for the diagram from the documentation this translates to 54 actual nonzeros in the diagonal block, right?
Sincerely:
J.A. Ferrand
Embry-Riddle Aeronautical University - Daytona Beach FL
M.Sc. Aerospace Engineering | May 2022
B.Sc. Aerospace Engineering
B.Sc. Computational Mathematics
Sigma Gamma Tau
Tau Beta Pi
Honors Program
Phone: (386)-843-1829
Email(s): ferranj2 at my.erau.edu
jesus.ferrand at gmail.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20220117/8ae679aa/attachment.html>
More information about the petsc-users
mailing list