Discussion:
[petsc-users] fieldsplit error
subramanya sadasiva
2013-12-28 03:25:03 UTC
Permalink
Hi, I have a nonlinear system with 6 variables grouped in two sets of 3. I am trying to get a fieldsplit preconditioner working . I have the following options set up
-pc_type fieldsplit-pc_fieldsplit_type multiplicative-fieldsplit_0_fields 0,2,4-fieldsplit_1_fields 1,3,5-fieldsplit_0_ksp cg-fieldsplit_1_ksp cg-fieldsplit_0_pc hypre-fieldsplit_1_pc hypre
However, I get the following error. My installation of libmesh has block matrices disabled, which I've seen to cause problems with fieldsplit. Any ideas what might cause this error?Thanks, Subramanya


[0]PETSC ERROR: --------------------- Error Message ------------------------------------[0]PETSC ERROR: Petsc has generated inconsistent data![0]PETSC ERROR: Unhandled case, must have at least two fields, not 1![0]PETSC ERROR: ------------------------------------------------------------------------[0]PETSC ERROR: Petsc Release Version 3.4.3, unknown [0]PETSC ERROR: See docs/changes/index.html for recent updates.[0]PETSC ERROR: See docs/faq.html for hints about trouble shooting.[0]PETSC ERROR: See docs/index.html for manual pages.
Hong Zhang
2013-12-28 05:05:56 UTC
Permalink
Add
-pc_fieldsplit_block_size 2

See example
petsc/src/snes/examples/tutorials/ex19.c:
./ex19 -snes_monitor_short -ksp_monitor_short -pc_type fieldsplit
-pc_fieldsplit_block_size 2 -pc_fieldsplit_0_fields 0,1
-pc_fieldsplit_1_fields 0,1 -pc_fieldsplit_type multiplicative -snes_view
-fieldsplit_pc_type lu -da_refine 1 -ksp_type fgmres

(see runex19_8 in petsc/src/snes/examples/tutorials/makefile)

Hong
Post by subramanya sadasiva
Hi,
I have a nonlinear system with 6 variables grouped in two sets of 3. I am
trying to get a fieldsplit preconditioner working . I have the following
options set up
-pc_type fieldsplit
-pc_fieldsplit_type multiplicative
-fieldsplit_0_fields 0,2,4
-fieldsplit_1_fields 1,3,5
-fieldsplit_0_ksp cg
-fieldsplit_1_ksp cg
-fieldsplit_0_pc hypre
-fieldsplit_1_pc hypre
However, I get the following error. My installation of libmesh has block
matrices disabled, which I've seen to cause problems with fieldsplit. Any
ideas what might cause this error?
Thanks,
Subramanya
[0]PETSC ERROR: --------------------- Error Message
------------------------------------
[0]PETSC ERROR: Petsc has generated inconsistent data!
[0]PETSC ERROR: Unhandled case, must have at least two fields, not 1!
------------------------------------------------------------------------
[0]PETSC ERROR: Petsc Release Version 3.4.3, unknown
[0]PETSC ERROR: See docs/changes/index.html for recent updates.
[0]PETSC ERROR: See docs/faq.html for hints about trouble shooting.
[0]PETSC ERROR: See docs/index.html for manual pages.
subramanya sadasiva
2013-12-28 05:15:00 UTC
Permalink
Hi,
I figured out that block size was missing. However I am not quite sure what the block size means.

--- Original Message ---

From: "Hong Zhang" <***@mcs.anl.gov>
Sent: December 28, 2013 12:06 AM
To: "subramanya sadasiva" <***@outlook.com>
Cc: petsc-***@mcs.anl.gov, libmesh-***@lists.sourceforge.net
Subject: Re: [petsc-users] fieldsplit error

Add
-pc_fieldsplit_block_size 2

See example
petsc/src/snes/examples/tutorials/ex19.c:
./ex19 -snes_monitor_short -ksp_monitor_short -pc_type fieldsplit
-pc_fieldsplit_block_size 2 -pc_fieldsplit_0_fields 0,1
-pc_fieldsplit_1_fields 0,1 -pc_fieldsplit_type multiplicative -snes_view
-fieldsplit_pc_type lu -da_refine 1 -ksp_type fgmres

(see runex19_8 in petsc/src/snes/examples/tutorials/makefile)

Hong
Post by subramanya sadasiva
Hi,
I have a nonlinear system with 6 variables grouped in two sets of 3. I am
trying to get a fieldsplit preconditioner working . I have the following
options set up
-pc_type fieldsplit
-pc_fieldsplit_type multiplicative
-fieldsplit_0_fields 0,2,4
-fieldsplit_1_fields 1,3,5
-fieldsplit_0_ksp cg
-fieldsplit_1_ksp cg
-fieldsplit_0_pc hypre
-fieldsplit_1_pc hypre
However, I get the following error. My installation of libmesh has block
matrices disabled, which I've seen to cause problems with fieldsplit. Any
ideas what might cause this error?
Thanks,
Subramanya
[0]PETSC ERROR: --------------------- Error Message
------------------------------------
[0]PETSC ERROR: Petsc has generated inconsistent data!
[0]PETSC ERROR: Unhandled case, must have at least two fields, not 1!
------------------------------------------------------------------------
[0]PETSC ERROR: Petsc Release Version 3.4.3, unknown
[0]PETSC ERROR: See docs/changes/index.html for recent updates.
[0]PETSC ERROR: See docs/faq.html for hints about trouble shooting.
[0]PETSC ERROR: See docs/index.html for manual pages.
Hong Zhang
2013-12-28 17:28:57 UTC
Permalink
Post by subramanya sadasiva
Hi,
I figured out that block size was missing. However I am not quite sure
what the block size means.
number of fields.
See
./ex19 -snes_monitor_short -ksp_monitor_short -pc_type fieldsplit
-pc_fieldsplit_block_size 2 -pc_fieldsplit_0_fields 0,1
-pc_fieldsplit_1_fields 0,1 -pc_fieldsplit_type multiplicative -snes_view
-fieldsplit_pc_type lu -da_refine 1 -ksp_type fgmres -h |grep
fieldsplit_block_size
-pc_fieldsplit_block_size <-1>: Blocksize that defines number of fields
(PCFieldSplitSetBlockSize)

