JIt compilation of FunctionSpace fails


141
views
1
26 days ago by
ac  

Hi,

Since a few days, I'm no more able to use the command FunctionSpace... I uninstall and reinstall my FEniCS  (conda version 2017.2.0) but this didn't fix the trouble. For example,

from fenics import * 
import numpy as np

L=1.
W=0.5

# Create mesh and define function space 
mesh = BoxMesh(Point(0., 0., 0.), Point(L, W, L), 10, 5, 10) 

V = VectorFunctionSpace(mesh,'CG',1)



gives as a result:

alling FFC just-in-time (JIT) compiler, this may take some time.
Traceback (most recent call last):
  File "test.py", line 10, in <module>
    V = VectorFunctionSpace(mesh,'CG',1)
  File "/home/name/.conda/envs/FEniCS/lib/python2.7/site-packages/dolfin/functions/functionspace.py", line 427, in VectorFunctionSpace
    constrained_domain=constrained_domain)
  File "/home/name/.conda/envs/FEniCS/lib/python2.7/site-packages/dolfin/functions/functionspace.py", line 197, in __init__
    self._init_from_ufl(*args, **kwargs)
  File "/home/name/.conda/envs/FEniCS/lib/python2.7/site-packages/dolfin/functions/functionspace.py", line 218, in _init_from_ufl
    dolfin_element, dolfin_dofmap = _compile_dolfin_element(element, mesh, constrained_domain=constrained_domain)
  File "/home/name/.conda/envs/FEniCS/lib/python2.7/site-packages/dolfin/functions/functionspace.py", line 82, in _compile_dolfin_element
    ufc_element, ufc_dofmap = jit(element, mpi_comm=mesh.mpi_comm())
  File "/home/name/.conda/envs/FEniCS/lib/python2.7/site-packages/dolfin/compilemodules/jit.py", line 70, in mpi_jit
    return local_jit(*args, **kwargs)
  File "/home/name/.conda/envs/FEniCS/lib/python2.7/site-packages/dolfin/compilemodules/jit.py", line 147, in jit
    "ffc.jit failed with message:\n%s" % (tb_text,))
  File "/home/name/.conda/envs/FEniCS/lib/python2.7/site-packages/dolfin/cpp/common.py", line 2044, in dolfin_error
    return _common.dolfin_error(location, task, reason)
RuntimeError: 

