<div dir="ltr">Thanks<div><br></div><div>I've tried the first option, I get this compilation error</div><div><br></div><div>undefined reference to `matcreatesubmatrices_'<br></div><div><br></div><div>My PETSc version is 3.7.5, is this a feature of newer versions?</div><div><br></div><div>Ivano</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Il giorno ven 16 apr 2021 alle ore 16:06 Matthew Knepley <<a href="mailto:knepley@gmail.com">knepley@gmail.com</a>> ha scritto:<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 dir="ltr"><div dir="ltr">On Fri, Apr 16, 2021 at 9:46 AM Ivano Barletta <<a href="mailto:ivano.barletta@cmcc.it" target="_blank">ivano.barletta@cmcc.it</a>> wrote:<br></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Dear all, <div><br></div><div>I have an MPI FEM application with an elliptic problem that I </div><div>solve with PETSc. For debugging purposes I want to </div><div>let the master process to solve the global system.</div><div><br></div><div>Is there any simple way in PETSc to gather the distributed matrix</div><div>(the type is MATMPIAIJ) on a single MPI process? </div></div></blockquote><div><br></div><div>You could use</div><div><br></div><div> <a href="https://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/Mat/MatCreateSubMatrices.html" target="_blank">https://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/Mat/MatCreateSubMatrices.html</a></div><div><br></div><div>to extract a single, serial matrix on process 0. However, you can do this with the solver automatically using</div><div><br></div><div> <a href="https://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/PC/PCTELESCOPE.html" target="_blank">https://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/PC/PCTELESCOPE.html</a></div><div><br></div><div>If you have the memory, you can do this more simply with</div><div><br></div><div> <a href="https://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/PC/PCREDUNDANT.html" target="_blank">https://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/PC/PCREDUNDANT.html</a></div><div><br></div><div> Thanks,</div><div><br></div><div> Matt</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 dir="ltr"><div>Thanks, </div><div>Ivano</div><div> <br></div><div><br></div></div>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div>What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.<br>-- Norbert Wiener</div><div><br></div><div><a href="http://www.cse.buffalo.edu/~knepley/" target="_blank">https://www.cse.buffalo.edu/~knepley/</a><br></div></div></div></div></div></div></div></div>
</blockquote></div>