Puzzling error
Satish Balay
balay at mcs.anl.gov
Sat Jul 26 09:23:46 CDT 2008
Things to check while upgrading to latest petsc:
- Does a ksp example work? - say src/ksp/ksp/examples/tutorials/ex2.c
- If the example works - and yours does not - whats the difference in usage?
For ex2, KSPRegisterAll() getrs called from KSPCreate()
(gdb) where
#0 KSPRegisterAll (path=0x0) at itregis.c:54
#1 0x00007f1ee1ef262e in KSPInitializePackage (path=0x0) at dlregisksp.c:107
#2 0x00007f1ee1f3b031 in KSPCreate (comm=1140850688, inksp=0x7fffea348188) at itcreate.c:383
#3 0x0000000000402259 in main (argc=1, args=0x7fffea3482b8) at ex2.c:157
Satish
On Sat, 26 Jul 2008, Matthew Knepley wrote:
> On Fri, Jul 25, 2008 at 8:56 PM, Kevin Ellwood <kellwood at gmail.com> wrote:
> > Hi and thanks. Are there any example for the usage of these calls?
>
> There is not really a "usage". They are supposed to be called automatically
> and you never know. However, when using ancient versions of petsc, sometimes
> things go wrong. I really encourage upgrading to the latest version.
>
> Thanks,
>
> Matt
>
> > On Fri, Jul 25, 2008 at 5:21 PM, Barry Smith <bsmith at mcs.anl.gov> wrote:
> >>
> >> Kevin,
> >>
> >> Make sure KSPRegisterAll() is called and that KSPRegister() is called
> >> specifically for KSPGMRES
> >>
> >> Barry
> >>
> >> On Jul 25, 2008, at 4:12 PM, Kevin Ellwood wrote:
> >>
> >>> Hi All,
> >>>
> >>> I am trying to resurrect an old FEM code of mine that was based on a very
> >>> early version of PETSC (ie. 2.0.x). I am go through all the changes and I
> >>> am pretty sure I have some issue to get through. However, this set of
> >>> errors below from an early test run are puzzling me. The relevant lines of
> >>> code are shown for setting two type of solvers. Both generate an error
> >>> message indicating the Petsc can't find the KSP type once the KSPSolve is
> >>> called. It seems odd that I can get such an error since KSPBCGS and
> >>> KSPGMRES are define in petsc header files and can't be typos or
> >>> miss-spellings.
> >>>
> >>> I know I messed up somewhere. Does anyone have advice as to where I
> >>> should start looking?
> >>>
> >>> Thanks
> >>> Kevin
> >>>
> >>>
> >>> KSPSetType(ksp_solver,KSPBCGS);
> >>> ierr = KSPSolve(ksp_solver, rhs, b); CHKERRQ(ierr);
> >>>
> >>> [0]PETSC ERROR: --------------------- Error Message
> >>> ------------------------------------
> >>> [0]PETSC ERROR: Unknown type. Check for miss-spelling or missing external
> >>> package needed for type!
> >>> [0]PETSC ERROR: Unable to find requested KSP type bcgs!
> >>>
> >>>
> >>> KSPSetType(ksp_solver,KSPGMRES);
> >>> ierr = KSPSolve(ksp_solver, rhs, b); CHKERRQ(ierr);
> >>>
> >>> [0]PETSC ERROR: --------------------- Error Message
> >>> ------------------------------------
> >>> [0]PETSC ERROR: Unknown type. Check for miss-spelling or missing external
> >>> package needed for type!
> >>> [0]PETSC ERROR: Unable to find requested KSP type gmres!
> >>> [0]PETSC ERROR:
> >>> ------------------------------------------------------------------------
> >>> [0]PETSC ERROR: Petsc Release Version 2.3.3, Patch 3, Fri Jun 15 16:51:25
> >>> CDT 2007 HG revision: f051789beadcd36f77fb6111d20225e26ed7cc0d
> >>>
> >>
> >
> >
>
>
>
>
More information about the petsc-users
mailing list