In previous versions of PETSc we use to be able to call KSPMonitorTrueResidual from within our custom KSPMonitor, using an approach that is now commented out in the example found at https://petsc.org/release/src/ksp/ksp/tutorials/ex2f.F90.html:! 214: ! Cannot also use the default KSP monitor routine showing how it may be used from Fortran 215: ! since the Fortran compiler thinks the calling arguments are different in the two cases 216: ! 217: ! PetscCallA(PetscViewerAndFormatCreate(PETSC_VIEWER_STDOUT_WORLD,PETSC_VIEWER_DEFAULT,vf,ierr)) 218: ! PetscCallA(KSPMonitorSet(ksp,KSPMonitorResidual,vf,PetscViewerAndFormatDestroy,ierr)) Instead, that example uses: 210: if (flg) then 211: vzero = 0 212: PetscCallA(KSPMonitorSet(ksp,MyKSPMonitor,vzero,PETSC_NULL_FUNCTION,ierr)) 213: ! Regardless of which of these approaches I try, I cannot use KSPMonitorTrueResidual in the MyKSPMonitor routine. I get the following error:
|
test.F90
Description: Binary data