[petsc-dev] getting parts of a field split PC at setup time

Mark F. Adams mfadams at lbl.gov
Sun Sep 1 23:11:40 CDT 2013


> 
>   if (sml_mype/sml_pe_per_plane .gt. 0) then ! not first, no monitor
>      call SNESMonitorCancel(solver%snes,ierr)
>      CHKERRQ(ierr)
>      call SNESGetKSP(solver%snes,ksp,ierr)
>      CHKERRQ(ierr)
>      call KSPMonitorCancel(ksp,ierr)
>      CHKERRQ(ierr)
>   endif
> 
> First, a quick question: do I want to call DMSetFromOptions here (first line)?
> 
> I want to get the two KSP solvers inside of what I know is a fieldsplit PC but when I get the PC in the above code and try to get the KSPs I get a segv.  I thought I might call
> 
> Why not just give different options prefixes and do it from the command line?

This would require two sets of input parameters which would defeat the purpose.  I'm trying to debug parameters so I would also have to verify the the input parameters for the two solvers are identical (tedious and error prone).  I can afford to look at only one solve because the rest are similar but not exactly the same (different RHS only).  This would also break everyones RC files.

Perhaps I use PetscOptionsClearValue, on these processors, before calling XXXGetOptions.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20130902/cfdc55e7/attachment.html>


More information about the petsc-dev mailing list