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

2017-04-19 Thread Kong, Fande
Thanks, Mark, Now, the total compute time using GAMG is competitive with ASM. Looks like I could not use something like: "-mg_level_1_ksp_type gmres" because this option makes the compute time much worse. Fande, On Thu, Apr 13, 2017 at 9:14 AM, Mark Adams wrote: > > > On

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

2017-04-13 Thread Mark Adams
On Wed, Apr 12, 2017 at 7:04 PM, Kong, Fande wrote: > > > On Sun, Apr 9, 2017 at 6:04 AM, Mark Adams wrote: > >> You seem to have two levels here and 3M eqs on the fine grid and 37 on >> the coarse grid. I don't understand that. >> >> You are also calling

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

2017-04-13 Thread Mark Adams
On Wed, Apr 12, 2017 at 1:31 PM, Kong, Fande wrote: > Hi Mark, > > Thanks for your reply. > > On Wed, Apr 12, 2017 at 9:16 AM, Mark Adams wrote: > >> The problem comes from setting the number of MG levels (-pc_mg_levels 2). >> Not your fault, it looks like

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

2017-04-12 Thread Kong, Fande
On Sun, Apr 9, 2017 at 6:04 AM, Mark Adams wrote: > You seem to have two levels here and 3M eqs on the fine grid and 37 on > the coarse grid. I don't understand that. > > You are also calling the AMG setup a lot, but not spending much time > in it. Try running with -info and

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

2017-04-12 Thread Kong, Fande
Hi Mark, Thanks for your reply. On Wed, Apr 12, 2017 at 9:16 AM, Mark Adams wrote: > The problem comes from setting the number of MG levels (-pc_mg_levels 2). > Not your fault, it looks like the GAMG logic is faulty, in your version at > least. > What I want is that GAMG

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

2017-04-12 Thread Mark Adams
The problem comes from setting the number of MG levels (-pc_mg_levels 2). Not your fault, it looks like the GAMG logic is faulty, in your version at least. GAMG will force the coarsest grid to one processor by default, in newer versions. You can override the default with:

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

2017-04-10 Thread Kong, Fande
On Sun, Apr 9, 2017 at 6:04 AM, Mark Adams wrote: > You seem to have two levels here and 3M eqs on the fine grid and 37 on > the coarse grid. 37 is on the sub domain. rows=18145, cols=18145 on the entire coarse grid. > I don't understand that. > > You are also calling

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

2017-04-09 Thread Mark Adams
You seem to have two levels here and 3M eqs on the fine grid and 37 on the coarse grid. I don't understand that. You are also calling the AMG setup a lot, but not spending much time in it. Try running with -info and grep on "GAMG". On Fri, Apr 7, 2017 at 5:29 PM, Kong, Fande

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] 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] GAMG for the unsymmetrical matrix

2017-04-06 Thread Barry Smith
> On Apr 6, 2017, at 9:39 AM, Kong, Fande wrote: > > Thanks, Mark and Barry, > > It works pretty wells in terms of the number of linear iterations (using > "-pc_gamg_sym_graph true"), but it is horrible in the compute time. I am > using the two-level method via

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

2017-04-06 Thread Mark Adams
On Thu, Apr 6, 2017 at 7:39 AM, Kong, Fande wrote: > Thanks, Mark and Barry, > > It works pretty wells in terms of the number of linear iterations (using > "-pc_gamg_sym_graph true"), but it is horrible in the compute time. I am > using the two-level method via "-pc_mg_levels

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

2017-04-06 Thread Kong, Fande
Thanks, Mark and Barry, It works pretty wells in terms of the number of linear iterations (using "-pc_gamg_sym_graph true"), but it is horrible in the compute time. I am using the two-level method via "-pc_mg_levels 2". The reason why the compute time is larger than other preconditioning options

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

2017-04-06 Thread Mark Adams
On Tue, Apr 4, 2017 at 10:10 AM, Barry Smith wrote: > >> Does this mean that GAMG works for the symmetrical matrix only? > > No, it means that for non symmetric nonzero structure you need the extra > flag. So use the extra flag. The reason we don't always use the flag is >

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

2017-04-04 Thread Barry Smith
> Does this mean that GAMG works for the symmetrical matrix only? No, it means that for non symmetric nonzero structure you need the extra flag. So use the extra flag. The reason we don't always use the flag is because it adds extra cost and isn't needed if the matrix already has a symmetric

[petsc-users] GAMG for the unsymmetrical matrix

2017-04-04 Thread Kong, Fande
Hi All, I am using GAMG to solve a group of coupled diffusion equations, but the resulting matrix is not symmetrical. I got the following error messages: *[0]PETSC ERROR: Petsc has generated inconsistent data[0]PETSC ERROR: Have un-symmetric graph (apparently). Use