<div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sun, Jul 28, 2019 at 2:54 AM Pierre Jolivet via petsc-dev <<a href="mailto:petsc-dev@mcs.anl.gov">petsc-dev@mcs.anl.gov</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div style="overflow-wrap: break-word;">Hello,<div>I’m facing multiple issues with PCREDUNDANT and MATMPISBAIJ:</div><div>1) <a href="https://www.mcs.anl.gov/petsc/petsc-current/src/mat/impls/sbaij/mpi/mpisbaij.c.html#line3354" target="_blank">https://www.mcs.anl.gov/petsc/petsc-current/src/mat/impls/sbaij/mpi/mpisbaij.c.html#line3354</a> shouldn’t this be <span>sum != N? I’m running an example where it says that sum (4) != Nbs (60), with a bs=15.</span></div></div></blockquote><div><br></div><div>Clearly a bug.</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div style="overflow-wrap: break-word;"><div><span>2) when I’m using MATMPIBAIJ, I can do stuff like: </span>-prefix_mat_type baij -prefix_pc_type redundant -prefix_redundant_pc_type ilu, and in the KSPView, I have "package used to perform factorization: petsc”, so the underlying MatType is indeed MATSEQBAIJ. </div></div></blockquote><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div style="overflow-wrap: break-word;"><div>However, with MATMPISBAIJ, if I do: -prefix_mat_type sbaij -prefix_pc_type redundant, first, it looks like you are hardwiring a PCLU (MatGetFactor() line 4440 in src/mat/interface/matrix.c </div></div></blockquote><div><br></div><div>Using LU as a default for symmetric matrices does seem wrong.</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div style="overflow-wrap: break-word;"><div>Could not locate a solver package.), then, if I append -prefix_redundant_pc_type cholesky, I end up with an error related to MUMPS: MatGetFactor_sbaij_mumps() line 2625 in src/mat/impls/aij/mpi/mumps/mumps.c Cannot use PETSc SBAIJ matrices with block size > 1 with MUMPS Cholesky, use AIJ matrix instead. Why isn’t this call dispatched to PETSc Cholesky for SeqSBAIJ matrices?</div><div><br></div></div></blockquote><div><br></div><div>Generally, we don't like to switch parameters under the covers like this. We would rather you get your inputs right so you know what is going on.</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div style="overflow-wrap: break-word;"><div></div><div>Thanks,</div><div>Pierre</div><div><br></div><div>1) I don’t think this is tested right now, at least not in src/ksp/ksp/examples/tutorials</div><div>2) reproducer: src/ksp/ksp/examples/tutorials/ex2.c</div><div>$ mpirun -np 2 ./ex2 -pc_type redundant -mat_type sbaij</div><div>// error because trying to do LU with a symmetric matrix</div><div>$ mpirun -np 2 ./ex2 -pc_type redundant -mat_type sbaij -redundant_pc_type cholesky -ksp_view</div><div>// you’ll see: that MUMPS is being used, but since bs=1, it’s working, but it won’t for the general case</div><div>//                  the MatType is mpisbaij with "1 MPI processes" whereas with baij, it’s seqbaij</div><div><br></div></div></blockquote></div></div>