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

Problem with assemble() in Fenics 2017.1.0

0 votes

Hi,

I am using FEniCS 2017.1.0 and trying to run this demo. However it seems that there is an issue with this function:

# Assemble stiffness form
A = PETScMatrix()
assemble(a, tensor=A)

The program stops with this error:

Moving new file over differing existing file:
src: /home/amokhtar/Fenics/jitfailure-ffc_form_19466ff4df8d7c976e2063a128999d1c3720ceec/error.log.5f4a0ee8c4774aafb4226d207617e399
dst: /home/amokhtar/Fenics/jitfailure-ffc_form_19466ff4df8d7c976e2063a128999d1c3720ceec/error.log
backup: /home/amokhtar/Fenics/jitfailure-ffc_form_19466ff4df8d7c976e2063a128999d1c3720ceec/error.log.old
Backup file exists, overwriting.
Compilation failed! Sources, command, and errors have been written to: /home/amokhtar/Fenics/jitfailure-ffc_form_19466ff4df8d7c976e2063a128999d1c3720ceec
Traceback (most recent call last):
  File "test_eig.py", line 24, in <module>
    assemble(a, tensor=A)
  File "/share/apps/miniconda2/envs/fenics/lib/python2.7/site-packages/dolfin/fem/assembling.py", line 193, in assemble
    dolfin_form = _create_dolfin_form(form, form_compiler_parameters)
  File "/share/apps/miniconda2/envs/fenics/lib/python2.7/site-packages/dolfin/fem/assembling.py", line 67, in _create_dolfin_form
    function_spaces=function_spaces)
  File "/share/apps/miniconda2/envs/fenics/lib/python2.7/site-packages/dolfin/fem/form.py", line 89, in __init__
    mpi_comm=mesh.mpi_comm())
  File "/share/apps/miniconda2/envs/fenics/lib/python2.7/site-packages/dolfin/compilemodules/jit.py", line 70, in mpi_jit
    return local_jit(*args, **kwargs)
  File "/share/apps/miniconda2/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 "/share/apps/miniconda2/envs/fenics/lib/python2.7/site-packages/dolfin/cpp/common.py", line 2342, 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 "/share/apps/miniconda2/envs/fenics/lib/python2.7/site-packages/dolfin/compilemodules/jit.py", line 142, in jit
    result = ffc.jit(ufl_object, parameters=p)
  File "/share/apps/miniconda2/envs/fenics/lib/python2.7/site-packages/ffc/jitcompiler.py", line 210, in jit
    raise FFCJitError("A directory with files to reproduce the jit build failure has been created.")
FFCJitError: A directory with files to reproduce the jit build failure has been created.
.
*** Where:   This error was encountered inside jit.py.
*** Process: 0
***
*** DOLFIN version: 2017.1.0
*** Git changeset:  d90efb69cac2db97c88c66a2189d43b3f91d3c80
*** -------------------------------------------------------------------------

Aborted

Also I noticed that this issue repeats whenever the assemble() function is used (in other programs).
Does anybody know how should I fix it?

Thanks

asked Jun 12, 2017 by Ashkan FEniCS Novice (300 points)
edited Jun 13, 2017 by Ashkan

1 Answer

0 votes

You are using the documentation for FEniCS version 1.3.0 together with FEniCS version 2017.1.0. They are not necessarily compatible. Please use the documentation for 2017.1.0: demo_eigenvalue

answered Jun 13, 2017 by johannr FEniCS Expert (17,350 points)

Thanks Johan. In fact the problem is with this part which is the same for both FEniCS versions demo:

# Assemble stiffness form
A = PETScMatrix()
assemble(a, tensor=A)

I don't know if the assemble() function has changed in FEniCS 2017 or the issue is with the installation of FEniCS on the cluster I use. Are you using FEniCS 2017? if yes, does the assemble() function work for you?

Yes, the eigenvalue demo linked to in my answer runs fine for me with FEniCS 2017.1.

Notice this line in your error message:

 FFCJitError: A directory with files to reproduce the jit build failure has been created.

Look in this directory. There should be a log file there with hopefully some useful information.

Thanks Johan. I modified my .bash_profile and it works fine now.

...