[petsc-users] Query regarding old PETSC version
Satish Balay
balay at mcs.anl.gov
Wed Aug 16 10:22:18 CDT 2017
balay at es^/sandbox/balay/tmp/petsc-2.3.2-p10 $ grep KSPTrueMonitor include/petscksp.h
EXTERN PetscErrorCode PETSCKSP_DLLEXPORT KSPTrueMonitor(KSP,PetscInt,PetscReal,void *);
https://www.mcs.anl.gov/petsc/documentation/changes/233.html
The following function names are changed to be consistant:
KSPTrueMonitor -> KSPMonitorTrueResidualNorm
src/ksp/ksp/interface/ftn-custom/zitfuncf.c has:
void ksptruemonitor_(KSP *ksp,PetscInt *it,PetscReal *norm,void *ctx,PetscErrorCode *ierr)
{
*ierr = KSPTrueMonitor(*ksp,*it,*norm,ctx);
}
For PETSC_NULL_OBJECT to work - you might have to change it to:
void ksptruemonitor_(KSP *ksp,PetscInt *it,PetscReal *norm,void *ctx,PetscErrorCode *ierr)
{
CHKFORTRANNULLOBJECT(ctx);
*ierr = KSPTrueMonitor(*ksp,*it,*norm,ctx);
}
Satish
On Wed, 16 Aug 2017, Satish Balay wrote:
> neither of these appear to be in petsc-2.3.2
>
> balay at es^/sandbox/balay/tmp/petsc-2.3.2-p10 $ grep -ri true_residual .
> balay at es^/sandbox/balay/tmp/petsc-2.3.2-p10 $ grep -ri KSPTrueResididual .
> balay at es^/sandbox/balay/tmp/petsc-2.3.2-p10 $
>
> Satish
>
>
> On Wed, 16 Aug 2017, Matthew Knepley wrote:
>
> > On Wed, Aug 16, 2017 at 10:01 AM, Rachit Prasad <rachitp at vt.edu> wrote:
> >
> > > Hi,
> > >
> > > Due to legacy issues, I am working with tversion 2.3.2 of PETSc in
> > > FORTRAN. I want to monitor the true residual and hence I tried to use the
> > > function KSPTrueResididual(). However, I am unable to understand what kind
> > > of pointer is the last input parameter, "*dummy" supposed to be. I could
> > > not find an example on the website since this is an older implementation.
> > > Any insight on how to proceed further will be greatly helpful.
> > >
> >
> > That is a very long time ago, but I think you can use PETSC_NULL_OBJECT (if
> > it exists). Also
> > -ksp_monitor_true_residual may work.
> >
> > Thanks,
> >
> > Matt
> >
> >
> > > Regards,
> > > Rachit
> > >
> > >
> >
> >
> >
>
>
More information about the petsc-users
mailing list