balay@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@es^/sandbox/balay/tmp/petsc-2.3.2-p10 $ grep -ri true_residual . > balay@es^/sandbox/balay/tmp/petsc-2.3.2-p10 $ grep -ri KSPTrueResididual . > balay@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 <rach...@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 > > > > > > > > > > > > > >