This is a read only copy of the old FEniCS QA forum. Please visit the new QA forum to ask questions

Error with fenics demo_elasticity-python

0 votes

Hi,

i'm new to fenics, i've installed a version on ubuntu xenial and was trying to run the demo files installed in /usr/share/dolfin/demo, most of the examples works fine and i get the plots which means the installation was succesful, however when i try to run the python version under /undocumented/elasticity i get the following error:

In instant.import_module_directly: Failed to import module 'ffc_element_5ff93ed5beed77d8178dd5a0f0a4bc868806fbc1' from '/home/hossam/.instant/cache';
ImportError:libboost_math_tr1.so.1.61.0: cannot open shared object file: No such file or directory;
Failed to import module found in cache. Modulename: 'ffc_element_5ff93ed5beed77d8178dd5a0f0a4bc868806fbc1';
Path: '/home/hossam/.instant/cache';
ImportError:libboost_math_tr1.so.1.61.0: cannot open shared object file: No such file or directory;
Traceback (most recent call last):
  File "demo_elasticity.py", line 89, in <module>
    V = VectorFunctionSpace(mesh, "Lagrange", 1)
  File "/usr/lib/python2.7/dist-packages/dolfin/functions/functionspace.py", line 551, in VectorFunctionSpace
    constrained_domain=constrained_domain)
  File "/usr/lib/python2.7/dist-packages/dolfin/functions/functionspace.py", line 204, in __init__
    self._init_from_ufl(*args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/dolfin/functions/functionspace.py", line 224, in _init_from_ufl
    dolfin_element, dolfin_dofmap = _compile_dolfin_element(element, mesh, constrained_domain=constrained_domain)
  File "/usr/lib/python2.7/dist-packages/dolfin/functions/functionspace.py", line 89, in _compile_dolfin_element
    ufc_element, ufc_dofmap = jit(element, mpi_comm=mesh.mpi_comm())
  File "/usr/lib/python2.7/dist-packages/dolfin/compilemodules/jit.py", line 65, in mpi_jit
    return local_jit(*args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/dolfin/compilemodules/jit.py", line 124, in jit
    result = ffc.jit(ufl_object, parameters=p)
  File "/usr/lib/python2.7/dist-packages/ffc/jitcompiler.py", line 201, in jit
    module = jit_build_with_instant(ufl_object, module_name, parameters)
  File "/usr/lib/python2.7/dist-packages/ffc/jitcompiler.py", line 72, in jit_build_with_instant
    module = instant.import_module(module_name, cache_dir=cache_dir)
  File "/usr/lib/python2.7/dist-packages/instant/cache.py", line 171, in import_module
    return check_disk_cache(modulename, cache_dir, moduleids)
  File "/usr/lib/python2.7/dist-packages/instant/cache.py", line 139, in check_disk_cache
    module = import_and_cache_module(path, modulename, moduleids)
  File "/usr/lib/python2.7/dist-packages/instant/cache.py", line 87, in import_and_cache_module
    instant_assert(module is not None, "Failed to import module found in cache. Modulename: '%s';\nPath: '%s';\n%s:%s;" % (modulename, path, type(e).__name__, e))
  File "/usr/lib/python2.7/dist-packages/instant/output.py", line 91, in instant_assert
    raise AssertionError(text)
AssertionError: Failed to import module found in cache. Modulename: 'ffc_element_5ff93ed5beed77d8178dd5a0f0a4bc868806fbc1';
Path: '/home/hossam/.in

can you please help me to understand what is the source of this error?

asked Nov 11, 2016 by Hossam_Ragheb FEniCS Novice (120 points)

1 Answer

+1 vote

Boost version 1.61.0 is not available (officially) in Ubuntu xenial. Have you installed some custom Boost packages? The DOLFIN package was built against Boost version 1.58.0 on xenial and must be used with the same Boost version at runtime.

answered Nov 11, 2016 by johannr FEniCS Expert (17,350 points)
...