[petsc-users] Bug in VecNorm, 3.20.3
michael at paraffinalia.co.uk
michael at paraffinalia.co.uk
Fri Jan 26 08:03:01 CST 2024
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 original code, the PETSc matrix is a wrapper for a Fast Multipole
Method evaluation; in the minimum example I have simulated this by using
an array as a matrix. The sample code generates a randomised matrix A
and reference solution vector ref, and generates a right hand side
b = A*ref
which is then supplied as the right hand side for the GMRES solver. If I
use the PETSc matrix multiplication, the solver behaves as expected; if
I generate b directly from the underlying array for the matrix, I get
the result
0 KSP Residual norm < 1.e-11
Linear solve converged due to CONVERGED_ATOL iterations 0
More information about the petsc-users
mailing list