Re: [petsc-users] Bug report: using a custom ksp convergence function

2025-01-21 Thread Matthew Knepley
On Tue, Jan 21, 2025 at 9:46 AM Daniel Stone wrote: > Is there a quick way for me to find out which version of > PETSc KSPConvergedDefaultCreate() was introduced with? > I'll likely need to conditionally pragma-out these calls for back > compatibility. > We have changes docs: https://urldefense

Re: [petsc-users] Bug report: using a custom ksp convergence function

2025-01-21 Thread Daniel Stone
Is there a quick way for me to find out which version of PETSc KSPConvergedDefaultCreate() was introduced with? I'll likely need to conditionally pragma-out these calls for back compatibility. Thanks, Daniel On Tue, Jan 21, 2025 at 1:16 PM Barry Smith wrote: > >Yes, that can be passed in a

Re: [petsc-users] Bug report: using a custom ksp convergence function

2025-01-21 Thread Barry Smith
Yes, that can be passed in also with KSPSetConvergenceTest() > On Jan 21, 2025, at 4:25 AM, Daniel Stone wrote: > > That works wonderfully, thanks! Should be paired with > > call KSPConvergedDefaultDestroy(ctx,ierr) > > I think. > > Best Regards, > > Daniel > > > > On Mon, Jan 20,

Re: [petsc-users] Bug report: using a custom ksp convergence function

2025-01-21 Thread Barry Smith
Yes, that can be passed in also with KSPSetConvergenceTest() > On Jan 21, 2025, at 4:25 AM, Daniel Stone wrote: > > That works wonderfully, thanks! Should be paired with > > call KSPConvergedDefaultDestroy(ctx,ierr) > > I think. > > Best Regards, > > Daniel > > > > On Mon, Jan 20,

Re: [petsc-users] Bug report: using a custom ksp convergence function

2025-01-21 Thread Daniel Stone
That works wonderfully, thanks! Should be paired with call KSPConvergedDefaultDestroy(ctx,ierr) I think. Best Regards, Daniel On Mon, Jan 20, 2025 at 3:20 PM Barry Smith wrote: > >David, > > KSPConvergedDefault() now takes a non-NULL context that must be > provided. I have atta

Re: [petsc-users] Bug report: using a custom ksp convergence function

2025-01-20 Thread Barry Smith
David, KSPConvergedDefault() now takes a non-NULL context that must be provided. I have attached a modified version of ex5f.F90 that demonstrates how it is constructured before being passed to KSPSetConvergenceTest(). Barry ex5f.F90 Description: Binary data > On Jan 20, 2025,

[petsc-users] Bug report: using a custom ksp convergence function

2025-01-20 Thread Daniel Stone
Hello PETSc Community, I think I've found a bug - Go to $PETSC_DIR/src/ksp/ksp/tutorials/ open ex5f.F90, and add the following line in MyKSPConverged(), say around line 336: call KSPConvergedDefault(ksp,n,rnorm,flag,dummy,ierr) It should make sense why someone would want to do this - within a