[petsc-users] MG Preconditioning

Jed Brown jedbrown at mcs.anl.gov
Fri Aug 31 22:05:39 CDT 2012


On Fri, Aug 31, 2012 at 10:03 PM, Gaetan Kenway <kenway at utias.utoronto.ca>wrote:

> I distilled the problem down further to a simple subroutine in mgtest.F,
> copied directly from ex8f.F
>
>       subroutine MGTest()
>       implicit none
>
> #include "include/finclude/petsc.h"
>
>       KSP ksp
>       PC pc
>       PetscErrorCode ierr
>       PetscInt nlevels, two
>       two = 2
>
>       call KSPCreate(PETSC_COMM_WORLD,ksp,ierr)
>       call KSPGetPC(ksp,pc,ierr)
>       call PCSetType(pc,PCMG,ierr)
>       call PCMGSetLevels(pc,two,PETSC_NULL_OBJECT,ierr)
>
>       call KSPDestroy(ksp)
>

You are certainly missing an argument (ierr) to KSPDestroy...
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20120831/7175c5f5/attachment.html>


More information about the petsc-users mailing list