*** -------------------------------------------------------------------------
*** DOLFIN encountered an error. If you are not able to resolve this issue
*** using the information listed below, you can ask for help at
***
***     fenics-support@googlegroups.com
***
*** Remember to include the error message listed below and, if possible,
*** include a *minimal* running example to reproduce the error.
***
*** -------------------------------------------------------------------------
*** Error:   Unable to perform just-in-time compilation of form.
*** Reason:  ffc.jit failed with message:
Traceback (most recent call last):
  File "/home/name/.conda/envs/FEniCS/lib/python2.7/site-packages/dolfin/compilemodules/jit.py", line 142, in jit
    result = ffc.jit(ufl_object, parameters=p)
  File "/home/name/.conda/envs/FEniCS/lib/python2.7/site-packages/ffc/jitcompiler.py", line 218, in jit
    module = jit_build(ufl_object, module_name, parameters)
  File "/home/name/.conda/envs/FEniCS/lib/python2.7/site-packages/ffc/jitcompiler.py", line 134, in jit_build
    generate=jit_generate)
  File "/home/name/.conda/envs/FEniCS/lib/python2.7/site-packages/dijitso/jit.py", line 167, in jit
    header, source, dependencies = generate(jitable, name, signature, params["generator"])
  File "/home/name/.conda/envs/FEniCS/lib/python2.7/site-packages/ffc/jitcompiler.py", line 67, in jit_generate
    prefix=module_name, parameters=parameters, jit=True)
  File "/home/name/.conda/envs/FEniCS/lib/python2.7/site-packages/ffc/compiler.py", line 150, in compile_element
    prefix, parameters, jit)
  File "/home/name/.conda/envs/FEniCS/lib/python2.7/site-packages/ffc/compiler.py", line 190, in compile_ufl_objects
    ir = compute_ir(analysis, prefix, parameters, jit)
  File "/home/name/.conda/envs/FEniCS/lib/python2.7/site-packages/ffc/representation.py", line 171, in compute_ir
    for e in elements]
  File "/home/name/.conda/envs/FEniCS/lib/python2.7/site-packages/ffc/representation.py", line 203, in _compute_element_ir
    fiat_element = create_element(ufl_element)
  File "/home/name/.conda/envs/FEniCS/lib/python2.7/site-packages/ffc/fiatinterface.py", line 103, in create_element
    elements = _extract_elements(ufl_element)
  File "/home/name/.conda/envs/FEniCS/lib/python2.7/site-packages/ffc/fiatinterface.py", line 305, in _extract_elements
    elements += _extract_elements(sub_element, restriction_domain)
  File "/home/name/.conda/envs/FEniCS/lib/python2.7/site-packages/ffc/fiatinterface.py", line 317, in _extract_elements
    elements += [create_element(ufl_element)]
  File "/home/name/.conda/envs/FEniCS/lib/python2.7/site-packages/ffc/fiatinterface.py", line 99, in create_element
    element = _create_fiat_element(ufl_element)
  File "/home/name/.conda/envs/FEniCS/lib/python2.7/site-packages/ffc/fiatinterface.py", line 196, in _create_fiat_element
    element = ElementClass(fiat_cell, degree)
  File "/home/name/.conda/envs/FEniCS/lib/python2.7/site-packages/FIAT/lagrange.py", line 56, in __init__
    poly_set = polynomial_set.ONPolynomialSet(ref_el, degree)
  File "/home/name/.conda/envs/FEniCS/lib/python2.7/site-packages/FIAT/polynomial_set.py", line 176, in __init__
    dv = expansion_set.tabulate_derivatives(degree, pts)
  File "/home/name/.conda/envs/FEniCS/lib/python2.7/site-packages/FIAT/expansions.py", line 375, in tabulate_derivatives
    data = _tabulate_dpts(self._tabulate, D, n, order, numpy.array(pts))
  File "/home/name/.conda/envs/FEniCS/lib/python2.7/site-packages/FIAT/expansions.py", line 104, in _tabulate_dpts
    phi.append(form_derivative(phi[-1]))
  File "/home/name/.conda/envs/FEniCS/lib/python2.7/site-packages/FIAT/expansions.py", line 50, in form_derivative
    out = [sympy.diff(F, X[j]) for j in range(D)]
  File "/home/name/.conda/envs/FEniCS/lib/python2.7/site-packages/sympy/core/furnction.py", line 1993, in diff
    return Derivative(f, *symbols, **kwargs)
  File "/home/name/.conda/envs/FEniCS/lib/python2.7/site-packages/sympy/core/function.py", line 1117, in __new__
    it cannot be differentiated.'''  2.541414e-316xpr))
ValueError: 
Since there are no variables in the expression [0, 0, 0], it cannot be
differentiated.
.
*** Where:   This error was encountered inside jit.py.
*** Process: 0
*** 
*** DOLFIN version: 2017.2.0
*** Git changeset:  774aa9b05f5a21fcf3d1bd632e722933a05fdb45
*** -------------------------------------------------------------------------



Does anyone of you have a clue on how to fix this ?

Kind regards,

Community: FEniCS Project

2 Answers


5
26 days ago by
pf4d  
The error is with the newer version of SymPy.  You can fix the problem by installing SymPy version 1.0.
I too am facing the same issue. Can you please provide more information on how to install SymPy version 1.0? I currently have FEniCS version 2017.2.0 and SymPy version 1.2 installed.

I tried to install version 1.0 using the following command:
pip install sympy==1.0​
It still gives the following message:
Successfully installed mpmath-1.0.0 sympy-1.2​

Can you please provide some hint/help. Thank you very much.
written 20 days ago by Aby  
0
26 days ago by
ac  
This fix my problem. Thank you very much.

I have posted an issue on conda-forge to notify the problem.
I too am facing the same issue. Can you please provide more information on how to install SymPy version 1.0? I currently have FEniCS version 2017.2.0 and SymPy version 1.2 installed.

I tried to install version 1.0 using the following command:
pip install sympy==1.0​​
It still gives the following message:
Successfully installed mpmath-1.0.0 sympy-1.2​​
Can you please provide some hint/help. Thank you very much.
written 18 days ago by Aby  
Unfortunately, i do not use pip and i can't really help you. On conda, I have used a very similar line as yours, for instance conda install sympy=1.1  and it works for me.

Note however i've installed sympy 1.1.1. Can  you try with this version ?
written 13 days ago by ac  
Please login to add an answer/comment or follow this question.

Similar posts:
Search »