<div class="gmail_quote">On Fri, Aug 31, 2012 at 10:03 PM, Gaetan Kenway <span dir="ltr"><<a href="mailto:kenway@utias.utoronto.ca" target="_blank">kenway@utias.utoronto.ca</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div>I distilled the problem down further to a simple subroutine in mgtest.F, copied directly from ex8f.F</div><div><br></div><div><div> subroutine MGTest()</div><div> implicit none</div><div>
<br></div><div>#include "include/finclude/petsc.h"</div><div><br></div><div> KSP ksp</div><div> PC pc</div><div> PetscErrorCode ierr</div><div> PetscInt nlevels, two</div><div> two = 2</div>
<div class="im">
<div><br></div><div> call KSPCreate(PETSC_COMM_WORLD,ksp,ierr)</div><div> call KSPGetPC(ksp,pc,ierr)</div><div> call PCSetType(pc,PCMG,ierr)</div></div><div> call PCMGSetLevels(pc,two,PETSC_NULL_OBJECT,ierr)</div>
<div><br></div><div> call KSPDestroy(ksp)</div></div></blockquote></div><br><div>You are certainly missing an argument (ierr) to KSPDestroy...</div>