<div dir="auto">Yann<div dir="auto"><br></div><div dir="auto"> you want to have the number of columns equal to the number of rhs. Not the number of rows.</div><div dir="auto">This is also consistent in terms of logical layouts. Simply create and dump the matrix this way and you can read in parallel splitting yhe rows ( ie the logical size per process of the vectors)</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Il Gio 17 Set 2020, 18:09 Pierre Jolivet <<a href="mailto:pierre.jolivet@enseeiht.fr">pierre.jolivet@enseeiht.fr</a>> ha scritto:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word;line-break:after-white-space">Hello Yann,<div>This is probably not fully answering your question, but the proper way to solve a system with N RHS is _not_ to use KSPSolve(), but instead KSPMatSolve(), cf. <a href="https://www.mcs.anl.gov/petsc/petsc-dev/docs/manualpages/KSP/KSPMatSolve.html" target="_blank" rel="noreferrer">https://www.mcs.anl.gov/petsc/petsc-dev/docs/manualpages/KSP/KSPMatSolve.html</a>.</div><div>If you are tracking master (from the GitLab repository), it’s available out of the box. If you are using the release tarballs, it will be available in 3.14.0 scheduled to be released in a couple of days.</div><div>If you want to know more about the current status of block solvers in PETSc, please feel free to have a look at this preprint: <a href="http://jolivet.perso.enseeiht.fr/article.pdf" target="_blank" rel="noreferrer">http://jolivet.perso.enseeiht.fr/article.pdf</a></div><div>If you are using a specific PC which is not “multi-RHS ready”, see the list at the top of page 5, please let me know and I’ll tell you how easy to support it.</div><div>Thanks,</div><div>Pierre</div></div></blockquote></div>