On Mon, Apr 19, 2021 at 9:04 AM Ivano Barletta <[email protected]> wrote:
> Thanks > > I've tried the first option, I get this compilation error > > undefined reference to `matcreatesubmatrices_' > > My PETSc version is 3.7.5, is this a feature of newer versions? > It was renamed from MatGetSubMatrix() https://www.mcs.anl.gov/petsc/documentation/changes/38.html Thanks, Matt > Ivano > > Il giorno ven 16 apr 2021 alle ore 16:06 Matthew Knepley < > [email protected]> ha scritto: > >> On Fri, Apr 16, 2021 at 9:46 AM Ivano Barletta <[email protected]> >> wrote: >> >>> Dear all, >>> >>> I have an MPI FEM application with an elliptic problem that I >>> solve with PETSc. For debugging purposes I want to >>> let the master process to solve the global system. >>> >>> Is there any simple way in PETSc to gather the distributed matrix >>> (the type is MATMPIAIJ) on a single MPI process? >>> >> >> You could use >> >> >> https://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/Mat/MatCreateSubMatrices.html >> >> to extract a single, serial matrix on process 0. However, you can do this >> with the solver automatically using >> >> >> https://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/PC/PCTELESCOPE.html >> >> If you have the memory, you can do this more simply with >> >> >> https://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/PC/PCREDUNDANT.html >> >> Thanks, >> >> Matt >> >> >>> Thanks, >>> Ivano >>> >>> >>> >> >> -- >> What most experimenters take for granted before they begin their >> experiments is infinitely more interesting than any results to which their >> experiments lead. >> -- Norbert Wiener >> >> https://www.cse.buffalo.edu/~knepley/ >> <http://www.cse.buffalo.edu/~knepley/> >> > -- What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead. -- Norbert Wiener https://www.cse.buffalo.edu/~knepley/ <http://www.cse.buffalo.edu/~knepley/>
