Re: [petsc-users] GAMG for the unsymmetrical matrix

2017-04-07 Thread Kong, Fande
On Fri, Apr 7, 2017 at 3:52 PM, Barry Smith wrote: > > > On Apr 7, 2017, at 4:46 PM, Kong, Fande wrote: > > > > > > > > On Fri, Apr 7, 2017 at 3:39 PM, Barry Smith wrote: > > > > Using Petsc Release Version 3.7.5, unknown > > > >

Re: [petsc-users] GAMG for the unsymmetrical matrix

2017-04-07 Thread Barry Smith
> On Apr 7, 2017, at 4:46 PM, Kong, Fande wrote: > > > > On Fri, Apr 7, 2017 at 3:39 PM, Barry Smith wrote: > > Using Petsc Release Version 3.7.5, unknown > >So are you using the release or are you using master branch? > > I am working on the

Re: [petsc-users] GAMG for the unsymmetrical matrix

2017-04-07 Thread Barry Smith
Using Petsc Release Version 3.7.5, unknown So are you using the release or are you using master branch? If you use master the ASM will be even faster. > On Apr 7, 2017, at 4:29 PM, Kong, Fande wrote: > > Thanks, Barry. > > It works. > > GAMG is three times

Re: [petsc-users] odd behavior when using lapack's dgeev with petsc

2017-04-07 Thread Barry Smith
> On Apr 7, 2017, at 3:34 PM, Manav Bhatia wrote: > > Yes, I printed the data in both cases and they look the same. > > I also used “set step-mode on” to show the system lapack info, and they both > are using the same lapack routine. > > This is still baffling me.

Re: [petsc-users] GAMG for the unsymmetrical matrix

2017-04-07 Thread Kong, Fande
Thanks, Barry. It works. GAMG is three times better than ASM in terms of the number of linear iterations, but it is five times slower than ASM. Any suggestions to improve the performance of GAMG? Log files are attached. Fande, On Thu, Apr 6, 2017 at 3:39 PM, Barry Smith

Re: [petsc-users] odd behavior when using lapack's dgeev with petsc

2017-04-07 Thread Manav Bhatia
Yes, I printed the data in both cases and they look the same. I also used “set step-mode on” to show the system lapack info, and they both are using the same lapack routine. This is still baffling me. -Manav > On Apr 7, 2017, at 3:22 PM, Barry Smith wrote: > > >> On

Re: [petsc-users] odd behavior when using lapack's dgeev with petsc

2017-04-07 Thread Barry Smith
> On Apr 7, 2017, at 2:57 PM, Manav Bhatia wrote: > > Hi Barry, > > Thanks for the inputs. > > I did try that, but the debugger (gdb) stepped right over the dgeev_ call, > without getting inside the function. Did it at least stop at the function so you do an up

Re: [petsc-users] odd behavior when using lapack's dgeev with petsc

2017-04-07 Thread Manav Bhatia
Hi Barry, Thanks for the inputs. I did try that, but the debugger (gdb) stepped right over the dgeev_ call, without getting inside the function. I am wondering if this has anything to do with the fact that the system lapack library might not have any debugging info in it.

Re: [petsc-users] odd behavior when using lapack's dgeev with petsc

2017-04-07 Thread Barry Smith
> On Apr 7, 2017, at 1:46 PM, Manav Bhatia wrote: > > Hi, > >I have compile petsc on my Ubuntu machine (also Mac OS 10.12 separately) > to link to the system lapack and blas libraries (shown below). > >I have created an interface class to dgeev in lapack to

[petsc-users] odd behavior when using lapack's dgeev with petsc

2017-04-07 Thread Manav Bhatia
Hi, I have compile petsc on my Ubuntu machine (also Mac OS 10.12 separately) to link to the system lapack and blas libraries (shown below). I have created an interface class to dgeev in lapack to calculate the eigenvalues of a matrix. My application code links to multiple

Re: [petsc-users] Symmetric matrix: Setting entries below diagonal

2017-04-07 Thread Matthew Knepley
On Fri, Apr 7, 2017 at 11:23 AM, Barletta, Ivano wrote: > So, as far as I understand, the only benefit of PETSc with symmetric > matrices > is only when Matrix values are set, by reducing the overhead of > MatSetValue calls? > It halves the storage. There is a slight

Re: [petsc-users] Symmetric matrix: Setting entries below diagonal

2017-04-07 Thread Barry Smith
> On Apr 7, 2017, at 11:23 AM, Barletta, Ivano wrote: > > So, as far as I understand, the only benefit of PETSc with symmetric matrices > is only when Matrix values are set, by reducing the overhead of MatSetValue > calls? The benefits of using SBAIJ matrices are 1

Re: [petsc-users] Symmetric matrix: Setting entries below diagonal

