Re: [petsc-users] Bug in VecNorm, 3.20.3

2024-01-26 Thread Junchao Zhang
Yes, VecRestoreArray[Read,Write] should be called after you finish using the array. This casting to (const double **) is bad. Otherwise, compiler could catch the error when you use a const pointer in a non-const way. PetscCall(VecGetArrayRead(ref, (const double **)())) ; After I used the

Re: [petsc-users] Trying to understand -log_view when using HIP kernels (ex34)

2024-01-26 Thread Barry Smith
When run with -log_view_gpu_time each event has two times: the time of kernel on the GPU (computed directly on the GPU using GPU timers) and the time of the CPU clock. The time on the CPU for the event always encloses the entire kernel (hence its time is always at least as large as the time

Re: [petsc-users] Bug in VecNorm, 3.20.3

2024-01-26 Thread Pierre Jolivet
> On 26 Jan 2024, at 3:11 PM, Pierre Jolivet wrote: > >> >> On 26 Jan 2024, at 3:03 PM, mich...@paraffinalia.co.uk wrote: >> >> On 2024-01-23 18:09, Junchao Zhang wrote: >>> Do you have an example to reproduce it? >>> --Junchao Zhang >> >> I have put a minimum example on github: >> >>

Re: [petsc-users] Bug in VecNorm, 3.20.3

2024-01-26 Thread Pierre Jolivet
> On 26 Jan 2024, at 3:03 PM, mich...@paraffinalia.co.uk wrote: > > On 2024-01-23 18:09, Junchao Zhang wrote: >> Do you have an example to reproduce it? >> --Junchao Zhang > > I have put a minimum example on github: > > https://github.com/mjcarley/petsc-test > > It does seem that the problem

Re: [petsc-users] Bug in VecNorm, 3.20.3

2024-01-26 Thread michael
On 2024-01-23 18:09, Junchao Zhang wrote: Do you have an example to reproduce it? --Junchao Zhang I have put a minimum example on github: https://github.com/mjcarley/petsc-test It does seem that the problem occurs if I do not use the PETSc interface to do a matrix multiplication. In the

[petsc-users] User meeting in Cologne: Visit to KU Leuven

2024-01-26 Thread Martin Diehl
Dear PETSc team, I was wondering if any of you would be interested to visit the NUMA research group at KU Leuven (https://wms.cs.kuleuven.be/groups/NUMA) for a after or before the user meeting in Cologne. We have/had several PETSc users and in general there seems to be a big overlap between

Re: [petsc-users] Trying to understand -log_view when using HIP kernels (ex34)

2024-01-26 Thread Anthony Jourdon
Hello, Thank you for your answers. I am working with Dave May on this topic. Still running src/ksp/ksp/tutorials/ex34 with the same options reported by Dave, I added the option -log_view_gpu_time. Now the log provides gpu flop/s instead of nans. However, I have trouble understanding the numbers