Hong
Post by subramanya sadasiva
--- Original Message ---
Sent: December 28, 2013 12:06 AM
Subject: Re: [petsc-users] fieldsplit error
Add
-pc_fieldsplit_block_size 2
See example
./ex19 -snes_monitor_short -ksp_monitor_short -pc_type fieldsplit
-pc_fieldsplit_block_size 2 -pc_fieldsplit_0_fields 0,1
-pc_fieldsplit_1_fields 0,1 -pc_fieldsplit_type multiplicative -snes_view
-fieldsplit_pc_type lu -da_refine 1 -ksp_type fgmres
(see runex19_8 in petsc/src/snes/examples/tutorials/makefile)
Hong
Hi,
I have a nonlinear system with 6 variables grouped in two sets of 3. I am
trying to get a fieldsplit preconditioner working . I have the following
options set up
-pc_type fieldsplit
-pc_fieldsplit_type multiplicative
-fieldsplit_0_fields 0,2,4
-fieldsplit_1_fields 1,3,5
-fieldsplit_0_ksp cg
-fieldsplit_1_ksp cg
-fieldsplit_0_pc hypre
-fieldsplit_1_pc hypre
However, I get the following error. My installation of libmesh has block
matrices disabled, which I've seen to cause problems with fieldsplit. Any
ideas what might cause this error?
Thanks,
Subramanya
[0]PETSC ERROR: --------------------- Error Message
------------------------------------
[0]PETSC ERROR: Petsc has generated inconsistent data!
[0]PETSC ERROR: Unhandled case, must have at least two fields, not 1!
------------------------------------------------------------------------
[0]PETSC ERROR: Petsc Release Version 3.4.3, unknown
[0]PETSC ERROR: See docs/changes/index.html for recent updates.
[0]PETSC ERROR: See docs/faq.html for hints about trouble shooting.
[0]PETSC ERROR: See docs/index.html for manual pages.
Jed Brown
2013-12-29 06:39:49 UTC
Permalink
Post by Hong Zhang
Post by subramanya sadasiva
Hi,
I figured out that block size was missing. However I am not quite sure
what the block size means.
number of fields.
See
./ex19 -snes_monitor_short -ksp_monitor_short -pc_type fieldsplit
-pc_fieldsplit_block_size 2 -pc_fieldsplit_0_fields 0,1
-pc_fieldsplit_1_fields 0,1 -pc_fieldsplit_type multiplicative -snes_view
-fieldsplit_pc_type lu -da_refine 1 -ksp_type fgmres -h |grep
fieldsplit_block_size
Hong is correct, but this is a very confusing command-line to use as an
explanation. If you read ex19, it defines four fields. The option is
forcing PCFIELDSPLIT to interpret the array as having only two fields.
Then both fields are being put into both splits, with a direct solver on
both splits. I.e., the entire problem is being solved with a direct
solver in both stages of a two-stage multiplicative preconditioner.
This is a test to demonstrate that a weird code path works, but it's
nothing you would actually use in practice.

Barry Smith
2013-12-28 21:06:40 UTC
Permalink
Post by subramanya sadasiva
Hi,
I have a nonlinear system with 6 variables grouped in two sets of 3. I am trying to get a fieldsplit preconditioner working . I have the following options set up
-pc_type fieldsplit
-pc_fieldsplit_type multiplicative
-fieldsplit_0_fields 0,2,4
-fieldsplit_1_fields 1,3,5
These should be -pc_fieldsplit_0 or 1 _fields 0,2,4 or 1,3,5 the reason is these are options for pc_fieldsplit not for a particular sub solve
Post by subramanya sadasiva
-fieldsplit_0_ksp cg
-fieldsplit_1_ksp cg
These should be -fieldsplit_0 or 1 _ksp_type cg
Post by subramanya sadasiva
-fieldsplit_0_pc hypre
-fieldsplit_1_pc hypre
These should be -fieldsplit_0 or 1 _pc_type hypre But I don’t think hypre ensures a symmetric preconditioner so you probably use gmres above instead of cg

Barry
Post by subramanya sadasiva
However, I get the following error. My installation of libmesh has block matrices disabled, which I've seen to cause problems with fieldsplit. Any ideas what might cause this error?
Thanks,
Subramanya
[0]PETSC ERROR: --------------------- Error Message ------------------------------------
[0]PETSC ERROR: Petsc has generated inconsistent data!
[0]PETSC ERROR: Unhandled case, must have at least two fields, not 1!
[0]PETSC ERROR: ------------------------------------------------------------------------
[0]PETSC ERROR: Petsc Release Version 3.4.3, unknown
[0]PETSC ERROR: See docs/changes/index.html for recent updates.
[0]PETSC ERROR: See docs/faq.html for hints about trouble shooting.
[0]PETSC ERROR: See docs/index.html for manual pages.
Loading...