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

Can not get biharmonic.py demo to run properly on ubuntu 14.04 running on virtual box.

0 votes

I'm a very new user of Ubuntu and Fenics.

I have a mid 2009 Macbook Pro which I'm running Ubuntu 14.04 using VirtualBox.

I've gone through the instructions of installing Fenics through their website and everything installs fine.

I tried to run the demo biharmonic.py and I get the following error message:

Calling FFC just-in-time (JIT) compiler, this may take some time.
FErari not installed, skipping tensor optimizations
Traceback (most recent call last):
File "demo_biharmonic.py", line 49, in
V = FunctionSpace(mesh, "CG", 2)
File "/usr/lib/python2.7/dist-packages/dolfin/functions/functionspace.py", line 468, in init
FunctionSpaceBase.init(self, mesh, element, constrained_domain)
File "/usr/lib/python2.7/dist-packages/dolfin/functions/functionspace.py", line 153, in init
ufc_element, ufc_dofmap = jit(self._ufl_element)
File "/usr/lib/python2.7/dist-packages/dolfin/compilemodules/jit.py", line 62, in mpi_jit
return local_jit(*args, **kwargs)
File "/usr/lib/python2.7/dist-packages/dolfin/compilemodules/jit.py", line 126, in jit
return jit_compile(form, parameters=p)
File "/usr/lib/python2.7/dist-packages/ffc/jitcompiler.py", line 75, in jit
return jit_element(ufl_object, parameters)
File "/usr/lib/python2.7/dist-packages/ffc/jitcompiler.py", line 186, in jit_element
compiled_form, module, form_data, prefix = jit_form(form, parameters)
File "/usr/lib/python2.7/dist-packages/ffc/jitcompiler.py", line 142, in jit_form
parameters=parameters)
File "/usr/lib/python2.7/dist-packages/ffc/compiler.py", line 176, in compile_form
format_code(code, wrapper_code, prefix, parameters)
File "/usr/lib/python2.7/dist-packages/ffc/formatting.py", line 114, in format_code
_write_file(code_h, prefix, ".h", parameters)
File "/usr/lib/python2.7/dist-packages/ffc/formatting.py", line 137, in _write_file
hfile = open(filename, "w")
IOError: [Errno 13] Permission denied: './ffc_form_95689a3687c8c734b9babc801e988cf372590b06.h'

I have no idea what the problem is and I've gone through the Q&A forum looking for a similar error code, but did not find any.

Thank you for any help!

EDIT: After some more googling, I got fenics to work by typing sudo python demo_xxx.py. Is there a particular reason why I need to be a super user to run Fenics?

asked Nov 28, 2014 by FEM_t00l FEniCS Novice (120 points)
edited Nov 28, 2014 by FEM_t00l

1 Answer

+1 vote

No, running with sudo is not recommended and not needed either. The problem seems to be that you are running this in a directory which is write protected. Try copyring the demo to a directory where you have write access and run it from there. There is a script dolfin-get-demos that will copy the DOLFIN demo files to your home directory. Try that.

Note that since you have used sudo when running the demo, you probably need to remove the Instant cache directory to be able to write to it as a regular user. You can do that by running

sudo rm -rf ~/.instant
answered Dec 1, 2014 by johannr FEniCS Expert (17,350 points)
...