Problem with functionspace in ubuntu

Hi every one
Ihave installed fenics with anaconda. but when i use Fonctionspace, in jupyter notebook,
i have this error:

Calling FFC just-in-time (JIT) compiler, this may take some time.
Calling FFC just-in-time (JIT) compiler, this may take some time.

Moving new file over differing existing file:
src: /home/sambou/Documents/jitfailure-ffc_element_2a4ec0e3cf61cfa91bc23fa17689ebd036afdff2/error.log.398d84c0e48b427d9f7119e8e3186c6d
dst: /home/sambou/Documents/jitfailure-ffc_element_2a4ec0e3cf61cfa91bc23fa17689ebd036afdff2/error.log
backup: /home/sambou/Documents/jitfailure-ffc_element_2a4ec0e3cf61cfa91bc23fa17689ebd036afdff2/error.log.old
Backup file exists, overwriting.
------------------- Start compiler output ------------------------
In file included from /home/sambou/anaconda3/envs/fenicsproject/x86_64-conda_cos6-linux-gnu/sysroot/usr/include/sys/types.h:136:0,
from /home/sambou/anaconda3/envs/fenicsproject/x86_64-conda_cos6-linux-gnu/sysroot/usr/include/stdlib.h:320,
from /home/sambou/anaconda3/envs/fenicsproject/x86_64-conda_cos6-linux-gnu/include/c++/7.3.0/cstdlib:75,
from /home/sambou/anaconda3/envs/fenicsproject/x86_64-conda_cos6-linux-gnu/include/c++/7.3.0/bits/stl_algo.h:59,
from /home/sambou/anaconda3/envs/fenicsproject/x86_64-conda_cos6-linux-gnu/include/c++/7.3.0/algorithm:62,
from /tmp/tmpzkc83y_i/ffc_element_2a4ec0e3cf61cfa91bc23fa17689ebd036afdff2.h:31,
from /tmp/tmpzkc83y_i/ffc_element_2a4ec0e3cf61cfa91bc23fa17689ebd036afdff2.cpp:29:
/usr/include/time.h:37:10: fatal error: bits/types/clock_t.h: No such file or directory
#include <bits/types/clock_t.h>
^~~~~~~~~~~~~~~~~~~~~~
compilation terminated.

------------------- End compiler output ------------------------
Compilation failed! Sources, command, and errors have been written to: /home/sambou/Documents/jitfailure-ffc_element_2a4ec0e3cf61cfa91bc23fa17689ebd036afdff2


DijitsoError Traceback (most recent call last)
in
----> 1 W = FunctionSpace(mesh, TH)

/usr/lib/python3/dist-packages/dolfin/function/functionspace.py in init(self, *args, **kwargs)
29 pass
30 elif len(args) == 2:
—> 31 self._init_from_ufl(*args, **kwargs)
32 else:
33 self._init_convenience(*args, **kwargs)

/usr/lib/python3/dist-packages/dolfin/function/functionspace.py in _init_from_ufl(self, mesh, element, constrained_domain)
41 # Compile dofmap and element
42 ufc_element, ufc_dofmap = ffc_jit(element, form_compiler_parameters=None,
—> 43 mpi_comm=mesh.mpi_comm())
44 ufc_element = cpp.fem.make_ufc_finite_element(ufc_element)
45

/usr/lib/python3/dist-packages/dolfin/jit/jit.py in mpi_jit(*args, **kwargs)
45 # Just call JIT compiler when running in serial
46 if MPI.size(mpi_comm) == 1:
—> 47 return local_jit(*args, **kwargs)
48
49 # Default status (0 == ok, 1 == fail)

/usr/lib/python3/dist-packages/dolfin/jit/jit.py in ffc_jit(ufl_form, form_compiler_parameters)
95 p.update(dict(parameters[“form_compiler”]))
96 p.update(form_compiler_parameters or {})
—> 97 return ffc.jit(ufl_form, parameters=p)
98
99

/usr/lib/python3/dist-packages/ffc/jitcompiler.py in jit(ufl_object, parameters, indirect)
215
216 # Inspect cache and generate+build if necessary
–> 217 module = jit_build(ufl_object, module_name, parameters)
218
219 # Raise exception on failure to build or import module

/usr/lib/python3/dist-packages/ffc/jitcompiler.py in jit_build(ufl_object, module_name, parameters)
131 name=module_name,
132 params=params,
–> 133 generate=jit_generate)
134 return module
135

/usr/lib/python3/dist-packages/dijitso/jit.py in jit(jitable, name, params, generate, send, receive, wait)
163 elif generate:
164 # 1) Generate source code
–> 165 header, source, dependencies = generate(jitable, name, signature, params[“generator”])
166 # Ensure we got unicode from generate
167 header = as_unicode(header)

/usr/lib/python3/dist-packages/ffc/jitcompiler.py in jit_generate(ufl_object, module_name, signature, parameters)
74 dependencies = []
75 for dep in dependent_ufl_objects[“element”]:
—> 76 dep_module_name = jit(dep, parameters, indirect=True)
77 dependencies.append(dep_module_name)
78 for dep in dependent_ufl_objects[“coordinate_mapping”]:

/usr/lib/python3/dist-packages/ffc/jitcompiler.py in jit(ufl_object, parameters, indirect)
215
216 # Inspect cache and generate+build if necessary
–> 217 module = jit_build(ufl_object, module_name, parameters)
218
219 # Raise exception on failure to build or import module

/usr/lib/python3/dist-packages/ffc/jitcompiler.py in jit_build(ufl_object, module_name, parameters)
131 name=module_name,
132 params=params,
–> 133 generate=jit_generate)
134 return module
135

/usr/lib/python3/dist-packages/dijitso/jit.py in jit(jitable, name, params, generate, send, receive, wait)
215 # TODO: Parse output to find error(s) for better error messages
216 raise DijitsoError(“Dijitso JIT compilation failed, see ‘%s’ for details”
–> 217 % err_info[‘fail_dir’], err_info)
218
219 # Return built library and its signature

DijitsoError: Dijitso JIT compilation failed, see ‘/home/sambou/Documents/jitfailure-ffc_element_2a4ec0e3cf61cfa91bc23fa17689ebd036afdff2’ for details

It says you’re overwriting existing files. You could try cleaning out your cache and making a fresh run, e.g. dijitso clean or rm -r ~/.cache/dijitso/

Sometimes “Moving new file over differing existing file” error in MPI runs involving networked drives. In this case it might help running first in serial (e.g. only 1 iteration) to generate the ffc code, and then run the full job in mpi.

Your time.h problem looks a bit more serious. It might mean you have old files mixed with new, with a compiler or libc upgrade in between. Here again, cleaning out the cache might help. Or it might mean a mismatch in libraries, indicating one of the packages would need to be rebuilt or upgraded.

thank’s for you response
I have done it but the probleme is not solved.
i have installed fenics for ubuntu and and anaconda both, because with anaconda fenics didnt work.
maybe is the source or the problem…

Possibly. You can expect it to not work if you mix packages from different sources. Choose one source.

i have found the problem
i have install fenics updates with this code in my ubuntu terminal:
pip3 install fenics-ffc --upgrade

1 Like

thank a lot
thanks a lot