Re: [petsc-users] Question about TSComputeRHSJacobianConstant

2019-09-30 Thread Smith, Barry F. via petsc-users


  Sorry this code has not been changed.

  Barry


> On Sep 30, 2019, at 4:24 PM, Sajid Ali  
> wrote:
> 
> Hi PETSc-developers, 
> 
> Has this bug been fixed in the new 3.12 release ? 
> 
> Thank You,
> Sajid Ali
> Applied Physics
> Northwestern University
> s-sajid-ali.github.io



Re: [petsc-users] Question about TSComputeRHSJacobianConstant

2019-09-30 Thread Sajid Ali via petsc-users
Hi PETSc-developers,

Has this bug been fixed in the new 3.12 release ?

Thank You,
Sajid Ali
Applied Physics
Northwestern University
s-sajid-ali.github.io


[petsc-users] PETSc 3.12 release

2019-09-30 Thread Smith, Barry F. via petsc-users

We are pleased to announce the release of PETSc version 3.12 at 
http://www.mcs.anl.gov/petsc

The major changes and updates can be found at 
http://www.mcs.anl.gov/petsc/documentation/changes/312.html

We recommend upgrading to PETSc 3.12 soon. As always, please report problems to 
 petsc-ma...@mcs.anl.gov and ask questions at petsc-users@mcs.anl.gov

This release includes contributions from

Alex Lindsay
Alp Dener
Barry Smith
Boris Boutkov
Chris Eldred
Dave May
David Wells
Debojyoti Ghosh
deepblu2718
Emil Constantinescu
Fande Kong
Florian Wechsung
Glenn Hammond
Hannah Morgan
Hansol Suh
Hendrik Ranocha
Hong Zhang
Hong Zhang
Jacob Faibussowitsch
Jakub Kružík
Jed Brown
Jeffrey Larson
Joe Wallwork
Jose E. Roman
Julian Giordani
Junchao Zhang
Karl Rupp
Lawrence Mitchell
Lisandro Dalcin
Lu
luzhanghpp
Mark Adams
Martin Diehl
Matthew G. Knepley
Patrick Farrell
Patrick Sanan
Pierre Jolivet
Richard Tran Mills
Sajid Ali
Satish Balay
Scott Kruger
Siegfried Cools
Stefano Zampini
Thibaut Appel
Tristan Konolige
Václav Hapla
valeriabarr
Volker Jacht
William Gropp

and bug reports/patches/proposed improvements received from 

장승언
Adina Püsök
Andrea Gallegati
"Appel, Thibaut"
Åsmund Ervik
"Aulisa, Eugenio"
Barry Smith
"Betrie,  Getnet"
Brad Aagaard
Carl Steefel
Clausen Pascal
Danyang Su
Dave A. May
David Dang
Veselin Dobrev
Dylan P. Brennan
Ed Bueler
Elias Karabelas
Fabian Jakub
Fande Kong
Glenn E. Hammond
"Guenther, Stefanie"
Hannah Mairs Morgan
Hapla Vaclav
Heeho Park
Hong Zhang
Hubert Weissmann
Ian Lin
Jacob Faibussowitsch
Jakub Kruzik
Jaysaval, Piyoosh
Jed Brown
Joe Wallwork
Jose E. Roman
Junchao Zhang
Karl Lin
Karl Rupp
Daniel Kokron
Lardelli Nicolo
Jeffery Larson
Leon Avery
Lisandro Dalcin
Magne Rudshaug
Manuel Colera Rico
Mark Adams
Matthew Knepley
Matthias Beaupere
Mohammad Asghar
Mouralidaran Arrutselvi
"Nair, Nirmal Jayaprasad"
Nick Papior
Oana Marin
Paolo Orsini
Patrick Sanan
Paul Seibert
Pierre Jolivet
Piyoosh Jaysaval
Prince Joseph
Richard Katz
Richard Tran Mills
Robert Nr Nourgaliev
Sajid Ali
Satish Balay
"Schanen, Michel"
Sergi Molins Rafa
Sophie Blondel
Stefano Zampini
Steve
Thibaut Appel
Tim Steinhoff
Todd Munson
Tom Goffrey
Vaclav Hapla
"Wells, David"
Xiangdong
Xiang Huang
Yuyun Yang
"Zhang, Hong"
"Zhang, Junchao"



Re: [petsc-users] Computing part of the inverse of a large matrix

2019-09-30 Thread Smith, Barry F. via petsc-users

   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.



> On Sep 30, 2019, at 10:13 AM, Jan Grießer  wrote:
> 
> 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. 
> 
> Am Mo., 30. Sept. 2019 um 16:57 Uhr schrieb Smith, Barry F. 
> :
> 
>   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  
> > 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 
> > :
> > 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 
> >  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 
> > >  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 
> > 
> 



Re: [petsc-users] Computing part of the inverse of a large matrix

2019-09-30 Thread Jan Grießer via petsc-users
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.

