FFC

KeyError: 'max_local_dimension' in formatting.py

Asked by Christian Waluga

Hi,

i just installed FEniCS using Dorsal (stable=true, snapshot=false) on my Ubuntu 12.04 system. However, I ran into some (probably) FFC-related problems which I don't understand.

Since I first thought it might be some problem with my own code, I ran an example and got the following:

$ python demo_cahn-hilliard.py
Calling FFC just-in-time (JIT) compiler, this may take some time.
Traceback (most recent call last):
  File "demo_cahn-hilliard.py", line 64, in <module>
    V = FunctionSpace(mesh, "Lagrange", 1)
  File "/home/share_m2/opt/FEniCS/lib/python2.7/site-packages/dolfin/functions/functionspace.py", line 390, in __init__
    FunctionSpaceBase.__init__(self, mesh, element, constrained_domain)
  File "/home/share_m2/opt/FEniCS/lib/python2.7/site-packages/dolfin/functions/functionspace.py", line 84, in __init__
    ufc_element, ufc_dofmap = jit(self._ufl_element)
  File "/home/share_m2/opt/FEniCS/lib/python2.7/site-packages/dolfin/compilemodules/jit.py", line 66, in mpi_jit
    return local_jit(*args, **kwargs)
  File "/home/share_m2/opt/FEniCS/lib/python2.7/site-packages/dolfin/compilemodules/jit.py", line 154, in jit
    return jit_compile(form, parameters=p, common_cell=common_cell)
  File "/home/share_m2/opt/FEniCS/lib/python2.7/site-packages/ffc/jitcompiler.py", line 75, in jit
    return jit_element(ufl_object, parameters)
  File "/home/share_m2/opt/FEniCS/lib/python2.7/site-packages/ffc/jitcompiler.py", line 244, in jit_element
    compiled_form, module, form_data, prefix = jit_form(form, parameters)
  File "/home/share_m2/opt/FEniCS/lib/python2.7/site-packages/ffc/jitcompiler.py", line 197, in jit_form
    parameters=parameters)
  File "/home/share_m2/opt/FEniCS/lib/python2.7/site-packages/ffc/compiler.py", line 176, in compile_form
    format_code(code, wrapper_code, prefix, parameters)
  File "/home/share_m2/opt/FEniCS/lib/python2.7/site-packages/ffc/formatting.py", line 73, in format_code
    code_h += _format_h("dofmap", code_dofmap, parameters)
  File "/home/share_m2/opt/FEniCS/lib/python2.7/site-packages/ffc/formatting.py", line 119, in _format_h
    return templates[class_type + "_combined"] % code + "\n"
KeyError: 'max_local_dimension'

I searched for max_local_dimension, but found no answers. Is this a known problem? If yes, does anyone have an idea on how to fix this?

Best, Christian

Question information

Language:
English Edit question
Status:
Solved
For:
FFC Edit question
Assignee:
No assignee Edit question
Solved by:
Martin Sandve Alnæs
Solved:
Last query:
Last reply:
Revision history for this message
Best Martin Sandve Alnæs (martinal) said :
#1

Looks like you have non-matching versions of ufc and ffc. Maybe you have another ufc installation in the path?

Revision history for this message
Christian Waluga (chris-1) said :
#2

Okay, I assumed that dorsal properly installed everything, regardless of what was previously in these directories. What I did now was to entirely remove the FEniCS installation target directory and then I ran dorsal again. This took some time, but it seems like this solved my problem. Thanks so much for your help!

Revision history for this message
Christian Waluga (chris-1) said :
#3

Thanks Martin Sandve Alnæs, that solved my question.