Demos fail, error tokenizing input

Bug #868563 reported by dave.biagioni
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
DOLFIN
Invalid
Undecided
Unassigned

Bug Description

I have just installed FEniCS 1.0.0 on Lucid and tried to run 2 relevant (for me) demos, demo_poisson.py and demo_biharmonic.py. Errors occur in both case that appear to be related to Dolfin. I also tried to compile and run the C++ versions of these demos and also got errors. I'm just pasting the output for the Poisson demo below, for both Python and C++. Any suggestions would be much appreciated!

** PYTHON *******************************************

$ python demo_poisson.py
Automatic selection of expression element: <CG? on a <? of degree 1>>
Automatic selection of expression element: <CG? on a <? of degree 1>>
Traceback (most recent call last):
  File "demo_poisson.py", line 61, in <module>
    solve(a == L, u, bc)
  File "/usr/lib/python2.6/dist-packages/dolfin/cpp.py", line 4049, in solve
    return _cpp.solve(*args)
TypeError: in method 'solve', argument 1 of type 'dolfin::GenericMatrix const &'

**C++*************************************************

$ ffc -l dolfin Poisson.ufl
This is FFC, the FEniCS Form Compiler, version 0.9.2.
For further information, visit http://www.fenics.org/ffc/.

Compiling form Poisson

Compiler stage 1: Analyzing form(s)
-----------------------------------

  Name: 'a'
  Rank: 2
  Cell: <triangle of degree 1>
  Topological dimension: 2
  Geometric dimension: 2
  Number of facets: 3
  Number of coefficients: 0
  Number of cell domains: 1
  Number of exterior facet domains: 0
  Number or interior facet domains: 0
  Number of macro cell domains: 0
  Number of surface domains: 0
  Arguments: '[v_0, v_1]'
  Coefficients: '[]'
  Argument names: '[v, u]'
  Coefficient names: '[]'
  Unique elements: 'CG1'
  Unique sub elements: 'CG1'

  Extracting monomial form representation from UFL form
  Transforming monomial form to reference element
  representation: auto --> tensor
  quadrature_degree: auto --> 0

  Name: 'L'
  Rank: 1
  Cell: <triangle of degree 1>
  Topological dimension: 2
  Geometric dimension: 2
  Number of facets: 3
  Number of coefficients: 2
  Number of cell domains: 1
  Number of exterior facet domains: 1
  Number or interior facet domains: 0
  Number of macro cell domains: 0
  Number of surface domains: 0
  Arguments: '[v_0]'
  Coefficients: '[w_0, w_1]'
  Argument names: '[v]'
  Coefficient names: '[f, g]'
  Unique elements: 'CG1'
  Unique sub elements: 'CG1'

  Extracting monomial form representation from UFL form
  Transforming monomial form to reference element
  representation: auto --> tensor
  quadrature_degree: auto --> 2
  Extracting monomial form representation from UFL form
  Transforming monomial form to reference element
  representation: auto --> tensor
  quadrature_degree: auto --> 2

Compiler stage 1 finished in 0.0263979 seconds.

Compiler stage 2: Computing intermediate representation
-------------------------------------------------------
  Computing representation of 1 elements
  Computing representation of 1 dofmaps
  Computing representation of integrals
  Computing tensor representation
  Extracting monomial form representation from UFL form
  Transforming monomial form to reference element
  Precomputing integrals on reference element
  Computing tensor representation
  Extracting monomial form representation from UFL form
  Transforming monomial form to reference element
  Precomputing integrals on reference element
  Computing tensor representation
  Extracting monomial form representation from UFL form
  Transforming monomial form to reference element
  Precomputing integrals on reference element
  Precomputing integrals on reference element
  Precomputing integrals on reference element
  Computing representation of forms

Compiler stage 2 finished in 0.0242949 seconds.

Compiler stage 3: Optimizing intermediate representation
--------------------------------------------------------
  Skipping optimizations, add -O to optimize

Compiler stage 3 finished in 0.00031209 seconds.

Compiler stage 4: Generating code
---------------------------------
  Generating code for 1 elements
  Generating code for 1 dofmaps
  Generating code for integrals
  Generating code for forms

Compiler stage 4 finished in 0.0558751 seconds.

Compiler stage 4.1: Generating additional wrapper code
------------------------------------------------------
  Generating wrapper code for DOLFIN

Compiler stage 4.1 finished in 0.00222301 seconds.

Compiler stage 5: Formatting code
---------------------------------
  Output written to ./Poisson.h.

Compiler stage 5 finished in 0.00118494 seconds.

FFC finished in 0.110884 seconds.
$ ffc -O -l dolfin Poisson.ufl
This is FFC, the FEniCS Form Compiler, version 0.9.2.
For further information, visit http://www.fenics.org/ffc/.

Compiling form Poisson

