<div dir="ltr">petsc main in debug mode has some additional checks for this cases. Can you run with the main branch and configure petsc using --with-debugging=1?</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Il giorno mar 23 gen 2024 alle ore 22:35 Barry Smith <<a href="mailto:bsmith@petsc.dev">bsmith@petsc.dev</a>> ha scritto:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><br>
This could happen if the values in the vector get changed but the PetscObjectState does not get updated. Normally this is impossible, any action that changes a vectors values changes its state (so for example calling VecGetArray()/VecRestoreArray() updates the state. <br>
<br>
Are you accessing the vector values in any non-standard way? <br>
<br>
Barry<br>
<br>
<br>
> On Jan 23, 2024, at 11:39 AM, <a href="mailto:michael@paraffinalia.co.uk" target="_blank">michael@paraffinalia.co.uk</a> wrote:<br>
> <br>
> Hello,<br>
> <br>
> I have used the GMRES solver in PETSc successfully up to now, but on installing the most recent release, 3.20.3, the solver fails by exiting early. Output from the code is:<br>
> <br>
> lt-nbi-solve-laplace: starting PETSc solver [23.0537]<br>
> 0 KSP Residual norm < 1.e-11<br>
> Linear solve converged due to CONVERGED_ATOL iterations 0<br>
> lt-nbi-solve-laplace: 0 iterations [23.0542] (22.9678)<br>
> <br>
> and tracing execution shows the norm returned by VecNorm to be 0.<br>
> <br>
> If I modify the function by commenting out line 217 of<br>
> <br>
> src/vec/vec/interface/rvector.c<br>
> <br>
> /* if (flg) PetscFunctionReturn(PETSC_SUCCESS); */<br>
> <br>
> the code executes correctly:<br>
> <br>
> lt-nbi-solve-laplace: starting PETSc solver [22.9392]<br>
> 0 KSP Residual norm 1.10836<br>
> 1 KSP Residual norm 0.0778301<br>
> 2 KSP Residual norm 0.0125121<br>
> 3 KSP Residual norm 0.00165836<br>
> 4 KSP Residual norm 0.000164066<br>
> 5 KSP Residual norm 2.12824e-05<br>
> 6 KSP Residual norm 4.50696e-06<br>
> 7 KSP Residual norm 5.85082e-07<br>
> Linear solve converged due to CONVERGED_RTOL iterations 7<br>
> <br>
> My compile options are:<br>
> <br>
> PETSC_ARCH=linux-gnu-real ./configure --with-mpi=0 --with-scalar-type=real --with-threadsafety --with-debugging=0 --with-log=0 --with-openmp<br>
> <br>
> uname -a returns:<br>
> <br>
> 5.15.80 #1 SMP PREEMPT Sun Nov 27 13:28:05 CST 2022 x86_64 Intel(R) Core(TM) i5-6200U CPU @ 2.30GHz GenuineIntel GNU/Linux<br>
> <br>
<br>
</blockquote></div><br clear="all"><div><br></div><span class="gmail_signature_prefix">-- </span><br><div dir="ltr" class="gmail_signature">Stefano</div>