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 

  Barry


> On Sep 30, 2019, at 9:44 AM, Jan Grießer <[email protected]> wrote:
> 
> Is the MatMumpsGetInverse also wrapped to the python version in PETSc4py ? If 
> yes is there any example for using it ? 
> My other question is related to the LU factoriation 
> (https://www.mcs.anl.gov/petsc/documentation/faq.html#invertmatrix). 
> Is the LU factorization only possible for sequential Aij matrices ? I read in 
> the docs that this is the case for ordering. 
> After setting up my matrix A, B and x i tried:
>  r, c = dynamical_matrix_nn.getOrdering("nd")
>  fac_dyn_matrix = dynamical_matrix_nn.factorLU(r,c)
> 
> resulting in an error:
> [0] No support for this operation for this object type
> [0] Mat type mpiaij
> 
> Am Fr., 27. Sept. 2019 um 16:26 Uhr schrieb Zhang, Hong <[email protected]>:
> See ~petsc/src/mat/examples/tests/ex214.c on how to compute selected entries 
> of inv(A) using mumps.
> Hong
> 
> On Fri, Sep 27, 2019 at 8:04 AM Smith, Barry F. via petsc-users 
> <[email protected]> wrote:
> 
> 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.
> 
>    Barry
> 
> 
> 
> > On Sep 27, 2019, at 3:34 AM, Jan Grießer via petsc-users 
> > <[email protected]> wrote:
> > 
> > Hi all,
> > 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!
> > Greetings Jan 
> 

Reply via email to