<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body style="overflow-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;"><br><div><br><blockquote type="cite"><div>On 26 Aug 2023, at 11:16 PM, Carl-Johan Thore <carl-johan.thore@liu.se> wrote:</div><br class="Apple-interchange-newline"><div><div>"(Sadly) MATSBAIJ is extremely broken, in particular, it cannot be used to retrieve rectangular blocks in MatCreateSubMatrices, thus you cannot get the A01 and A10 blocks in PCFIELDSPLIT.<br>I have a branch that fixes this, but I haven’t rebased in a while (and I’m AFK right now), would you want me to rebase and give it a go, or must you stick to a release tarball?"<br><br>Ok, would be great if you could look at this! I don't need to stick to any particular branch.<br><br>Do you think MATNEST could be an alternative here?</div></div></blockquote><div><br></div><div>Well, your A00 and A11 will possibly be SBAIJ also, so you’ll end up with the same issue.</div><div>I’m using both approaches (monolithic SBAIJ or Nest + SBAIJ), it was crashing but I think it was thoroughly fixed in <a href="https://gitlab.com/petsc/petsc/-/commits/jolivet/feature-matcreatesubmatrices-rectangular-sbaij/">https://gitlab.com/petsc/petsc/-/commits/jolivet/feature-matcreatesubmatrices-rectangular-sbaij/</a></div><div>It is ugly code on top of ugly code, so I didn’t try to get it integrated and just used the branch locally, and then moved to some other stuff.</div><div>I’ll rebase on top of main and try to get it integrated if it could be useful to you (but I’m traveling right now so everything gets done more slowly, sorry).</div><div><br></div><div>Thanks,</div><div>Pierre</div><br><blockquote type="cite"><div><div> My matrix is<br>[A00 A01;<br> A01^t A11]<br>so perhaps with MATNEST I can make use of the block-symmetry at least, and then use MATSBAIJ for <br>A00 and A11 if it's possible to combine matrix types which the manual seems to imply. <br><br>Kind regards<br>Carl-Johan<br><br><br><blockquote type="cite">On 26 Aug 2023, at 10:09 PM, Carl-Johan Thore <carljohanthore@gmail.com> wrote:<br><br>Hi,<br><br>I'm trying to use PCFIELDSPLIT with MATSBAIJ in PETSc 3.19.4. <br>According to the manual "[t]he fieldsplit preconditioner cannot <br>currently be used with the MATBAIJ or MATSBAIJ data formats if the <br>blocksize is larger than 1". Since my blocksize is exactly 1 it would seem that I can use PCFIELDSPLIT. But this fails with "PETSC ERROR: For symmetric format, iscol must equal isrow"<br>from MatCreateSubMatrix_MPISBAIJ. Tracing backwards one ends up in <br>fieldsplit.c at<br><br>/* extract the A01 and A10 matrices */ ilink = jac->head; <br>PetscCall(ISComplement(ilink->is_col, rstart, rend, &ccis)); if <br>(jac->offdiag_use_amat) { PetscCall(MatCreateSubMatrix(pc->mat, <br>ilink->is, ccis, MAT_INITIAL_MATRIX, &jac->B)); } else {<br> PetscCall(MatCreateSubMatrix(pc->pmat, ilink->is, ccis, <br>MAT_INITIAL_MATRIX, &jac->B)); }<br><br>This, since my A01 and A10 are not square, seems to explain why iscol is not equal to isrow.<br>From this I gather that it is in general NOT possible to use <br>PCFIELDSPLIT with MATSBAIJ even with block size 1?<br><br>Kind regards,<br>Carl-Johan<br></blockquote><br></div></div></blockquote></div><br></body></html>