ffc issue building dolfin-2017.2.0

1,185 views
Skip to first unread message

Adrian Jackson

unread,
Jul 12, 2018, 10:01:14 AM7/12/18
to fenics-...@googlegroups.com
Hi,

I'm trying to build dolfin 2017.2.0 in a container but am getting this
error:

Traceback (most recent call last):
File "/usr/bin/ffc", line 9, in <module>
load_entry_point('fenics-ffc==2017.2.0', 'console_scripts', 'ffc')()
File
"/usr/lib/python2.7/site-packages/fenics_ffc-2017.2.0-py2.7.egg/ffc/main.py",
line 217, in main
resultcode = _compile_files(args, parameters, enable_profile)
File
"/usr/lib/python2.7/site-packages/fenics_ffc-2017.2.0-py2.7.egg/ffc/main.py",
line 256, in _compile_files
code_h, code_c = compile_ufl_data(ufd, prefix, parameters)
File
"/usr/lib/python2.7/site-packages/fenics_ffc-2017.2.0-py2.7.egg/ffc/main.py",
line 102, in compile_ufl_data
parameters=parameters)
File
"/usr/lib/python2.7/site-packages/fenics_ffc-2017.2.0-py2.7.egg/ffc/compiler.py",
line 150, in compile_element
prefix, parameters, jit)
File
"/usr/lib/python2.7/site-packages/fenics_ffc-2017.2.0-py2.7.egg/ffc/compiler.py",
line 190, in compile_ufl_objects
ir = compute_ir(analysis, prefix, parameters, jit)
File
"/usr/lib/python2.7/site-packages/fenics_ffc-2017.2.0-py2.7.egg/ffc/representation.py",
line 171, in compute_ir
for e in elements]
File
"/usr/lib/python2.7/site-packages/fenics_ffc-2017.2.0-py2.7.egg/ffc/representation.py",
line 203, in _compute_element_ir
fiat_element = create_element(ufl_element)
File
"/usr/lib/python2.7/site-packages/fenics_ffc-2017.2.0-py2.7.egg/ffc/fiatinterface.py",
line 99, in create_element
element = _create_fiat_element(ufl_element)
File
"/usr/lib/python2.7/site-packages/fenics_ffc-2017.2.0-py2.7.egg/ffc/fiatinterface.py",
line 196, in _create_fiat_element
element = ElementClass(fiat_cell, degree)
File "build/bdist.linux-x86_64/egg/FIAT/lagrange.py", line 56, in __init__
File "build/bdist.linux-x86_64/egg/FIAT/polynomial_set.py", line 176,
in __init__
File "build/bdist.linux-x86_64/egg/FIAT/expansions.py", line 375, in
tabulate_derivatives
File "build/bdist.linux-x86_64/egg/FIAT/expansions.py", line 104, in
_tabulate_dpts
File "build/bdist.linux-x86_64/egg/FIAT/expansions.py", line 50, in
form_derivative
File "/usr/lib/python2.7/site-packages/sympy/core/function.py", line
1993, in diff
return Derivative(f, *symbols, **kwargs)
File "/usr/lib/python2.7/site-packages/sympy/core/function.py", line
1117, in __new__
it cannot be differentiated.''' % expr))
ValueError:
Since there are no variables in the expression [0, 0, 0], it cannot be
differentiated.

It's failing in the form building, at form
demo/undocumented/elasticity/cpp/Elasticity.ufl. Playing with:

ffc -l dolfin demo/undocumented/elasticity/cpp/Elasticity.ufl I can see
it fails on the element line below.

cell = tetrahedron
element = VectorElement("Lagrange", cell, 1)

Any ideas what's gone wrong? I'm guessing something is screwed up with
my ffc install...

cheers

adrianj

--
The University of Edinburgh is a charitable body, registered in
Scotland, with registration number SC005336.

Jan Blechta

unread,
Jul 12, 2018, 10:56:54 AM7/12/18
to Adrian Jackson, fenics-...@googlegroups.com
This is a regression in SymPy 1.2 relased few days ago. It is patched
in FIAT master. You can backport this patch to the lates FIAT release:
https://bitbucket.org/fenics-project/fiat/commits/8ceb29a3b9b14668b9d387321a3f8f4126f9a159
or install older sympy

pip3 install --upgrade sympy==1.1.1

We will think about how to prevent this happening in containers.

Jan

Björn Baran

unread,
Aug 1, 2018, 7:06:21 AM8/1/18
to fenics-support
I had the same issue as Adrian with dolfin 2018.1.0 in Anaconda 5.2.
After I saw Jans post, I used the following line to create the Anaconda environment:

conda create -n fenicsproject -c conda-forge fenics scipy sympy=1.1.1  matplotlib ipython spyder

This solved the issue for me. Thank you Jan for the solution.

Björn
Message has been deleted

Jan Heiland

unread,
Sep 8, 2018, 1:23:37 AM9/8/18
to fenics-support
Same thing when building from source.

Downgrade of sympy solved this issue.

Looks like the patch in FIAT master has not reached the pip repositories yet.

Reply all
Reply to author
Forward
0 new messages