2017-04-07 Thread Barry Smith
If you want to set all values in the matrix and have the SBAIJ matrix ignore those below the diagonal you can use MatSetOption(mat,MAT_IGNORE_LOWER_TRIANGULAR,PETSC_TRUE); or the options database -mat_ignore_lower_triangular This is useful when you have a symmetric matrix but you want

Re: [petsc-users] Symmetric matrix: Setting entries below diagonal

2017-04-07 Thread Barletta, Ivano
So, as far as I understand, the only benefit of PETSc with symmetric matrices is only when Matrix values are set, by reducing the overhead of MatSetValue calls? Thanks, Ivano 2017-04-07 17:19 GMT+02:00 Barry Smith : > > > On Apr 7, 2017, at 6:40 AM, Florian Lindner

Re: [petsc-users] Symmetric matrix: Setting entries below diagonal

2017-04-07 Thread Barry Smith
> On Apr 7, 2017, at 6:40 AM, Florian Lindner wrote: > > Hello, > > two questions about symmetric (MATSBAIJ) matrices. > > + Entries set with MatSetValue below the main diagonal are ignored. Is that > by design? Yes > I rather expected setting A_ij to > have the

Re: [petsc-users] EPSViewer in SLEPc

2017-04-07 Thread Kong, Fande
Thanks, Jose Fande, On Fri, Apr 7, 2017 at 4:41 AM, Jose E. Roman wrote: > I have pushed a commit that should avoid this problem. > Jose > > > El 6 abr 2017, a las 22:27, Kong, Fande escribió: > > > > Hi All, > > > > The EPSViewer in SLEPc looks weird.

Re: [petsc-users] Using MatShell without MatMult

2017-04-07 Thread Dave May
You should also not call PetscInitialize() from within your user MatMult function. On Fri, 7 Apr 2017 at 13:24, Matthew Knepley wrote: > On Fri, Apr 7, 2017 at 5:11 AM, Francesco Migliorini < > francescomigliorin...@gmail.com> wrote: > > Hello, > > I need to solve a linear

[petsc-users] Symmetric matrix: Setting entries below diagonal

2017-04-07 Thread Florian Lindner
Hello, two questions about symmetric (MATSBAIJ) matrices. + Entries set with MatSetValue below the main diagonal are ignored. Is that by design? I rather expected setting A_ij to have the same effect as setting A_ji. + Has MatSetOption to MAT_SYMMETRIC and MAT_SYMMETRIC_ETERNAL any gain on

Re: [petsc-users] Using same DMPlex for solving two different problems

2017-04-07 Thread Matthew Knepley
On Fri, Apr 7, 2017 at 6:32 AM, Abhyankar, Shrirang G. wrote: > > On Apr 7, 2017, at 6:25 AM, Matthew Knepley wrote: > > On Thu, Apr 6, 2017 at 1:04 PM, Abhyankar, Shrirang G. > wrote: > >> I am solving a time-dependent problem using

Re: [petsc-users] Using same DMPlex for solving two different problems

2017-04-07 Thread Abhyankar, Shrirang G.
On Apr 7, 2017, at 6:25 AM, Matthew Knepley > wrote: On Thu, Apr 6, 2017 at 1:04 PM, Abhyankar, Shrirang G. > wrote: I am solving a time-dependent problem using DMNetwork (uses DMPlex internally) to manage the

Re: [petsc-users] Using same DMPlex for solving two different problems

2017-04-07 Thread Matthew Knepley
On Thu, Apr 6, 2017 at 1:04 PM, Abhyankar, Shrirang G. wrote: > I am solving a time-dependent problem using DMNetwork (uses DMPlex > internally) to manage the network. To find the initial conditions, I need > to solve a nonlinear problem on the same network but with different

Re: [petsc-users] Using MatShell without MatMult

2017-04-07 Thread Matthew Knepley
On Fri, Apr 7, 2017 at 5:11 AM, Francesco Migliorini < francescomigliorin...@gmail.com> wrote: > Hello, > > I need to solve a linear system using GMRES without creating explicitly > the matrix because very large. So, I am trying to use the MatShell strategy > but I am stucked. The problem is that

Re: [petsc-users] EPSViewer in SLEPc

2017-04-07 Thread Jose E. Roman
I have pushed a commit that should avoid this problem. Jose > El 6 abr 2017, a las 22:27, Kong, Fande escribió: > > Hi All, > > The EPSViewer in SLEPc looks weird. I do not understand the viewer logic. For > example there is a piece of code in SLEPc (at line 225 of

[petsc-users] Using MatShell without MatMult

2017-04-07 Thread Francesco Migliorini
Hello, I need to solve a linear system using GMRES without creating explicitly the matrix because very large. So, I am trying to use the MatShell strategy but I am stucked. The problem is that it seems to me that inside the user-defined MyMatMult it is required to use MatMult and this would