<div dir="ltr">I think the easier way to do it is to use a KSP which is configured to do preonly and LU. That will do the right thing in parallel.<div><br></div><div> Matt</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Sep 30, 2019 at 11:47 AM Smith, Barry F. via petsc-users <<a href="mailto:petsc-users@mcs.anl.gov">petsc-users@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"><br>
The Python wrapper for PETSc may be missing some functionality; there is a manual process involved in creating new ones. You could poke around the petsc4py source and see how easy it would be to add more functionality that you need.<br>
<br>
<br>
<br>
> On Sep 30, 2019, at 10:13 AM, Jan Grießer <<a href="mailto:griesser.jan@googlemail.com" target="_blank">griesser.jan@googlemail.com</a>> wrote:<br>
> <br>
> I configured PETSc with MUMPS and tested it already for the spectrum slicing method in Slepc4py but i have problems in setting up the LU factorization in the PETSc4py. Since i do not find the corresponding methods and commands in the source code. Thats why is was wondering if this is even possible in the python version. <br>
> <br>
> Am Mo., 30. Sept. 2019 um 16:57 Uhr schrieb Smith, Barry F. <<a href="mailto:bsmith@mcs.anl.gov" target="_blank">bsmith@mcs.anl.gov</a>>:<br>
> <br>
> If you want a parallal LU (and hence the ability to build the inverse in parallel) you need to configure PETSc with --download-mumps --download-scalapack <br>
> <br>
> Barry<br>
> <br>
> <br>
> > On Sep 30, 2019, at 9:44 AM, Jan Grießer <<a href="mailto:griesser.jan@googlemail.com" target="_blank">griesser.jan@googlemail.com</a>> wrote:<br>
> > <br>
> > Is the MatMumpsGetInverse also wrapped to the python version in PETSc4py ? If yes is there any example for using it ? <br>
> > My other question is related to the LU factoriation (<a href="https://www.mcs.anl.gov/petsc/documentation/faq.html#invertmatrix" rel="noreferrer" target="_blank">https://www.mcs.anl.gov/petsc/documentation/faq.html#invertmatrix</a>). <br>
> > Is the LU factorization only possible for sequential Aij matrices ? I read in the docs that this is the case for ordering. <br>
> > After setting up my matrix A, B and x i tried:<br>
> > r, c = dynamical_matrix_nn.getOrdering("nd")<br>
> > fac_dyn_matrix = dynamical_matrix_nn.factorLU(r,c)<br>
> > <br>
> > resulting in an error:<br>
> > [0] No support for this operation for this object type<br>
> > [0] Mat type mpiaij<br>
> > <br>
> > Am Fr., 27. Sept. 2019 um 16:26 Uhr schrieb Zhang, Hong <<a href="mailto:hzhang@mcs.anl.gov" target="_blank">hzhang@mcs.anl.gov</a>>:<br>
> > See ~petsc/src/mat/examples/tests/ex214.c on how to compute selected entries of inv(A) using mumps.<br>
> > Hong<br>
> > <br>
> > On Fri, Sep 27, 2019 at 8:04 AM Smith, Barry F. via petsc-users <<a href="mailto:petsc-users@mcs.anl.gov" target="_blank">petsc-users@mcs.anl.gov</a>> wrote:<br>
> > <br>
> > MatMumpsGetInverse() maybe useful. Also simply using MatMatSolve() with the first 1000 columns of the identity and "throwing away" the part you don't need may be most effective.<br>
> > <br>
> > Barry<br>
> > <br>
> > <br>
> > <br>
> > > On Sep 27, 2019, at 3:34 AM, Jan Grießer via petsc-users <<a href="mailto:petsc-users@mcs.anl.gov" target="_blank">petsc-users@mcs.anl.gov</a>> wrote:<br>
> > > <br>
> > > Hi all,<br>
> > > i am using petsc4py. I am dealing with rather large sparse matrices up to 600kx600k and i am interested in calculating a part of the inverse of the matrix(I know it will be a dense matrix). Due to the nature of my problem, I am only interested in approximately the first 1000 rows and 1000 columns (i.e. a large block in the upper left ofthe matrix). Before I start to play around now, I wanted to ask if there is a clever way to tackle this kind of problem in PETSc in principle. For any input I would be very grateful!<br>
> > > Greetings Jan <br>
> > <br>
> <br>
<br>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><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>