Am Mo., 30. Sept. 2019 um 16:57 Uhr schrieb Smith, Barry F. <
bsm...@mcs.anl.gov>:

>
>   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 
> 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 <
> hzh...@mcs.anl.gov>:
> > 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 <
> petsc-users@mcs.anl.gov> 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 <
> petsc-users@mcs.anl.gov> 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
> >
>
>


Re: [petsc-users] Computing part of the inverse of a large matrix

2019-09-30 Thread Smith, Barry F. via petsc-users

  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  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 :
> 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 
>  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 
> >  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 
> 



Re: [petsc-users] Computing part of the inverse of a large matrix

2019-09-30 Thread Jan Grießer via petsc-users
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 :

> 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 <
> petsc-users@mcs.anl.gov> 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 <
>> petsc-users@mcs.anl.gov> 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
>>
>>


Re: [petsc-users] [petsc-maint] petsc ksp solver hangs

2019-09-30 Thread Smith, Barry F. via petsc-users


   This is just a memory leak in hypre; you might report it to them.  

   Memory leaks don't cause hangs 

   Barry


> On Sep 30, 2019, at 12:32 AM, Michael Wick  
> wrote:
> 
> Hi Barry:
> 
> Thanks! I can capture an issue from my local run, although I am not 100% sure 
> this is the reason causing the code hanging.
> 
> When I run with -pc_hypre_boomeramg_relax_type_all Chebyshev, valgrind 
> captures a memory leak:
> 
> ==4410== 192 bytes in 8 blocks are indirectly lost in loss record 1 of 5
> ==4410==at 0x4C2FB55: calloc (in 
> /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
> ==4410==by 0x73FED84: hypre_HostMalloc (hypre_memory.c:192)
> ==4410==by 0x73FEE53: hypre_MAllocWithInit (hypre_memory.c:301)
> ==4410==by 0x73FEF1A: hypre_CAlloc (hypre_memory.c:338)
> ==4410==by 0x726E4C4: hypre_ParCSRRelax_Cheby_Setup (par_cheby.c:70)
> ==4410==by 0x7265A4C: hypre_BoomerAMGSetup (par_amg_setup.c:2738)
> ==4410==by 0x7240F96: HYPRE_BoomerAMGSetup (HYPRE_parcsr_amg.c:52)
> ==4410==by 0x694FFC2: PCSetUp_HYPRE (hypre.c:322)
> ==4410==by 0x69DBE0F: PCSetUp (precon.c:923)
> ==4410==by 0x6B2BDDC: KSPSetUp (itfunc.c:381)
> ==4410==by 0x6B2DABF: KSPSolve (itfunc.c:612)
> 
> Best,
> 
> Mike
> 
> 
> On Sun, Sep 29, 2019 at 9:24 AM Smith, Barry F.  wrote:
> 
>If you have TotalView or DDT or some other parallel debugger you can wait 
> until it is "hanging" and then send a single to  one or more of the processes 
> to stop in and from this get the stack trace. You'll have to figure out for 
> your debugger how that is done.
> 
>If you can start your 72 rank job in "interactive" mode you can launch it 
> with the option -start_in_debugger noxterm -debugger_nodes 0  then it will 
> only start the debugger on the first rank. Now wait until it hangs and do a 
> control c and then you can type bt to get the traceback.
> 
>   Barry
> 
>   Note it is possible to run 72 rank jobs even on a 
> laptop/workstations/non-cluster (so long as they don't use too much memory 
> and take too long to get to the hang point) and the you can use the debugger 
> as I indicated above.
> 
> 
> > On Sep 28, 2019, at 5:32 AM, Michael Wick via petsc-maint 
> >  wrote:
> > 
> > I attached a debugger to my run. The code just hangs without throwing an 
> > error message, interestingly. I uses 72 processors. I turned on the ksp 
> > monitor. And I can see it hangs either at the beginning or the end of KSP 
> > iteration. I also uses valgrind to debug my code on my local machine, which 
> > does not detect any issue. I uses fgmres + fieldsplit, which is really a 
> > standard option.
> > 
> > Do you have any suggestions to do?
> > 
> > On Fri, Sep 27, 2019 at 8:17 PM Zhang, Junchao  wrote:
> > How many MPI ranks did you use? If it is done on your desktop, you can just 
> > attach a debugger to a MPI process to see what is going on.
> > 
> > --Junchao Zhang
> > 
> > 
> > On Fri, Sep 27, 2019 at 4:24 PM Michael Wick via petsc-maint 
> >  wrote:
> > Hi PETSc:
> > 
> > I have been experiencing a code stagnation at certain KSP iterations. This 
> > happens rather randomly, which means the code may stop at the middle of a 
> > KSP solve and hangs there.
> > 
> > I have used valgrind and detect nothing. I just wonder if you have any 
> > suggestions.
> > 
> > Thanks!!!
> > M
>