Re: [petsc-dev] GAMG and custom MatMults in smoothers

2018-07-02 Thread Vaclav Hapla
OK, now I got you. So I think it's actually not that important when they are created but whether and in which order they are registered on different ranks (see attached edited MWE). Yes, that's a relevant concern I must admit, mainly for things working with subcomms.ThanksVaclav[0] event1

Re: [petsc-dev] GAMG and custom MatMults in smoothers

2018-07-02 Thread Stefano Zampini
The intent was not to show you a deadlock; was to provide you evidence that the PetscLogEvent model is meant to have the same event created collectively (hopefully at class registration) on all processes. See also PetscLogViewDefault 2018-07-02 18:45 GMT+03:00 Vaclav Hapla : > Thanks for the

Re: [petsc-dev] GAMG and custom MatMults in smoothers

2018-07-02 Thread Vaclav Hapla
Thanks for the MWE. But it behaves exactly as I would anticipate, see log. I think that naming the event differently for each rank is not good but fortunately PETSc just ignores this for rank > 0. Important is the event id which is the same. I correctly get that the time spent in this event is

Re: [petsc-dev] GAMG and custom MatMults in smoothers

2018-07-02 Thread Matthew Knepley
On Mon, Jul 2, 2018 at 10:19 AM Vaclav Hapla wrote: > 2. 7. 2018 v 16:38, Matthew Knepley : > > On Mon, Jul 2, 2018 at 9:33 AM Vaclav Hapla > wrote: > >> >> >> 2. 7. 2018 v 15:50, Matthew Knepley : >> >> On Mon, Jul 2, 2018 at 8:28 AM Vaclav Hapla >> wrote: >> >>> 2. 7. 2018 v 15:05, Matthew

Re: [petsc-dev] GAMG and custom MatMults in smoothers

2018-07-02 Thread Stefano Zampini
> I don't see why this should lead to deadlock? With current class-wise > events you can already have many simultaneous instances of the same event > at once. > > Attached a MVE to better explain myself. If you run with p processes, you will see what I mean -- Stefano #include "petsc.h" int

Re: [petsc-dev] GAMG and custom MatMults in smoothers

2018-07-02 Thread Vaclav Hapla
> 2. 7. 2018 v 16:38, Matthew Knepley : > > On Mon, Jul 2, 2018 at 9:33 AM Vaclav Hapla > wrote: > > >> 2. 7. 2018 v 15:50, Matthew Knepley > >: >> >> On Mon, Jul 2, 2018 at 8:28 AM Vaclav Hapla >

Re: [petsc-dev] GAMG and custom MatMults in smoothers

2018-07-02 Thread Matthew Knepley
On Mon, Jul 2, 2018 at 9:33 AM Vaclav Hapla wrote: > > > 2. 7. 2018 v 15:50, Matthew Knepley : > > On Mon, Jul 2, 2018 at 8:28 AM Vaclav Hapla > wrote: > >> 2. 7. 2018 v 15:05, Matthew Knepley : >> >> On Mon, Jul 2, 2018 at 7:54 AM Vaclav Hapla >> wrote: >> >>> >>> >>> 2. 7. 2018 v 14:48,

Re: [petsc-dev] GAMG and custom MatMults in smoothers

2018-07-02 Thread Vaclav Hapla
> 2. 7. 2018 v 15:50, Matthew Knepley : > > On Mon, Jul 2, 2018 at 8:28 AM Vaclav Hapla > wrote: >> 2. 7. 2018 v 15:05, Matthew Knepley > >: >> >> On Mon, Jul 2, 2018 at 7:54 AM Vaclav Hapla > >

Re: [petsc-dev] GAMG and custom MatMults in smoothers

2018-07-02 Thread Matthew Knepley
On Mon, Jul 2, 2018 at 8:28 AM Vaclav Hapla wrote: > 2. 7. 2018 v 15:05, Matthew Knepley : > > On Mon, Jul 2, 2018 at 7:54 AM Vaclav Hapla > wrote: > >> >> >> 2. 7. 2018 v 14:48, Matthew Knepley : >> >> On Mon, Jul 2, 2018 at 3:48 AM Vaclav Hapla >> wrote: >> >>> Barry wrote: >>> >>> This

Re: [petsc-dev] GAMG and custom MatMults in smoothers

2018-07-02 Thread Vaclav Hapla
> 2. 7. 2018 v 15:20, Stefano Zampini : > > > > 2018-07-02 11:48 GMT+03:00 Vaclav Hapla >: > Barry wrote: >> This could get ugly real fast, for example, for vector operations, there >> may be dozens of named vectors and each one gets its own logging?

Re: [petsc-dev] GAMG and custom MatMults in smoothers

