[petsc-users] MG Preconditioning
Matthew Knepley
knepley at gmail.com
Fri Aug 31 22:06:47 CDT 2012
On Fri, Aug 31, 2012 at 10:05 PM, Jed Brown <jedbrown at mcs.anl.gov> wrote:
> 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...
>
True, but the backtrace also shows that comm = 0x0 on the call to
KSPCreate(), which
leads me to believe that your petsc4py has not initialized PETSc, and
therefor not
initialized PETSC_COMM_WORLD.
Matt
--
What most experimenters take for granted before they begin their
experiments is infinitely more interesting than any results to which their
experiments lead.
-- Norbert Wiener
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20120831/f07ad72f/attachment.html>
More information about the petsc-users
mailing list