[petsc-users] Problem setting Fieldsplit fields

Nicolas Barnafi nbarnafi at cmm.uchile.cl
Fri Feb 3 13:52:34 CST 2023


Thanks Matt,

Sorry, I copied the output from the error, but in the options file I do 
it as expected:

  -pc_fieldsplit_0_fields 0,1
  -pc_fieldsplit_1_fields 2,3

Best

On 03-02-23 16:50, Matthew Knepley wrote:
> On Fri, Feb 3, 2023 at 2:46 PM Nicolas Barnafi via petsc-users 
> <petsc-users at mcs.anl.gov <mailto:petsc-users at mcs.anl.gov>> wrote:
> 
>     Dear community,
> 
>     I am using a fieldsplit preconditioner, but for some reason I cannot
>     group fields as in other libraries (i.e. I do this in Firedrake and it
>     works). Some context:
> 
>     I have set four fields to the preconditioner, which I want to
>     regroup with
>     -pc_fieldsplit_0_fields value: 0,1
>     -pc_fieldsplit_1_fields value: 2,3
> 
> 
> You should not have a colon, ":"
> 
>    Thanks,
> 
>       Matt
> 
>     But apparently this doesn't get read for some reason. In fact, from
>     -ksp_view I still see all 4 fields, and it fails as one of the blocks
>     has a null diagonal (coming from a saddle point problem), so it gives
>     the following error. Interestingly, it shows that the groupings where
>     not considered:
> 
>     [0]PETSC ERROR: Object is in wrong state
>     [0]PETSC ERROR: Matrix is missing diagonal entry 0
>     [0]PETSC ERROR: WARNING! There are option(s) set that were not used!
>     Could be the program crashed before they were used or a spelling
>     mistake, etc!
>     [0]PETSC ERROR: Option left: name:-pc_fieldsplit_0_fields value: 0,1
>     [0]PETSC ERROR: Option left: name:-pc_fieldsplit_1_fields value: 2,3
> 
>     Any clues to why this can happen? Best regards,
>     Nicolás Barnafi
> 
> 
> 
> -- 
> 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
> 
> https://www.cse.buffalo.edu/~knepley/ <http://www.cse.buffalo.edu/~knepley/>



More information about the petsc-users mailing list