Incorrect linear system size for mixed space

Asked by Anton

I am consistently getting an error from PETSC when I am trying to solve a variational problem of the following type (minimal Python example):

from dolfin import *

mesh=UnitSquareMesh(16,16)
V1=FunctionSpace(mesh, "DG", 0)
V2=FunctionSpace(mesh,"R",0)
V=MixedFunctionSpace([V1,V2])
f,g=TrialFunctions(V)
h,i=TestFunctions(V)
a=(f*h+g*h+i*f)*dx
L=h*dx

U=Function(V)
solve(a==L,U)

I am on OSX running the nightly binary snapshot. The error message is (note that even the size of the system is incorrect):

Calling FFC just-in-time (JIT) compiler, this may take some time.
Solving linear variational problem.
[0]PETSC ERROR: --------------------- Error Message ------------------------------------
[0]PETSC ERROR: Arguments are incompatible!
[0]PETSC ERROR: Local size 513 not compatible with block size 2!
[0]PETSC ERROR: ------------------------------------------------------------------------
[0]PETSC ERROR: Petsc Release Version 3.3.0, Patch 3, Wed Aug 29 11:26:24 CDT 2012
[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.
[0]PETSC ERROR: ------------------------------------------------------------------------
[0]PETSC ERROR: Unknown Name on a darwin11. named leo.local by toxa Mon Jul 29 19:07:16 2013
[0]PETSC ERROR: Libraries linked from /Users/johannr/fenics-snapshot/local/lib
[0]PETSC ERROR: Configure run at Tue May 14 10:31:34 2013
[0]PETSC ERROR: Configure options --prefix=/Users/johannr/fenics-snapshot/local COPTFLAGS=-O2 --with-debugging=0 --with-clanguage=cxx --with-c-support=1 --with-blas-lapack-dir=/usr --with-umfpack=1 --with-umfpack-include=/Users/johannr/fenics-snapshot/local/include/suitesparse --with-umfpack-lib="[/Users/johannr/fenics-snapshot/local/lib/libumfpack.a,/Users/johannr/fenics-snapshot/local/lib/libamd.a]" --with-spooles=1 --with-spooles-include=/Users/johannr/fenics-snapshot/local/include --with-spooles-lib=/Users/johannr/fenics-snapshot/local/lib/libspooles.a --with-ptscotch=1 --with-ptscotch-dir=/Users/johannr/fenics-snapshot/local --with-ml=1 --with-ml-include=/Users/johannr/fenics-snapshot/local/include/trilinos --with-ml-lib=/Users/johannr/fenics-snapshot/local/lib/libml.dylib --with-hdf5=1 --with-hdf5-dir=/Users/johannr/fenics-snapshot/local --with-x=0 -with-x11=0 --with-fortran=0 --with-shared-libraries=1 PETSC_DIR=/Users/johannr/fenics-snapshot/fenics-superbuild/build-fenics/CMakeExternals/src/PETSc PETSC_ARCH=darwin11.4.0-cxx-opt
[0]PETSC ERROR: ------------------------------------------------------------------------
[0]PETSC ERROR: PetscLayoutSetBlockSize() line 459 in /Users/johannr/fenics-snapshot/fenics-superbuild/build-fenics/CMakeExternals/src/PETSc/src/vec/vec/impls/mpi/pmap.c
[0]PETSC ERROR: MatSetBlockSize() line 6704 in /Users/johannr/fenics-snapshot/fenics-superbuild/build-fenics/CMakeExternals/src/PETSc/src/mat/interface/matrix.c

Is this a known bug/is there a workaround?

Sincerely,
--Anton

Question information

Language:
English Edit question
Status:
Answered
For:
DOLFIN Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Johannes Ring (johannr) said :
#1

FEniCS no longer uses Launchpad for Questions & Answers. Please consult the documentation on the FEniCS web page for where and how to (re)post your question: http://fenicsproject.org/support/

Can you help with this problem?

Provide an answer of your own, or ask Anton for more information if necessary.

To post a message you must log in.