2018-07-02 Thread Vaclav Hapla
> 2. 7. 2018 v 15:05, Matthew Knepley : > > On Mon, Jul 2, 2018 at 7:54 AM Vaclav Hapla > wrote: > > >> 2. 7. 2018 v 14:48, Matthew Knepley > >: >> >> On Mon, Jul 2, 2018 at 3:48 AM Vaclav Hapla >

Re: [petsc-dev] GAMG and custom MatMults in smoothers

2018-07-02 Thread Stefano Zampini
2018-07-02 11:48 GMT+03:00 Vaclav Hapla : > Barry wrote: > > This could get ugly real fast, for example, for vector operations, there > may be dozens of named vectors and each one gets its own logging? You'd > have to make sure that only the objects you care about get named, is that > possible?

Re: [petsc-dev] GAMG and custom MatMults in smoothers

2018-07-02 Thread Matthew Knepley
On Mon, Jul 2, 2018 at 7:54 AM Vaclav Hapla wrote: > > > 2. 7. 2018 v 14:48, Matthew Knepley : > > On Mon, Jul 2, 2018 at 3:48 AM Vaclav Hapla > wrote: > >> Barry wrote: >> >> This could get ugly real fast, for example, for vector operations, >> there may be dozens of named vectors and each

Re: [petsc-dev] GAMG and custom MatMults in smoothers

2018-07-02 Thread Vaclav Hapla
> 2. 7. 2018 v 14:48, Matthew Knepley : > > On Mon, Jul 2, 2018 at 3:48 AM Vaclav Hapla > wrote: > Barry wrote: >> This could get ugly real fast, for example, for vector operations, there >> may be dozens of named vectors and each one gets its own logging?

Re: [petsc-dev] GAMG and custom MatMults in smoothers

2018-07-02 Thread Matthew Knepley
On Mon, Jul 2, 2018 at 3:48 AM Vaclav Hapla wrote: > Barry wrote: > > This could get ugly real fast, for example, for vector operations, there > may be dozens of named vectors and each one gets its own logging? You'd > have to make sure that only the objects you care about get named, is that >

Re: [petsc-dev] GAMG and custom MatMults in smoothers

2018-07-02 Thread Vaclav Hapla
Barry wrote: > This could get ugly real fast, for example, for vector operations, there > may be dozens of named vectors and each one gets its own logging? You'd have > to make sure that only the objects you care about get named, is that possible? > >I don't know if there is a good

Re: [petsc-dev] GAMG and custom MatMults in smoothers

2018-06-30 Thread Matthew Knepley
On Fri, Jun 29, 2018 at 9:34 AM Vaclav Hapla wrote: > > > > 22. 6. 2018 v 17:47, Smith, Barry F. : > > > > > > > >> On Jun 22, 2018, at 5:43 AM, Pierre Jolivet > wrote: > >> > >> Hello, > >> I’m solving a system using a MATSHELL and PCGAMG. > >> The MPIAIJ Mat I’m giving to GAMG has a specific

Re: [petsc-dev] GAMG and custom MatMults in smoothers

2018-06-30 Thread Stefano Zampini
> On Jun 29, 2018, at 5:33 PM, Vaclav Hapla wrote: > > > >> 22. 6. 2018 v 17:47, Smith, Barry F. : >> >> >> >>> On Jun 22, 2018, at 5:43 AM, Pierre Jolivet >>> wrote: >>> >>> Hello, >>> I’m solving a system using a MATSHELL and PCGAMG. >>> The MPIAIJ Mat I’m giving to GAMG has a

Re: [petsc-dev] GAMG and custom MatMults in smoothers

2018-06-29 Thread Smith, Barry F.
> On Jun 29, 2018, at 9:33 AM, Vaclav Hapla wrote: > > > >> 22. 6. 2018 v 17:47, Smith, Barry F. : >> >> >> >>> On Jun 22, 2018, at 5:43 AM, Pierre Jolivet >>> wrote: >>> >>> Hello, >>> I’m solving a system using a MATSHELL and PCGAMG. >>> The MPIAIJ Mat I’m giving to GAMG has a

Re: [petsc-dev] GAMG and custom MatMults in smoothers

2018-06-29 Thread Vaclav Hapla
> 22. 6. 2018 v 17:47, Smith, Barry F. : > > > >> On Jun 22, 2018, at 5:43 AM, Pierre Jolivet >> wrote: >> >> Hello, >> I’m solving a system using a MATSHELL and PCGAMG. >> The MPIAIJ Mat I’m giving to GAMG has a specific structure (inherited from >> the MATSHELL) I’d like to exploit

Re: [petsc-dev] GAMG and custom MatMults in smoothers

2018-06-22 Thread Smith, Barry F.
> On Jun 22, 2018, at 5:43 AM, Pierre Jolivet > wrote: > > Hello, > I’m solving a system using a MATSHELL and PCGAMG. > The MPIAIJ Mat I’m giving to GAMG has a specific structure (inherited from > the MATSHELL) I’d like to exploit during the solution phase when the smoother > on the finest