Compiler stage 1: Analyzing form(s)
-----------------------------------

  Name: 'a'
  Rank: 2
  Cell: <triangle of degree 1>
  Topological dimension: 2
  Geometric dimension: 2
  Number of facets: 3
  Number of coefficients: 0
  Number of cell domains: 1
  Number of exterior facet domains: 0
  Number or interior facet domains: 0
  Number of macro cell domains: 0
  Number of surface domains: 0
  Arguments: '[v_0, v_1]'
  Coefficients: '[]'
  Argument names: '[v, u]'
  Coefficient names: '[]'
  Unique elements: 'CG1'
  Unique sub elements: 'CG1'

  Extracting monomial form representation from UFL form
  Transforming monomial form to reference element
  representation: auto --> tensor
  quadrature_degree: auto --> 0

  Name: 'L'
  Rank: 1
  Cell: <triangle of degree 1>
  Topological dimension: 2
  Geometric dimension: 2
  Number of facets: 3
  Number of coefficients: 2
  Number of cell domains: 1
  Number of exterior facet domains: 1
  Number or interior facet domains: 0
  Number of macro cell domains: 0
  Number of surface domains: 0
  Arguments: '[v_0]'
  Coefficients: '[w_0, w_1]'
  Argument names: '[v]'
  Coefficient names: '[f, g]'
  Unique elements: 'CG1'
  Unique sub elements: 'CG1'

  Extracting monomial form representation from UFL form
  Transforming monomial form to reference element
  representation: auto --> tensor
  quadrature_degree: auto --> 2
  Extracting monomial form representation from UFL form
  Transforming monomial form to reference element
  representation: auto --> tensor
  quadrature_degree: auto --> 2

Compiler stage 1 finished in 0.02618 seconds.

Compiler stage 2: Computing intermediate representation
-------------------------------------------------------
  Computing representation of 1 elements
  Computing representation of 1 dofmaps
  Computing representation of integrals
  Computing tensor representation
  Extracting monomial form representation from UFL form
  Transforming monomial form to reference element
  Precomputing integrals on reference element
  Computing tensor representation
  Extracting monomial form representation from UFL form
  Transforming monomial form to reference element
  Precomputing integrals on reference element
  Computing tensor representation
  Extracting monomial form representation from UFL form
  Transforming monomial form to reference element
  Precomputing integrals on reference element
  Precomputing integrals on reference element
  Precomputing integrals on reference element
  Computing representation of forms

Compiler stage 2 finished in 0.0240982 seconds.

Compiler stage 3: Optimizing intermediate representation
--------------------------------------------------------
  Calling FErari to optimize tensor of size 3 x 3 x 2 x 2 (36 entries)
  Calling FErari to optimize tensor of size 3 x 3 (9 entries)
  Calling FErari to optimize tensor of size 3 x 3 (9 entries)
  Calling FErari to optimize tensor of size 3 x 3 (9 entries)
  Calling FErari to optimize tensor of size 3 x 3 (9 entries)

Compiler stage 3 finished in 0.0274339 seconds.

Compiler stage 4: Generating code
---------------------------------
  Generating code for 1 elements
  Generating code for 1 dofmaps
  Generating code for integrals
  Generating code for forms

Compiler stage 4 finished in 0.055789 seconds.

Compiler stage 4.1: Generating additional wrapper code
------------------------------------------------------
  Generating wrapper code for DOLFIN

Compiler stage 4.1 finished in 0.00241089 seconds.

Compiler stage 5: Formatting code
---------------------------------
  Output written to ./Poisson.h.

Compiler stage 5 finished in 0.00137305 seconds.

FFC finished in 0.137922 seconds.
$ cmake .
CMake Warning at CMakeLists.txt:13 (find_package):
  Could not find module Finddolfin.cmake or a configuration file for package
  dolfin.

  Adjust CMAKE_MODULE_PATH to find Finddolfin.cmake or set dolfin_DIR to the
  directory containing a CMake configuration file for dolfin. The file will
  have one of the following names:

    dolfinConfig.cmake
    dolfin-config.cmake

-- Configuring done
-- Generating done
-- Build files have been written to: /home/biagioni/research/fenics
$ make
[100%] Building CXX object CMakeFiles/demo_poisson.dir/main.cpp.o
/home/biagioni/research/fenics/main.cpp: In function ‘int main()’:
/home/biagioni/research/fenics/main.cpp:89: error: no match for ‘operator==’ in ‘a == L’
make[2]: *** [CMakeFiles/demo_poisson.dir/main.cpp.o] Error 1
make[1]: *** [CMakeFiles/demo_poisson.dir/all] Error 2
make: *** [all] Error 2

Revision history for this message
dave.biagioni (davebiagioni) wrote :

I guess I should answer my own question here for others to refer to later. I added the fenics ppa to the ubuntu repository as described here:

http://fenicsproject.org/download/ubuntu_details.html

and the demos both work now. That probably makes this not a "bug" report, just a case of not reading the documentation carefully enough the first time around!

Johan Hake (johan-hake)
Changed in dolfin:
status: New → Invalid
milestone: none → 1.0-beta2
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.