Re: [petsc-users] Bug report VecNorm

2023-12-11 Thread Matthew Knepley
We already merged the fix. Thanks, Matt On Mon, Dec 11, 2023 at 6:00 AM Barry Smith wrote: > >I don't fully understand your code and what it is trying to > demonstrate, but VecGetArrayWrite is Logically Collective. Having > > if(rank == 0) > { >

Re: [petsc-users] Bug report VecNorm

2023-12-10 Thread Jed Brown
Pierre Jolivet writes: >> On 10 Dec 2023, at 8:40 AM, Stephan Köhler >> wrote: >> >> Dear PETSc/Tao team, >> >> there is a bug in the voector interface: In the function >> VecNorm, see, eg. >> https://petsc.org/release/src/vec/vec/interface/rvector.c.html#VecNorm line >> 197 the check

Re: [petsc-users] Bug report VecNorm

2023-12-10 Thread Pierre Jolivet
> On 10 Dec 2023, at 8:40 AM, Stephan Köhler > wrote: > > Dear PETSc/Tao team, > > there is a bug in the voector interface: In the function > VecNorm, see, eg. > https://petsc.org/release/src/vec/vec/interface/rvector.c.html#VecNorm line > 197 the check for consistency in line 214 is

Re: [petsc-users] Bug report VecNorm

2023-12-10 Thread Matthew Knepley
On Sun, Dec 10, 2023 at 12:57 PM Matthew Knepley wrote: > On Sun, Dec 10, 2023 at 12:54 PM Matthew Knepley > wrote: > >> On Sun, Dec 10, 2023 at 2:41 AM Stephan Köhler < >> stephan.koeh...@math.tu-freiberg.de> wrote: >> >>> Dear PETSc/Tao team, >>> >>> there is a bug in the voector interface:

Re: [petsc-users] Bug report VecNorm

2023-12-10 Thread Matthew Knepley
On Sun, Dec 10, 2023 at 12:54 PM Matthew Knepley wrote: > On Sun, Dec 10, 2023 at 2:41 AM Stephan Köhler < > stephan.koeh...@math.tu-freiberg.de> wrote: > >> Dear PETSc/Tao team, >> >> there is a bug in the voector interface: In the function >> VecNorm, see, eg. >>

Re: [petsc-users] Bug report VecNorm

2023-12-10 Thread Matthew Knepley
On Sun, Dec 10, 2023 at 2:41 AM Stephan Köhler < stephan.koeh...@math.tu-freiberg.de> wrote: > Dear PETSc/Tao team, > > there is a bug in the voector interface: In the function > VecNorm, see, eg. > https://petsc.org/release/src/vec/vec/interface/rvector.c.html#VecNorm > line 197 the check for

Re: [petsc-users] Bug report VecNorm

2023-12-10 Thread Barry Smith
I don't fully understand your code and what it is trying to demonstrate, but VecGetArrayWrite is Logically Collective. Having if(rank == 0) { PetscCall(VecGetArrayWrite(vec, )); PetscCall(VecRestoreArrayWrite(vec, )); } is not allowed. The reason is that

[petsc-users] Bug report VecNorm

2023-12-09 Thread Stephan Köhler
Dear PETSc/Tao team, there is a bug in the voector interface:  In the function VecNorm, see, eg. https://petsc.org/release/src/vec/vec/interface/rvector.c.html#VecNorm line 197 the check for consistency in line 214 is done on the wrong communicator.  The communicator should be