← Back to team overview

ffc team mailing list archive

Re: error in compiling

 

I ran the FFC tests, and I got this error:

walker@box227 ~/FENICS/ffc/test
$ python test.py
Running tests: unit
----------------------------------------------------------------------
...
----------------------------------------------------------------------
Ran 3 tests in 0.030s

OK
.........E..
======================================================================
ERROR: Test that JIT compiler is fast enough.
----------------------------------------------------------------------
Traceback (most recent call last):
  File "test.py", line 237, in testPoisson
    jit(a0)
File "/home/walker/build/lib/python2.5/site-packages/ffc/jit/jit.py", line 58, in jit
    return jit_form(object, options)
File "/home/walker/build/lib/python2.5/site-packages/ffc/jit/jit.py", line 94, in jit_form
    cache_dir = options["cache_dir"])
File "/home/walker/build/lib/python2.5/site-packages/ufc_utils/build.py", line 53, in build_ufc_module
    (cpp_path, swig_path) = configure_instant()
File "/home/walker/build/lib/python2.5/site-packages/ufc_utils/build.py", line 82, in configure_instant raise OSError, "Your current swig version is %s, it needs to be 1.3.35 or higher.\n" % swig_version
NameError: global name 'swig_version' is not defined

----------------------------------------------------------------------
Ran 12 tests in 0.450s

FAILED (errors=1)

===================================

Yes, my SWIG version is 1.3.29 only. However, there is a bug in build.py in ../ufc_utils/. the variable `swig_version' should be `get_swig_version()' I think. Otherwise, `swig_version' is not defined. Probably this bug never shows up because most people have the correct SWIG version installed.

- Shawn

On Sun, 21 Jun 2009, Kristian Oelgaard wrote:

Quoting Shawn Walker <walker@xxxxxxxxxxxxxxx>:

This is what I tried to compile:

# Compile this form with FFC: ffc -l dolfin Poisson.ufl

element = FiniteElement("Lagrange", triangle, 2)

v = TestFunction(element)
u = TrialFunction(element)
f = Function(element)

a = inner(grad(v), grad(u))*dx
L = v*f*dx

It works fine here, I think you just need to use the latest versions of FFC, UFL
and DOLFIN and make sure you're paths are set correctly.

Kristian

- Shawn

On Sun, 21 Jun 2009, Kristian Oelgaard wrote:

Quoting Shawn Walker <walker@xxxxxxxxxxxxxxx>:

I get the following error when trying run ffc on a simple P2 lagrange
laplace form:

Are you using development versions of FFC/UFL and DOLFIN?

Could you send the *.ufl file?

Kristian

Compiler stage 5: Formatting code
---------------------------------
   Formatting code for UFC 1.0.
   Writing DOLFIN wrappers.
Traceback (most recent call last):
   File "/home/walker/build/bin/ffc", line 186, in <module>
     sys.exit(main(sys.argv[1:]))
   File "/home/walker/build/bin/ffc", line 130, in main
     execfile(script, {})
   File "Poisson.py", line 31, in <module>
     compile([a, L, M, element], "Poisson", {'log_level': 20, 'format':
'dolfin', 'form_postfix': True, 'quadrature_order': 'auto', 'precision':
'15', 'cpp optimize': False, 'cache_dir': None, 'split': False,
'representation': 'auto', 'optimize': False, 'output_dir': '.'},
globals())
   File
"/home/walker/build/lib/python2.5/site-packages/ffc/compiler/compiler.py",
line 109, in compile
     format_code(generated_forms, prefix, format, options)
   File
"/home/walker/build/lib/python2.5/site-packages/ffc/compiler/compiler.py",
line 214, in format_code
     format.write(generated_forms, prefix, options)
   File



"/home/walker/build/lib/python2.5/site-packages/ffc/compiler/format/ufcformat.py",
line 267, in write
     output += _generate_dolfin_wrappers(generated_forms, prefix, options,
self.format)
   File



"/home/walker/build/lib/python2.5/site-packages/ffc/compiler/format/ufcformat.py",
line 663, in _generate_dolfin_wrappers
     return generate_dolfin_code(prefix, "", form_names, common_space,
False) + "\n\n"
TypeError: generate_dolfin_code() takes exactly 3 arguments (5 given)

- Shawn
_______________________________________________
FFC-dev mailing list
FFC-dev@xxxxxxxxxx
http://www.fenics.org/mailman/listinfo/ffc-dev










Follow ups

References